Does windows media player play video
WMP opens them in shared mode and everything works as expected. The Splitter opens the files in non-Shared mode. The problem is not necessarily with Windows Media Player, but with the Microsoft MPEG2 DirectShow Splitter that WMP uses to open the MPEG2 files that I am trying to play and download at the same time. How does it know?Īfter some digging I discovered the problem. While WMP did open the file it waited until the mpeg file was completely copied before it started playing.
DOES WINDOWS MEDIA PLAYER PLAY VIDEO WINDOWS 7
I went so far as to use MiniHttp to stream the video to Windows Media Player to see if that would "fool" WMP into playing a video that is being download. How do I play a video on my laptop Windows 7 Step 1: Go to the Start search option and open Control Panel. IOW, the only players I need them to work with.
DOES WINDOWS MEDIA PLAYER PLAY VIDEO CODE
This code works with mplayer, VLC, and Media Player Classic just not Windows Media Player or Windows Media Center player. What am I missing? If the Amazon guys can do this then so can I, right? Windows Media Player indicates that its opening the file and then just stops with an error that the file can't be opened "already opened in another process." Private void OnBufferingComplete(object sender, BufferingCompleteEventArgs e)ĪxWindowsMediaPlayer1.URL = e.MediaFile.FullName The file writes to the disk and has the correct permissions.īut then heres the event handler in the other thread for playing back the video // the playback thread OnBufferingComplete(this, new BufferingCompleteEventArgs(this, MediaFile)) fire an event to a different thread to tell If (totalBytesRead >= bufferFullByteCount) Var writer = new BinaryWriter(fileStream) īytesRead = webStream.Read(buffer, 0, 4096) Var fileStream = new FileStream(MediaFile.FullName, FileMode.Create, FileAccess.Write, FileShare.ReadWrite) Void StartStreaming(Stream webStream, int bufferFullByteCount) In the buffering thread I have this code for reading the file from the network and writing it to a file (no error handling or other stuff to make it more readable): // the download thread Process Monitor says that Media Player is opening the file with Fileshare flags, but it errors out. I've read the " C# file read/write fileshare doesn’t appear to work" question and answers for opening a file with the FileShare flags. Unbox lets you play WMVs while it is downloading them. I know it is possible to do because Amazon Unbox downloads does it. What happens is that, while I can write to the video file and read it at the same time from my own test code, it cannot be done using Windows Media Player (at least I haven't figured it out). It is necessary to download it rather than just stream it directly to Windows Media Player. The file is pretty big and will take awhile to download. My question is about writing a video file to the hard drive that is being downloaded from the network and playing it at the same time using Windows Media Player.