View Single Post
Old 4th November 2010, 20:02   #1  |  Link
Klagar
Registered User
 
Klagar's Avatar
 
Join Date: Sep 2010
Posts: 46
FFmpeg : 2-Pass encoding - Xvid vs h264

Hi all !

I think I once saw this kind of question asked once on this forum, but I couldn't find it back. And anyways I believe no clear answer had been given on this particular subject, so I prefer to ask it again.

So I'm trying to test 2-pass encoding, and I'm having a hard time juste making my command lines work in FFmpeg.

First, here are the command lines I use. The first ones were to encode to Xvid :
Code:
ffmpeg.exe -y -i "C:/Documents and Settings/user/Desktop/video test/big_buck_bunny.avi" -pass 1 -passlogfile 2passtry.log -threads 2 -vcodec libxvid -vtag XVID -f mp4 -aspect 16:9 -r 25 -s 1280x720 -b 2000kb -minrate 2000kb -maxrate 2000kb -bufsize 2048k -an "C:/Documents and Settings/user/Desktop/video test results/bbb_2pass_tryr2_1.mp4"
ffmpeg.exe -y -i "C:/Documents and Settings/user/Desktop/video test/big_buck_bunny.avi" -pass 2 -passlogfile 2passtry.log -threads 2 -vcodec libxvid -vtag XVID -f mp4 -aspect 16:9 -r 25 -s 1280x720 -b 2000kb -minrate 2000kb -maxrate 2000kb -bufsize 2048k -acodec libfaac -ac 2 -ab 128kb -ar 44100 "C:/Documents and Settings/user/Desktop/video test results/bbb_2pass_tryr2_1.mp4"
And the second set was to encode in h264 :

Code:
ffmpeg.exe -y -i "C:/Documents and Settings/user/Desktop/video test/big_buck_bunny.avi" -pass 1 -passlogfile 2passtry.log -threads 2 -vcodec libx264 -f mp4 -aspect 16:9 -r 25 -s 1280x720 -b 512kb -minrate 512kb -maxrate 512kb -bufsize 2048k -an "C:/Documents and Settings/user/Desktop/video test results/bbb_2pass_tryr2_1.mp4"
ffmpeg.exe -y -i "C:/Documents and Settings/user/Desktop/video test/big_buck_bunny.avi" -pass 2 -passlogfile 2passtry.log -threads 2 -vcodec libx264 -f mp4 -aspect 16:9 -r 25 -s 1280x720 -b 512kb -minrate 512kb -maxrate 512kb -bufsize 2048k -acodec libfaac -ac 2 -ab 128kb -ar 44100 "C:/Documents and Settings/user/Desktop/video test results/bbb_2pass_tryr2_1.mp4"
(The code was given to me on another forum and I wanted to see if it worked "as is" and then adapt it to my needs)

As you can see, both sets are fairly similar, except for the -vcodec.
When I run the Xvid lines, it works perfectly. But when I run the h264 lines, it won't process the 2nd pass. Instead the command prompt will give me :
[libx264 @ 0x1725010]using SAR=1/1
[libx264 @ 0x1725010]using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.2

And then stop and prevent me from writing anything more in the window. Also, my .log file is empty (don't know if it's normal)...

Any idea why it would do that ?

Note that I only use Windows' command prompt. I don't know if some GUIs are made to circumvent this problem, but I don't use any and don't really intend to...

Last edited by Klagar; 4th November 2010 at 20:03. Reason: Error in the code
Klagar is offline   Reply With Quote