将音频和视频轨道放在一起

将音频和视频轨道放在一起

我在三个不同的文件中有一个视频轨道 (xvid) 和两个音频轨道 (ac3),我想将它们放在一起。我成功了,但是有一个问题。这是我使用的命令:

ffmpeg -i video.avi -i audio_es.ac3 -i audio_en.ac3 -map 0:0 -map 1:0 -map 2:0 -vcodec copy -acodec copy -acodec copy  video2.avi -newaudio

这是输出

Fmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --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 Jan 24 2013 19:42:59, gcc: 4.4.3
    [avi @ 0x22be260]non-interleaved AVI
    Input #0, avi, from 'video.avi':
      Duration: 00:50:01.00, start: 0.000000, bitrate: 2988 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
    Input #1, ac3, from 'audio_es.ac3':
      Duration: 00:50:00.99, bitrate: 320 kb/s
        Stream #1.0: Audio: ac3, 48000 Hz, stereo, s16, 320 kb/s
    Input #2, ac3, from 'audio_en.ac3':
      Duration: 00:50:00.99, bitrate: 320 kb/s
        Stream #2.0: Audio: ac3, 48000 Hz, stereo, s16, 320 kb/s
    Output #0, avi, to 'video3.avi':
        Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 90k tbn, 25 tbc
        Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 320 kb/s
        Stream #0.2: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #1.0 -> #0.1
      Stream #2.0 -> #0.2
    Press [q] to stop encoding
    frame= 9796 fps=5319 q=-1.0 Lsize=  129383kB time=391.84 bitrate=2704.9kbits/s   
    video:110097kB audio:18368kB global headers:0kB muxing overhead 0.714597%

正如您在输出流中看到的,它不会将除第二个音频流之外的任何输入文件转换为 mp2(64kbps),而输入文件是 AC3(320kbps)。我不知道如何告诉 ffmpeg 不要转换任何文件。只需将它们按原样放在一起即可。

有谁能够帮助我?

相关内容