How to build a quick and dirty subtitle player

tomf
Mon, 24 May 2021 07:16:09 +0000

On my desk I have two screens -- one off to the side for movies, TV, etc and my main in front. Sometimes I find myself wanting subtitles on my main screen. The main issue I've found, at least with macOS, is that the SRT players suck.

I figured, why not just generate a tiny black video with embedded subtitles?

ffmpeg -i subs.srt -t 3:00:00 -s 40x10 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero subs.mpeg

Set the ratio to be super small without being too small. This video is 40px by 10px and the video only takes a few seconds to generate. For me, this generated at ~850x speed.

From there, jack up the subtitle font size and shift it up a little bit so nothing gets cut off. This also works really well with tiling window managers.

Screenshot

Comments URL: https://tildes.net/~comp/wwy/how_to_build_a_quick_and_dirty_subtitle_player

Votes: 11

Comments: 2