Hardcoding .SRT to behave like YouTube's captioning?
July 7, 2018 11:36 AM   Subscribe

I used YouTube's auto-generated captioning to get the timings right for subtitles for a video of mine -- with aims, after a long clean up, of burning subtitles into the original .MP4. YouTube positions two lines of captions on the screen. So, the timings might end up being something like segment A 0:02-0:06, segment B 0:04-0:08, segment C from 0:06-0:10, etc. This flows great at YouTube,

where in this case at 0:06 segment A leaves the screen, segment B moves to the top line, and segment C emerges at the bottom line...at 0:08, when B leaves, C moves up, and D enters below. However, whenever I try to burn in this .SRT with VLC or Handbrake, segment C enters and stays up on the newly opened line above segment B for 0:06-0:08, instead of segment B re-positioning to the top line, and so on. So, I'd really appreciate any ideas on making my .SRT file work with a desktop video player/editor that can properly hardcode the intended flow here. Thanks.
posted by glibhamdreck to Computers & Internet (4 answers total) 1 user marked this as a favorite
 
You might try using FFmpeg to apply the subtitles (it's a command line tool so you'll need to be prepared for that). It's a very powerful/flexible video processing tool which supports subtitling if compiled with libass (hee!). I assume you're on windows; if so you can get a version of ffmpeg compiled with the needed support here (which I found via this site). Instructions for adding subtitles can be found here, but it's basically:

ffmpeg -i yourvideo.mp4 -vf subtitles=yoursubtitles.srt video_with_subtitles.mp4
posted by axiom at 12:47 PM on July 7, 2018


From what I can tell, SRT only supports the ability to say "at this time, show these subtitles", and doesn't have the ability to scroll the subtitles like youtube does with automatic captions (or like live TV closed-captioning does). You might be able to partially mimic the effect by duplicating a bunch of your captions at each time-code, but you wouldn't get the nice "scroll-up" animation.

It might be helpful if you posted some or all of your SRT file somewhere to see what you currently have.
posted by Aleyn at 1:22 PM on July 7, 2018 [1 favorite]


SRT doesn’t natively support scrolling subtitles; if you’ve seen an SRT do that, it’s because of the player and not the file format. SCC might support scrolling captions but has other character-per-frame limits.

I often use Subtitle Edit for quick-and-dirty SRT edits and conversions.
posted by infinitewindow at 4:37 PM on July 7, 2018


You might be able to do this with Aegisub (see here for some tutorials) and subtitle format other than SRT.
posted by neushoorn at 12:32 AM on July 8, 2018


« Older Stick a rocket up a gas giant's backside?   |   what are the risks of lead paint in converted barn... Newer »
This thread is closed to new comments.