<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial><FONT size=2>hi, i discussed this issue with
pengvado/akupenguin, the dev implementing x264 into mencoder, and he meant i
might file a bug report about this issue so here it is:</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i tried encoding with x264 with a compile made from
cvs on the 29/12/2004 (but the issue is also there with older
builds)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i used the following commandline from a .vob source
(together with some changed settings i describe below): </FONT></DIV>
<DIV><FONT face=Arial size=2>"C:\path\mencoder.exe" -ss 00:00:00.400 -frames 100
-noskip -mc 0 -sws 9 -vf crop=720:416:0:82,scale=640:256,harddup -vfm ffmpeg
"C:\path\source.vob" -ovc x264 -of avi -ffourcc VSSH -o
mencoder.avi</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i extracted the output to raw h.264 streams with
the avi2raw tool provided by the mpeg4ip project (available on sourceforge),
latest cvs, which is according to the devs able to handle avc-in-avi. - While
doing this the tool reported that there are "zero length frames" in different
amounts depending on the used settings in the output and also the total amount
of "correct" avc frame it was able to output</FONT></DIV>
<DIV><FONT face=Arial size=2>- also i noticed that mencoder reports about
"1 duplicate frame(s)" during encoding, leading to one frame being too few in
the output (independant of the zero length frames)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>to be able to avoid that problem i tried the
following things, also in combination:</FONT></DIV>
<DIV><FONT face=Arial size=2>1) -noskip</FONT></DIV>
<DIV><FONT face=Arial size=2>2) -vf harddup</FONT></DIV>
<DIV><FONT face=Arial size=2>3) -vfm ffmpeg (in contrary to default decoding
with libmpeg2)</FONT></DIV>
<DIV><FONT face=Arial size=2>4) -mc 0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i got the following findings:</FONT></DIV>
<DIV><FONT face=Arial size=2>- decoding with ffmpeg (-vfm ffmpeg), no -noskip,
with -vf harddup: 1 zero length frame gets reported by avi2raw, also during
encoding with mencoder i get a "1 duplicate frame(s)" message (also the
avi2raw tool writes 98 frames of the desired 100 frames)<BR>- decoding with
ffmpeg, using -noskip and harddup: 3 zero length frames reported, but no "1
duplicate frame(s)" message during encoding (97 frames written)<BR>- decoding
with ffmpeg, no -noskip, no harddup: 2 zero length, 1 duplicate frame (97 frames
written)<BR><BR>- decoding with libmpeg2 and no -noskip, with harddup: no zero
length frame reported! but during encoding "1 duplicate frames" (99 frames
written)<BR>- decoding with libmpeg2 and -noskip, with harddup: 2 zero length
frames, no duplicate message (98 frames written)<BR>- decoding with libmpeg2, no
-noskip, no harddup: 1 zero length frame, 1 duplicate (98 frames
written)<BR><BR><BR><I>doing the math, pointing out the problems:</I><BR>- not
using -noskip leads to the removal of 1 (not zero length) frame (called
"duplicate frame" during encoding) during encoding with both ffmpeg and libmpeg2
and outputting 1 frame too few independant of the zero frames issue <BR>- using
noskip on the other side also leads to that two frames of the output are zero
length frames with both ffmpeg and libmpeg2<BR><BR>independant of using
-noskip:<BR>- using ffmpeg as decoder leads to that two frames of the output are
zero length frames<BR>- using libmpeg2 as decoder leads to that one frame of the
output is a zero length frame<BR><BR>- using harddup removes 1 zero length frame
with both ffmpeg and libmpeg2<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>- adding/removing "-mc 0" gives exactly the same
results<BR></FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>if i didnt made a mistake thats the only solution
fitting my findings<BR>note that i never used b-frames in my
tests!!!</FONT></DIV>
<DIV><FONT face=Arial size=2>you might want to read up a discussion about it on
the doom9 forum, but i think i wrote all details here already: <A
href="http://forum.doom9.org/showthread.php?s=&threadid=83039&perpage=20&pagenumber=5">http://forum.doom9.org/showthread.php?s=&threadid=83039&perpage=20&pagenumber=5</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>cheers</FONT></DIV>
<DIV><FONT face=Arial size=2>bond</DIV></FONT></BODY></HTML>