reikje
reikje

Reputation: 3064

How can you properly fade out a video with subs and two audio streams in ffmpeg

I am combining a video stream, one audio stream (music), another audio stream with offset (speech) and subtitles. Now I am trying to fade out everything towards the end. I got it to work without the subtitles. Once I add the subtitles, the result no longer fades out properly. Here is what I am trying:

ffmpeg -ss 00:00:00 -i galaxy.mp4 -i acoustic.m4a -itsoffset 00:00:03 -i speech.m4a -to 00:00:15 \
  -vf "fade=t=out:st=10:d=5" \
  -vf "subtitles=speech-resync.srt" \
  -af "afade=t=out:st=10:d=5" \
  -map 0:v -map 1:a -map 2:a -c:v libx264 -c:a aac output.mp4 -y

If I remove the -vf "subtitle s=speech-resync.srt" argument, I get a working fade out but no subs. Ideas anyone?

Upvotes: 0

Views: 148

Answers (1)

kesh
kesh

Reputation: 5493

Can't have multiple -vf options. Combine them as a single filter chain:

  -vf "fade=t=out:st=10:d=5,subtitles=speech-resync.srt"

Upvotes: 1

Related Questions