On Sat, Mar 18, 2006 at 10:42:23AM +0900, Joe Friedrichsen wrote: > Nicolas wrote: > >An intermediate .mov file is necessary in order to encode in 2 pass mode > >with ffmpeg or mencoder. > > No, it isn't. I've done 2-pass encoding for x264 like this: > > For the first pass, render the audio as wav, and use the YUV4MPEG stream > for video. I called my output file "hiQ-x264-shizuocha.avi", so % takes > that. The pipe settings are: > > mencoder - -audiofile ./rendered/final-cut-direct.wav -oac lavc > -lavcopts acodec=ac3 -noaspect -noskip -ovc x264 -x264encopts > crf=20:subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:pass=1 > > -passlogfile hiQ-pass1.log -o % > > And for the second pass: > > mencoder hiQ-x264-shizuocha.avi -oac copy -noaspect -noskip -ovc x264 > -x264encopts > bitrate=1000:crf=20:subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:pass=2 > > -passlogfile ../hiQ-pass1.log -o hiQ-x264-shizuocha-p2.avi > > It's quite possible, and very nice! You could even do n-pass encoding in > this way. > > hth, > Joe
You second pass starts and use the logfile of the first pass when the first pass isn't finished. This is extracted from the mplayer documentation, in the "Encoding with the x264 codec" section : "Two pass encoding: Above, it was suggested to always use two pass encoding, but there are still reasons for not using it. For instance, if you are capturing live TV and encoding in realtime, you are forced to use single-pass. Also, one pass is obviously faster than two passes; if you use the exact same set of options on both passes, two pass encoding is almost twice as slow." The way 2 passes encoding works with Divx and x264 is different. The way you encode your video, since the first pass isn't finished, the second pass doesn't know how complex are the parts of the movie which aren't encoded by the first pass. Therefore, bytes utilization isn't optimized. Anyway, I don't encode into x264. I need the best quality of course, by first of all, I want my videos to be seen by everybody. That's why I also encode into .flv format (but only for web streaming, in small size). A lot of people can't even read Divx videos, and since my videos are seen by thousands of people, I can't spend 1 hour with each people explaining where to download a codec and how to install it. I think you should test your "YUV4MPEG stream 2 pass encoding" method on a 10 minutes video. The first 5 minutes with low action scenes, like slow travellings. And the last 5 minutes with fast action. Then, use your method. And then export as .mov file, and encode with 2 pass mode, and compare. You should use a low bitrate to spot differences easily. Then, tell use the difference. Nicolas -- -------- Conti ---------------- O -- Kawasaki-Nikon-Linux --- ._ /\_> ------- Powered ----------- (x)> (x) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ Cinelerra mailing list [email protected] https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
