Então, o que eu entendo é que o primeiro passo é obter informações para segundo ... Ouvi dizer que quanto mais você passa, menor é o seu arquivo. Tentando obter de um arquivo VOB um arquivo mpeg-4, estou tendo a seguinte função, alguém poderia me ajudar?
Minha função:
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};
resultado:
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