[MEncoder-users] Encoding with x264 Jittery Result

Andrew Savchenko Bircoph at list.ru
Wed Jan 2 22:27:44 CET 2008


Hi,

On Saturday 29 December 2007 07:13, James Hastings-Trew wrote:
[...]
> When you say "jittery" do you mean that the frames appear to
> leap backwards and forwards through time? It's probably
> something to do with b-frames. I personally have never gotten
> them to work using any of the examples in the manual, and have
> since avoided them entirely.
>
> If someone could post an honest to goodness example of how to
> get mencoder to spit out a proper .264 stream that uses b-frames
> and how to properly mux it with audio into a .mp4 container I'd
> love to try it out. The example in the manual just does not
> work.

Usually I use the following code to produce x264 with b-frames:
1st pass:
mencoder -ovc x264 -oac copy -x264encopts 
bitrate=950:subq=7:frameref=16:partitions=all:8x8dct:bframes=4:b_pyramid:weight_b:mixed_refs:brdo:qcomp=0.7:keyint=750:pass=1:turbo=1 
-vf crop=336:480:10:0 -force-avi-aspect 1.27272727272727272726 
VTS_01_${i}.VOB -o /dev/null
2nd pass:
mencoder -ovc x264 -oac copy -x264encopts 
bitrate=950:subq=7:frameref=16:partitions=all:8x8dct:bframes=4:b_pyramid:weight_b:mixed_refs:brdo:qcomp=0.7:keyint=750:pass=2         
-vf crop=336:480:10:0 -force-avi-aspect 1.27272727272727272726 
VTS_01_${i}.VOB -o video_${i}.avi

Codec options are optimized for anime encoding and for my personal 
taste. Bitrate depends on the original movie quality, and of 
course, crop and aspect ratio are movie dependent too. Also these 
encoding options are extremely CPU-hungry, so you need a powerful 
system, or a lot of time, or reduce some of them.

Next I recode sound with something like this:
mplayer -ao pcm:fast -vc null -vo null VTS_01_${i}.VOB
oggenc -b 160 audiodump.wav -o sound_${i}.ogg

and finally I create matroska files using mkvmerge.

I have never experienced problems with b-frames this way (and I 
always use SVN version of mplayer and x264). Hopefully, this will 
help you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20080103/1d901d20/attachment.pgp>


More information about the MEncoder-users mailing list