1

I have been playing around with DSPack, it can play avi and wmv files, but it is not playing mp4 files. i have installed ffdshow codec but still it wont play any other format. I read somewhere that i need to use ffdshow filter, but there is very limited documentation on how to do so... Can someone help me out here?

Edit

Thats the error i get when playing any other format

raised exception class EDirectShowException with message 'C ($80040265).'. Process stopped. Use Step or Run to continue.

and thats the function which pops the exception

function CheckDSError(HR: HRESULT): HRESULT;
  var Excep: EDirectShowException;
  begin
    Result := HR;
    if Failed(HR) then
    begin
      Excep := EDirectShowException.Create(format(GetErrorString(HR)+' ($%x).',[HR]));
      Excep.ErrorCode := HR;
      raise Excep;
    end;
  end;

Edit I installed the haali demultiplexer, it was a self installer after installation i still get the same error. and the gdcl demultiplexer, those are two dll files, any suggestions on how to use them?

PS: I have never worked with codecs and/or this kind of stuff, so sorry for being so thick, And i am using Windows 7 x64

Junaid Noor
  • 474
  • 9
  • 24
  • How do you build your filter graph ? If automatically, then it should be enough to just install the FFDShow filter. – TLama Jun 13 '14 at 21:54
  • I just put the Filtergraph and videowindow on form, linked filtergraph to video window and called renderfile... i have never worked with filters and stuff before so i dont know what is what. can you tell me how to set the filter graph to automatically pick ffdshow as i have FFDShow installed already and its not working – Junaid Noor Jun 14 '14 at 12:03
  • The graph builder should pick the proper filter for rendering a file that you pass to its `RenderFile` method. That's the automatic way I mentioned. If you have properly registered that filter and the file is really of that type, it should IMHO work. And downvote is not mine, but I second it because we are missing details. At least what returns you the [`RenderFile`](http://msdn.microsoft.com/en-us/library/windows/desktop/dd390090(v=vs.85).aspx) method ? How did you check the filter graph is registered ? Are you sure the file you play is of matching type for that filter graph ? – TLama Jun 14 '14 at 12:17
  • I updated the question with the error i am getting... i have tried with alot of files and any file thats not avi or wmv format it gives this type of error. and i guess i am doing it the right way because even the DsPack own demo gives me this error – Junaid Noor Jun 14 '14 at 12:23
  • That error is [`VFW_E_UNSUPPORTED_STREAM`](http://msdn.microsoft.com/en-us/library/windows/desktop/dd375623(v=vs.85).aspx#VFW_E_UNSUPPORTED_STREAM) which sounds like the filter is not registered. But maybe I'm wrong. I've added [tag:directshow] tag to attract more attention... – TLama Jun 14 '14 at 12:56
  • 1
    You need third party MP4 demultiplexer to read MP4 files, get this one for example: http://www.gdcl.co.uk/mpeg4/ – Roman R. Jun 14 '14 at 13:04
  • @JunaidNoor : not every "mp4" file is the same. One can "mp4" files generated in different formats. Even "VLC Media Player" can not play some. How many different "mp4" files you've tried? – moskito-x Jun 14 '14 at 15:06
  • ffdshow is just the decoder for the video or the audio, it does not include a demultiplexer for the fileformat/container. the best free demux for mp4 files is the [haalie media splitter](http://haali.su/mkv/) – CPlusSharp Jun 14 '14 at 15:30
  • Which operating system are you using? – Sebastian Z Jun 16 '14 at 07:12

2 Answers2

1

I can successfully play *.mp4 files with the "DSVideoWinDowEx\PlayWin" demo application that ships with DSPack. Windows 7 includes the mp4 codec, so this should not be an issue. Make sure that you're not running your application in debug mode, because many codecs refuse to work if a debugger is active.

The Haalie Media Splitter is not used for my test *.mp4 files. But it uses the AC3Filter. So your problem could also be a missing audio codec.

If that doesn't fix the issue then the question might be: "Why does it not work on your PC?" In order to further narrow down the issue try playing the video with GraphEdit or GraphStudio and see if that works. These tools will also show the filter graph that is used. You can also show the FilterGraph that is used in your DSPack application.

If you install a DirectShow filter (codec) on your system, it will be used automatically by DirectShow/DSPack. You could register a filter in the system manually by calling regsvr32 "path_to_codec.ax", but this is usually done by the installer. It is possible to manually use a filter in DirectShow, but most of the time this is not needed.

Sebastian Z
  • 4,520
  • 1
  • 15
  • 30
1

lavfilters provide everything you will need with source splitters and decoders. It's open source, actively developed and based on ffmpeg. If you can't playback the mp4 after installing lavfilters then I would say there is a problem with the mp4 itself. In this case use something like ffprobe to inspect the file or post a link to the file.

haz
  • 116
  • 3