0

Is it possible to create a video file that contains a soft subtitle and shows it by default (as soon as you open it in VLC - without the need to activate the subtitle track) from an original video file and the appropriate subtitle file?

I have tried the following:

ffmpeg -i input.mp4 -i input.ass -c:v copy -c:a copy -c:s copy -map 0:0 -map 0:1 -map 1:0 -y out.mkv

The resulting out.mkv does contain the subtitle but it does not show by default. Thanks for your help.

dexter
  • 530
  • 7
  • 19

2 Answers2

1

The answer I was looking for is found here. In short it would be something like:

mkvmerge -o out.mkv -S "input.mp4" --language "0:eng" --track-name "0:Forced" --forced-track "0:yes" --default-track "0:yes" "input.srt"
dexter
  • 530
  • 7
  • 19
-1

This works for me:

Convert subtitle to "ass" format:

ffmpeg -i english.srt english.ass

Then play the video with the video filter like so:

ffplay -vf ass="english.ass" video.mp4

This way you don't have to merge the subtitles into the video.

quirinpa
  • 47
  • 1
  • 3