View Full Version : Influence of decoder on x264 decoding
JimmyBarnes
5th February 2011, 02:39
When you transcode H264/VC-1 video from a Blu-ray to x264, does x264.exe have its own decoder or does it rely on whatever H264/VC-1 decoder happens to be in effect in your PC?
TIA
JB
Video Dude
5th February 2011, 02:51
Your choice. You can specify to use lavf or use a DirectShow decoder like FFDShow.
JimmyBarnes
5th February 2011, 03:05
Your choice. You can specify to use lavf or use a DirectShow decoder like FFDShow.
What is "lavf"?
Is x264 able to decode? Isn't it for encoding only?
linyx
5th February 2011, 03:23
Is x264 able to decode? Isn't it for encoding only?
Yes it can both decode and encode (although the encoding part isn't optional.;))
See here (http://git.videolan.org/?p=x264.git;a=commit;h=8b9dcd8d50be201f1bedc9b19331432969f37d98).
LoRd_MuldeR
5th February 2011, 14:51
What is "lavf"?
Is x264 able to decode? Isn't it for encoding only?
x264 is a H.264 encoder library. So you are correct: It does encoding only.
Nonetheless the x264 CLI front-end (aka "x264.exe"), which most people use, does support input of various video formats (including H.264), thanks to FFMS2 (FFmpegSource2).
Still in that case all the decoding work is done by FFmpeg/libavcodec, not by the x264 library itself!
Note that usually both, libx264 and libavcodec, are linked statically into the 'x264.exe' executable, so you don't see them as separate DLL files. You just a see one 'big' x264 EXE file.
Also, to answer your initial question, when you use x264.exe with its "built-in" FFMS2 decoder, it does NOT matter what H.264 decoders you have "installed" on your system.
(It would matter, if you used Avisynth input with AVISource(), DirectShowSource() or DSS2(), for example)
Priapismic
9th February 2011, 12:25
It is good that JimmBarnes asked this question, because there are quite a few of us trying to get our heads around the "whys" of .x264.exe.
In light of the above, I still don't understand why VC-1 needs to be set to wmv9 in ffdshow, in order for BD-RB to do it's work....because doesn't .x264 have all it needs?
LoRd_MuldeR
9th February 2011, 12:44
It is good that JimmBarnes asked this question, because there are quite a few of us trying to get our heads around the "whys" of .x264.exe.
In light of the above, I still don't understand why VC-1 needs to be set to wmv9 in ffdshow, in order for BD-RB to do it's work....because doesn't .x264 have all it needs?
If you use x264 with built-in FFMS2 decoder, then it doesn't matter at all what DirectShow filters you have installed (with the only exception of Haali Media Splitter, which is used for TS parsing) or how you have configured them. This includes ffdshow. If however you use Avisynth-input with either DirectShowSource() or DSS2(), then of course you will require a suitable DirectShow decoder. And in that case whatever DirectShow filter is used for decoding has to be configured properly...
Ghitulescu
9th February 2011, 17:24
Are all the available decoders equal in terms of quality (nevermind speed or memory)?
LoRd_MuldeR
9th February 2011, 17:30
For decoders there is no "better" or "worse" quality. There is only "correct" or "incorrect" output for a given input stream.
And generally I would assume that FFMS2 (libavcodec) does give correct output for a certain video format, unless there is an indication for the opposite! (H.264 with MBAFF seems to be problematic sometimes)
Actually going the DirectShow route is much more error-prone, as DirectShow sometimes puts together "bizarre" graphs.
(I have seen cases where DirectShow couldn't connect the decoder-filter to the sink directly for whatever reason and thus decided to put another pair of encoder+decoder in between ^^)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.