Log in

View Full Version : The "decoding MP4" maze


OlivierMiR
2nd September 2006, 21:44
Hello,

In short

I'd like to decode MP4 files (video stream format AVC1) using no "embedded code" but rather "external codec", preferably other than ffdshow.

OT or not OT?

Firstly, please excuse me to post that (probably) stupid question here: I know this is a forum dedicated to encoding rather than decoding questions. I hope I'm not too "off-topic", but I couldn't find a good forum to ask this decoding question. And my numerous searches didn't find a good answer to my question.

A little vocabulary

I'll call here "embedded code" the case where a video player software is able to decode a file and a video stream because it has got some code which is bundled with the software.

Opposite to this, I call "external codec" the software needed to parse and decode a file and a video stream, which can be downloaded independently of a player. I think DirectShow codec ffdshow is an example of this. Maybe VFW codecs are an other family of these codecs, although I'm not so sure here...

Example: VLC player exclusively uses embedded code, although ViPlay, AFAIK, exclusively uses external codecs to read files.

To the point

I searched A LOT trying to understand how to read a MP4 file with an AVC1 video stream (and an MP4A audio stream). I don't like codec packs and would like something "not too intrusive"...
Apparently I need a "parser" (or "splitter") such as Haali's splitter. From http://forum.doom9.org/showthread.php?s=&threadid=62723, such "package" seems to be enough, although some other FAQs says that I also need a decoder. I tried installing ffdshow, which, with Haali's splitter and ViPlay, indeed do the job. But it's really buggy (crash everytime I try to end the playing and others).

Other tries with XviD, 3ivx and others didn't succeed. One problem is that I don't really understand which one is a splitter, which one is a decoder, and which pair of software (or which software alone) would work... So I'm testing "blindly", without success up to now...

And the question is...

What exactly should I install (minimally) to be able to play MP4 files, with video stream AVC1, with any player using "external codecs"? (And if you have any good advice for MP4V and MP4A I'd be also interrested!)

Any pointer or idea is welcome because I'm a bit lost here... Thanks!

Olivier

Manao
2nd September 2006, 22:07
Media Player Classic : player using external filters ( i.e, using DirectShow ). It contains an embedded MP4 parser, but if you don't like it, you can use another one.
Haali's splitter : that is used to parse MP4/MKV files
FFDShow : it will decode the video/audio streams.

Several remarks :
- a splitter is a filter that takes a file and extract the different streams contained in the file. In case of a MP4 file with compressed video & audio, it will output the compressed video in one stream and the compressed audio in another. These streams still need to be decoded.
- a decoder is used to decompressed a compressed stream. It often can't decode such a stream if it hasn't been extracted by a parser before. It ouputs the decompressed stream ( whether audio or video ).
- FFDShow is great. Whatever are your reason to dislike it, they are most probably ill founded.
- VLC and mplayer are also great video players. They both use the same decoding librairy as ffdshow ( i.e, ffmpeg/lavc ).

Audionut
3rd September 2006, 01:05
Manao is spot on. Get the latest version of Media Player Classic and FFDShow.
With this combination, there will not be much that you cannot play.

Here is the latest ffdshow builds.
http://sourceforge.net/project/showfiles.php?group_id=173941

The latest Media Player Classic.
http://ffdshow.faireal.net/mirror/Media%20Player%20Classic/

The latest Haali Media Spliter.
http://ffdshow.faireal.net/mirror/Misc%20(not%20by%20celtic_druid)/Haali/

Jay Bee
3rd September 2006, 09:58
I use Zoom Player with CoreAVC (Haali's splitter is included in download).

OlivierMiR
7th September 2006, 22:04
Thank you for these useful replies!

To Manao, about "FFDShow is great. Whatever are your reason to dislike it, they are most probably ill founded.": I don't want to start a war regarding FFDShow, but simply to explain my current problem...

- several posts on Internet forums seems to reveal a not so good experience with FFDShow (e.g. here, http://forum.videolan.org/viewtopic.php?t=25267&highlight=mp4v&sid=6cf9328ebab8517af5b92b79070d4b77, "In my opinion that's what FFdshow does best [crashing], unless you want to devote the rest of your life to configuring it. Unfortunately by then there will be a new version. :)"
- indeed when I tried version "FFdshow-20060810-rev2546.exe" and "ffdshow-tryouts-rev127.exe" (entitled "stable"), playing a AVC1 video-encoded movie with ViPlay works (Haali's splitter installed), but when trying to close ViPlay or stop the movie, it crashes. In the system trays, the splitter icon still replies to my clicks while ffdshow icon stays silent. And ViPlay never crashes llike that with any other video (not using ffdshow / MatroskaSplitter)...
- using a "fork of ffdshow implementing newest experimental patches" (http://sourceforge.net/project/showfiles.php?group_id=173941), is it really a good idea to obtain something stable?

That's why I wanted to use something else as a decoder than ffdshow, and possibly not embedded in the player... Does an alternative exist? Or which version of FFDShow should I use?

Thank you again!

Sharktooth
8th September 2006, 03:05
The FFDShow version on x264.nl is pretty much stable.

check
8th September 2006, 11:12
Install the CCCP. It's a codec pack that actually works (and is the only one I know that does ;)). The ffdshow concerns are all unfounded:
o everyone has different opinions, everyone is entitled to incorrect ones :P I'd bet a house he tried it once in 2002 and didn't even bother to install it correctly then either.
o ViPlay isn't the most compatible media player out there, I ran into a bunch of problems til I changed some stuff in the settings: http://www.cccp-project.net/wiki/index.php?title=Media_Players#ViPlay_3_.28Partially_Compatible.29
o 'Bleeding edge' with ffdshow is generally stable, you don't need to worry about instability.

I recommend the CCCP above because not only does it contain a super ultra omgstable build of ffdshow, on install it also does nifty things with the settings (ditto for the other components) so that it just works. Give it a try, but make sure you uninstall other codecs and any copies of media player classic or zoomplayer installed first.

Schmendrick
8th September 2006, 15:03
The Haali Splitter works well with MP4-files. AVC1 or H.264-streams can be properly decoded using CoreAVC-, Cyberlink- or Elecard-decoders without crashes. With most of theses stream I also was not able to obtain a flawless playback using ffdshow as decoder. Besides ffdshow all other decoders are commercial decoders.

Blue_MiSfit
9th September 2006, 06:28
Let's not forget about VLC. It pretty much just works with everything, without all the configurability and modularity of DirectShow.

And, its available for every valid OS.

~MiSfit

OlivierMiR
24th September 2006, 18:04
Thanks to everyone who replied!

After much tryouts, I found the following combination works for me:
- Media Player Classic
- no Haali splitter (not needed, done through MPC)
- ffdshow version from MPC site (ffdshow-rev2546-SSE2.exe)
- ffdshow activated for H264 decoding, NOT for xvid (because makes MPC crash when moving the cursor)
- XviD-1.1.0-30122005.exe for xvid decoding

Next challenge: make dvr-ms file decompression work (currently very slow!)...

Thank you again,
Olivier