ATTEMPT # 1 em um arquivo avi mp3 laced:
Eu quero emendar a primeira parte de um filme que tenho. Aqui está o comando que eu usei:
ffmpeg -i file.avi -ss 0 -t 90 -acodec copy -vcodec copy output-4.avi
Aqui está o resultado do comando:
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 4 2010 12:35:30, gcc: 4.4.3
[NULL @ 0x92e0570]Invalid and inefficient vfw-avi packed B frames detected
Seems stream 0 codec frame rate differs from container frame rate: 29.98 (65535/2186) -> 29.97 (2997/100)
Input #0, avi, from 'file.avi':
Duration: 01:30:57.84, start: 0.000000, bitrate: 1075 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 512x288 [PAR 1:1 DAR 16:9], 29.97 tbr, 29.97 tbn, 29.98 tbc
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 32 kb/s
File 'output-4.avi' already exists. Overwrite ? [y/N] y
Output #0, avi, to 'output-4.avi':
Stream #0.0: Video: mpeg4, yuv420p, 512x288 [PAR 1:1 DAR 16:9], q=2-31, 90k tbn, 29.97 tbc
Stream #0.1: Audio: 0x0055, 48000 Hz, stereo, s16, 32 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 2698 fps= 0 q=-1.0 Lsize= 8995kB time=90.02 bitrate= 818.5kbits/s
video:7342kB audio:1490kB global headers:0kB muxing overhead 1.847673%
Existe uma inconsistência. A saída do áudio é 0x0055
, enquanto a entrada é mp3
. Porque isto é assim? Então eu não tenho o pacote mp3
adequado?
Quando abro o vídeo, o áudio fica claramente confuso, pois parece muito distorcido, como canais de áudio conjugados. O vídeo parece intacto.
ATTEMPT # 2 em um arquivo mpg com mp2:
Como comparação, eu consegui unir um MPEG que tinha o mp2 audio bem:
Comando original:
ffmpeg -i file.mpg -ss 15 -t 60 -acodec copy -vcodec copy output-2.mpg
Resultado:
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 4 2010 12:35:30, gcc: 4.4.3
Input #0, mpeg, from 'file.mpg':
Duration: 00:15:36.76, start: 0.339000, bitrate: 1394 kb/s
Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x240 [PAR 200:219 DAR 880:657], 1150 kb/s, 29.97 tbr, 90k tbn, 29.97 tbc
Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s
File 'output-2.mpg' already exists. Overwrite ? [y/N] y
Output #0, mpeg, to 'output-2.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 352x240 [PAR 200:219 DAR 880:657], q=2-31, 1150 kb/s, 90k tbn, 29.97 tbc
Stream #0.1: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg @ 0x8b0a1a0]buffer underflow i=1 bufi=0 size=731
frame= 1799 fps= 0 q=-1.0 Lsize= 10154kB time=75.42 bitrate=1103.0kbits/s
video:8429kB audio:1651kB global headers:0kB muxing overhead 0.724915%
EDIT # 1: Como por fedeli aqui está a saída de ffmpeg -formats | grep mp3:
ffmpeg -formats | grep mp3
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 4 2010 12:35:30, gcc: 4.4.3
DE mp3 MPEG audio layer 3
D A mp3 MP3 (MPEG audio layer 3)
D A mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A mp3on4 MP3onMP4
text2movsub remove_extra noise mov2textsub mp3decomp mp3comp mjpegadump imxdump h264_mp4toannexb dump_extra