Re:FFmpeg Drawtext Filter for Overlays, Scrolling Text, Time...
by cm2187 on Friday October 23, 2020 @06:05AM
(#24867757)
Is it that a separate subtitle file is not supported or subtitles are not supported at all? Otherwise you can use ffmpeg to merge the srt file and the mp4 file into either a single mp4 or mkv file without re-encoding the video (using the -c copy flag). Many players support subtitles embedded into a .mp4 file.
[ Parent
| on HN ]
Re:FFmpeg Drawtext Filter for Overlays, Scrolling Text, Time...
by e12e on Friday October 23, 2020 @06:30PM
(#24875008)
^this. I'd be curious what player gp has found that can playback the mp4, but not read embedded subtitles. There are a few that have poor support for external (separate file) subtitles.
See eg: https://mutsinzi.com/add-srt-subtitles-to-quicktime/
TL;DR:
ffmpeg -i yourVideo.mp4 -i yourSubtitle.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng yourOutputVideo.mp4
I'm uncertain if there are some metadata you could toggle to hint at default subtitle language and/or default to subtitles on (or off). I generally use vlc, so this isn't much of a problem for me.
Re:FFmpeg Drawtext Filter for Overlays, Scrolling Text, Time...
by cm2187 on Saturday October 24, 2020 @04:34AM
(#24877794)
You can hint the video player with metadata.
To make the first subtitle track default:
-disposition:s:0 default
Or you can make it forced: -disposition:s:0 forced
And to clear the disposition of the second subtitle track (if it was default in the source stream) -disposition:s:1
The problem is that video players are inconsistent in term of how they honour these parameters.