FFMPEG Concat Audio at timestamp

喜夏-厌秋 提交于 2021-02-08 08:18:24

问题


I'm attempting to concat two mp3 audio files (fileA and fileB) at a specific timestamp for a specific duration only. Such that the audio in file A is replaced with that in file B for the aforementioned duration. Thus the end result should be:

FileA - FileB(for duration) - FileA

Can this be done with FFMPEG?


回答1:


Yes. Assuming both files have the same sampling rate and channel count, you would create a text file like this,

file a.mp3
outpoint 45
file b.mp3
inpoint 0
outpoint 23
file a.mp3
inpoint 68

and then run

ffmpeg -f concat -i text -c copy out.mp3

The sequence of the output will be A START-45 + B 0-23 + A 68-END



来源:https://stackoverflow.com/questions/52920025/ffmpeg-concat-audio-at-timestamp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!