very newbie question about two-pass ffmeg and resizing videos
I posted the following on the mencoder list, but have been correctly referred here. I must apologize for my ignorance of ffmpeg and video encoding generally. I really am new in this area. I have two questions, one about doing two-pass conversions, and the other about the size flag. Note that is the copy of the post below I do realize ffmpeg has highlighted the error,: [mpeg4 <at> 0x2b29c483c6d0]requested bitrate is to low but I simply don't understand. In the one-pass conversion I did not specify the bit rate (nor actually do I understand the implications of the 'bit rate'), and don't understand why it failed on the two-pass mode. I am learning, but really could use some gentle guidance. Thanks ------ copy of mencoder post ---- My immediate question was posted on a ubuntu linux (Feisty Fawn, 7.04 AMD64) forum, and was about ffmpeg rather than mencoder. Both are working on my system, and an answer to the question using either would be fine. I am an intermediate linux user, but a newbie with video conversion. Here is what I posted on the ubuntu forum: I am working on an instructional webpage and want to show some videos. We have chosen quicktime containers (either .mp4 or .mov) to support as many systems as possible. One objective of the project is to use only open-source software. The videos were captured using Kino and exported as mpeg (DVD) files. I'm learning to use ffmpeg to encode them to .mov containers. My system is feisty AMD64 and has working copies of ffmpeg (from medibuntu) mencoder and mplayer. The following works fine: ffmpeg -i test.mpg -sameq test4.mov But I am having trouble doing two pass encoding. I think I just don't understand the syntax for two-pass work. I tried the following: ffmpeg -i test.mpg -sameq -pass 1 temp.mov ffmpeg -i test.mpg -sameq -pass 2 test.mov The ffmpeg2pass-0.log is created on the first pass, but the second pass dies with johnwren <at> johnwren-AMD64:~/test$ ffmpeg -i test.mpg -sameq -pass 2 test.mov FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-gpl --enable-pp --enable-pthreads --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm --enable-dc1394 --disable-debug --enable-mp3lame --enable-faadbin --enable-faad --enable-faac --enable-xvid --enable-x264 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr libavutil version: 0d.49.0.0 libavcodec version: 0d.51.11.0 libavformat version: 0d.50.5.0 built on Mar 25 2007 22:39:13, gcc: 4.1.2 (Ubuntu 4.1.2-0ubuntu4) Input #0, mpeg, from 'test.mpg': Duration: 00:01:21.6, start: 0.184656, bitrate: 2656 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 7500 kb/s, 25.00 fps(r) Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s Output #0, mov, to 'test.mov': Stream #0.0: Video: mpeg4, yuv420p, 720x576, q=2-31, pass 2, 200 kb/s, 25.00 fps(c) Stream #0.1: Audio: aac, 48000 Hz, stereo, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 [mpeg4 <at> 0x2b29c483c6d0]removing common factors from framerate [mpeg4 <at> 0x2b29c483c6d0]requested bitrate is to low Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Hi Jon, I too am quite new to ffmpeg .. For two pass encoding the syntax I used was ffmpeg [input options] [output options] -pass 1 -passlogfile outlogfile out-moviefile ffmpeg [input options] [output options] -pass 2 -passlogfile outlogfile out-moviefile In my case I use ffmpeg -i /Users/hari/forward_rewind/1/036ae9da6bdf677689b695d3d646e1d3.mov -y -map 0.1:0.0 -f flv -vcodec flv -b 504k -aspect 4:3 -s 1056x608 -r 3.50 -g 20 -me epzs -qmin 2 -qmax 15 -acodec libmp3lame -ab 56 -ar 22050 -ac 2 -map 0.0:0.1 -benchmark -pass 1 -passlogfile /Users/hari/forward_rewind/1/outgui_new2.flv /Users/hari/forward_rewind/1/outgui_new2.flv AND for pass two fmpeg -i /Users/hari/forward_rewind/1/036ae9da6bdf677689b695d3d646e1d3.mov -y -map 0.1:0.0 -f flv -vcodec flv -b 504k -aspect 4:3 -s 1056x608 -r 3.50 -g 20 -me epzs -qmin 2 -qmax 15 -acodec libmp3lame -ab 56 -ar 22050 -ac 2 -map 0.0:0.1 -benchmark -pass 2 -passlogfile /Users/hari/forward_rewind/1/outgui_new2.flv /Users/hari/forward_rewind/1/outgui_new2.flv I found that ffmpeg needs the passlogfile to be in the same directory as the movie and explicitly stating that made it start working. The above commands create a logfile called outgui_new2.flv-0.log in the specified directory. Hope this helps Hari
participants (2)
-
harijay@gmail.com -
johnwren@anet.net.th