【问题标题】:ffmpeg, replace part of audio in mp4 video fileffmpeg,替换mp4视频文件中的部分音频
【发布时间】:2016-01-04 10:35:48
【问题描述】:

我想使用 ffmpeg 将一个 mp4 文件中的部分音频替换为另一个 mp3 文件的一部分。 这就是我想要做的:

ffmpeg -i 2009.mp4 -i birds.mp3 -filter_complex "[0:a]atrim=end=45,asetpts=PTS-STARTPTS[aud1];[1:a]atrim=0:18,asetpts=PTS-STARTPTS[aud2];  [0:a]atrim=start=63,asetpts=PTS-STARTPTS[aud3]; [aud1][aud2][aud3]concat=n=3:v=0:a=1[aout]"  -map 0:v -map "[aout]" -c:v copy   output.mp4

它给了我这个错误:

[NULL @ 000000000596e020] 找不到合适的输出格式 'ffmpeg' ffmpeg:参数无效

【问题讨论】:

    标签: ffmpeg


    【解决方案1】:

    我解决了我的问题,现在一切正常。 我想用另一个 mp3 文件替换 mp4 文件中前 60 秒的音频,并在最后 3 秒内淡出该音频。正确的代码是:

     -y -i  C:\videotemp\temp.mp4 -i intro-mpdified.mp3 -filter_complex "[0:a]atrim=start=60,asetpts=PTS-STARTPTS[aud1];[1:a]atrim=0:60,afade=t=out:st=57:d=3,asetpts=PTS-STARTPTS[aud2];  [aud2][aud1]concat=n=2:v=0:a=1[aout]"  -map 0:v -map "[aout]" -c:v copy -c:a  libmp3lame C:\videotemp\tempnew.mp4
    

    【讨论】:

      猜你喜欢
      • 2016-03-05
      • 2014-07-29
      • 1970-01-01
      • 2016-06-16
      • 1970-01-01
      • 2012-05-24
      • 2013-01-10
      • 2021-12-23
      • 1970-01-01
      相关资源
      最近更新 更多