ffmpeg multiple inputs ss on only one of them

Viewed 489

I want to put audio on top of video.

I use

ffmpeg -i video -i audio -map 0:v:0 -map 1:a:0 out

But I want the audio to start at 0:28 (the zeroth second of out's audio is the 28th second of audio's audio)

So I tried

ffmpeg -i video -i audio -ss 28 -map 0:v:0 -map 1:a:0 out

I had hoped that since I did -ss after audio specifically it would be applied only to that input, but actually the video is also started at 28 seconds in.

How can I include the video entirely, but skip the first 28 seconds of the input audio?

1 Answers

Seek on inputs go before that input.

ffmpeg -i video -ss 28 -i audio -map 0:v:0 -map 1:a:0 out
Related