So, what I understand is that first pass is to get informations for second... I've heard that the more pass you do the smallest is your file. Trying to get from a VOB file a mpeg-4 file, I'm having following function, could anybody help me?
My Function:
avconv -i $fileName -threads auto -c:v libx264 -preset veryslow -pass 1 /dev/null;
logInfo "First Pass done! doing second......"
avconv -i $fileName -pass 2 -threads auto -c:v libx264 -preset veryslow ${targetFile};
result:
pg@pipoTower: /var/autofs/removable/usbData/movies/.../VIDEO_TS$ source ~/bin/audio_video_conversions.sh ;my_convert_to_mpeg4_2pass VTS_01_1.VOB
INFO --> Converting with 2 passes source file:VTS_01_1.VOB- date is Fri Aug 30 15:15:28 CEST 2013
INFO --> Target file name:VTS_01_1_20130830_151528.mp4-
avconv version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
built on Mar 30 2013 22:20:06 with gcc 4.7.2
[mpeg @ 0x11d6b80] max_analyze_duration reached
Input #0, mpeg, from 'VTS_01_1.VOB':
Duration: 00:17:10.62, start: 0.280000, bitrate: 8334 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 16:15 DAR 4:3], 8500 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Unable to find a suitable output format for '/dev/null'
INFO --> First Pass done! doing second......
avconv version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
built on Mar 30 2013 22:20:06 with gcc 4.7.2
[mpeg @ 0x1952b80] max_analyze_duration reached
Input #0, mpeg, from 'VTS_01_1.VOB':
Duration: 00:17:10.62, start: 0.280000, bitrate: 8334 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 16:15 DAR 4:3], 8500 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
[buffer @ 0x19620c0] w:720 h:576 pixfmt:yuv420p
[libx264 @ 0x195fd20] using SAR=16/15
[libx264 @ 0x195fd20] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX XOP FMA4 SSEMisalign LZCNT
[libx264 @ 0x195fd20] constant rate-factor is incompatible with 2pass.
Output #0, mp4, to 'VTS_01_1_20130830_151528.mp4':
Stream #0.0: Video: libx264, yuv420p, 720x576 [PAR 16:15 DAR 4:3], q=-1--1, pass 2, 90k tbn, 25 tbc
Stream #0.1: Audio: [0][0][0][0] / 0x0000, 48000 Hz, stereo, s16, 200 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Stream #0:1 -> #0:1 (ac3 -> libvo_aacenc)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
>
when it expects the command line to continue. Are you sure that you don't have any stray single or double quotes in the command you try to execute? (I tried the one from your post, and it does not exhibit that behavior when appending-pass 3
after the file name at the end.)-pass 3
, and see if it works. It worked for me (except I didn't have ffmpeg installed, but the shell behaved as one would expect).-pass 1
on the first pass,-pass 2
on the second and-pass 3
on the third, i.e. give the same command or similar three times, only changing the pass parameter.