问题
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