1

I am trying to create a video player for MP4's with DirectX and it works on my computer but I tried my application on a netbook and this error code pops up in a try{...}catch(Exception e){...}.

Error in the application.
-2147220891 (VFW_E_UNSUPPORTED_STREAM)
   at Microsoft.DirectX.AudioVideoPlayback.Video.Open(String fileName, Boolean autoRun)
   at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(String fileName, Boolean autoRun)
   at Video_Player.Player.PeekWind_Load(Object sender, EventArgs e)

This is some of my code.

Microsoft.DirectX.AudioVideoPlayback.Video video = new Microsoft.DirectX.AudioVideoPlayback.Video("C:\TestVideo.mp4", true);
video.Owner = ViewPane;
video.Size = new Size(Video.DefaultSize.Width, Video.DefaultSize.Height);
video.Audio.Volume = -2500;
video.Play();

Thank you for any help given.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
Nicholas Hein
  • 119
  • 1
  • 11

1 Answers1

1

VFW_E_UNSUPPORTED_STREAM is an error code returned by underlying DirectShow layer, which indicates that it was unable to build playback pipeline. Which in turn means that some stream or format whatsoever could not be recognized and is typically missing a codec/filter component to read the data into decoded and presentation-ready state.

As you mention MP4, you presumably need a third party filter/codec installed since stock Windows does not offer a component for this within DirectShow API (GDCL filters should fix this in Windows 7+ and in older systems you also typically need a third party H.264 decoder in addition).

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Thank you for the answer! I have a question about it though. Where do I put the GDCL filters's dlls on my computer? – Nicholas Hein Aug 27 '14 at 18:32
  • You put them anywhere, then you run once `regsvr32 xxx.dll` to register the binaries, from the daministrator's elevated command prompt. Then you don't move them from their location. That's it. – Roman R. Aug 27 '14 at 19:07
  • Thank you very much! I am pretty new at this stuff (I had to research how to open an administrator's elevated command prompt :P) and you were a lot of help. – Nicholas Hein Aug 27 '14 at 20:21
  • Sorry, one more question. I installed a [third party H.264 decoder](http://www.free-codecs.com/DivX_H264_decoder_download.htm) and it still doesn't seem to work, do you know how to use it or do you know a better one? – Nicholas Hein Aug 28 '14 at 02:11
  • Could you please add some information on your Q? What is the OS version, and is your application 32 or 64 bit? – Roman R. Aug 28 '14 at 04:16
  • My application is a 32 bit or at least that is what it shows when I see it in task manager. My computer's OS is **Windows 8.1** with a **64 bit processor**. If you want to try my program, you can download it [here](https://sites.google.com/site/openoceansoftware/home), click the download link and it opens an installer. It may still be buggy though, but if you want to uninstall it afterwords, the only files are in the **"C:\OpenOceanSoftware" folder**. – Nicholas Hein Aug 29 '14 at 22:38