[FFmpeg-user] Replacing an audio stream in an MP4
gyandoshi at gmail.com
Mon May 7 07:50:41 EEST 2018
On 5/7/2018 6:26 AM, Dan Bridges wrote:
> 1. Is this the most efficient way to perform this task? Could I mux the
> AVC stream in test.mp4 with the AAC stream in replacement.mp4 without
> first demuxing them. That is, could this all be performed in one FFMPEG
No need to demux to separate files first.
ffmpeg -i test.mp4 -i replacement.mp4 -map 0:v -map 1:a -c copy
This will also be devoid of the PTS msgs, which were due to your use of
.h264, which is a raw stream without timestamps.
More information about the ffmpeg-user