11 votes

How to build a quick and dirty subtitle player

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

2 comments

  1. [2]
    Adys
    Link
    Ha, super neat idea!

    Ha, super neat idea!

    3 votes
    1. tomf
      Link Parent
      thanks! I was using this Penguin one, but it would run out of sync by upwards of 10s every fifteen or twenty minutes. :)

      thanks! I was using this Penguin one, but it would run out of sync by upwards of 10s every fifteen or twenty minutes. :)

      1 vote