在某个偏移量处使用ffmpeg将音频添加到mp4,输出文件#0不包含任何流

时间:2018-05-18 14:09:39

标签: ffmpeg mp3 mp4

我正在尝试在特定时间使用ffmpeg将音频添加到MP4文件中,最终我还希望音频只播放到某个点,所以如果你能帮助它也会很棒,否则如果你可以帮助我找出造成这个错误的原因。

我使用的论据

-y "E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4" -itsoffset  -i "E:\Downloads\wetransfer-250b26\05 Call of Love.mp3" -map 0:0 -map 1:0 -c:v copy -shortest "E:\Documents\Content Bar\Photo Booth\PhotosDrop\2018-05-15 14-01-16OUTOUT.mp4"

这会导致以下错误:

ffmpeg version N-81646-gc19da0c Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 55.101 / 57. 55.101
  libavformat    57. 48.103 / 57. 48.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Output #0, mp4, to 'E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4':
Output file #0 does not contain any stream

1 个答案:

答案 0 :(得分:0)

好的,所以我使用以下命令

计算出来
-i "E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4" -i "E:\Downloads\wetransfer-250b26\05 Call of Love.mp3" -filter_complex "[1]atrim=end=20,asetpts=PTS-STARTPTS[aud1];[aud1]adelay=6000|6000[aud];[0][aud]amix" -c:v copy out.mp4