Lets say I have sample video named "samplevideo" and sample audio named "sampleaudio". I want to replace the audio of the samplevideo with the sampleaudio starting from 5 sec to 12 sec. Until 5 sec mark the video audio won't change, then sampleaudio starts and lasts for 7 sec.
I tried to come up with ffmpeg command that solves this problem:
ffmpeg -i samplevideo.mp4 -i sampleaudio.aac -ss 20 -map 0:v -map 1:a -c:v copy output.mp4
Problem:
It cuts video starting from 20 sec time mark. What I want is to persist the video and the original audio stream until it hits desired time mark and then use sampleaudio until desired end time.
I would appreciate any help.