[MPlayer-dev-eng] [PATCH] H.264 encoding in mencoder
snacky at ikaruga.co.uk
snacky at ikaruga.co.uk
Tue Aug 3 01:02:32 CEST 2004
Disclaimer: it might be unwise to even be posting in this thread, as I'm
not competent to code on this project. But I've been toying with this
patch some, and it's possible my observations about it will be useful
to someone. On the other hand, if my comments turn out to be worthless,
I hope nobody will be TOO disappointed.
Attila Kinali wrote:
> On Sun, Jul 11, 2004 at 06:50:18PM +0200, Bernhard Rosenkraenzer wrote:
> > Hi,
> > the attached patch (to current CVS) adds support for H.264 encoding to
> > mencoder (using the x264 library as found on
> > http://www.videolan.org/x264.html). [Tested with today's subversion snapshot,
> > but should work with the latest release as well.]
>
> > The bad news: mplayer can't play some of the resulting files ATM (from a quick
> > test, about 50% of the files could be played with mplayer) - vlc can play
> > quite a few other files generated w/ mplayer/h.264 [maybe someone more
> >familiar with codec internals can take a look?].
> Michael, could you please comment this patch ?
Line 262 of the patch contains this line:
+ for(int i=0; i<4; i++) {
i has already been declared once in this scope.
This is the only thing I know of that's "wrong" with the patch; other
stuff seems to work the way it was intended to, at least.
As for the performance of the patch: I am not competent to do serious
debugging, but I write hoping that my experiences will provide
pointers for those who are.
1. The encoder completely fails to open for videos with width or height
not divisible by 16. I realize there are probably a few people who think
this is a GOOD thing...
2. Sometimes the encoder dies due to colorspace problems, with the message
"invalid CSP (only I420 supported)." This can be triggered by using a
filter chain that includes -vf unsharp with (apparently) any parameters
at all.
3. Any time the encoder works, it automatically appends decoded video
output to fdec.yuv. (I actually ran out of disk space before I noticed
this.) This is something x264 does which I am not smart enough to change.
4. Somewhat contrary to the report of the patch submitter, I had
no problem generating files that mplayer will play, but only with the
setting bframe=0. Otherwise mplayer always crashes on decoding. This is
the case with nightly CVS from August 1. I have abslutely zero insight
or useful data into this.
Vague reports like this one are the reason for my gratuitous
warning/apology in the first paragraph of this message.
5. The encoder ignores the bitrate option, but the manpage doesn't
mention this fact.
These are the main notable things I've noticed about this patch so
far. The quality-per-bitrate you can get from this is really not bad,
especially considering the speed and the fact that most of your tuning
will be done through adjusting a constant qp. Anyway, I found it
intriguing to try out.
More information about the MPlayer-dev-eng
mailing list