View Full Version : Closed captioning MP4s for web/iOS using JW player and SRT subtitles


Wade Spencer
March 11th, 2013, 11:04 AM
Anyone have any experience with this?

I have about 1000 video clips that currently closed-captioned in Flash (the project started several years ago and this was the best option at the time). We want to update the video library in higher resolution (was all shot in HD) and update the closed captioning to work on iOS devices as well.

The site will be produced on the Wordpress platform, and we'll be using the JW Player (Captions Plugin Reference Guide | LongTail Video | Home of the JW Player (http://www.longtailvideo.com/support/addons/captions-plugin/14974/captions-plugin-reference-guide/#srt)).

The best method I've discovered through reading is to use MP4s (which we'd want to anyway) and add an SRT file using Handbrake for the captions.

Our existing XML files (from the Flash closed-captioning) can be converted to .SRT files, but I'm having trouble after that, and I cannot figure it out for the life of me. I even tried just typing a few lines of one by hand to make sure nothing was going wrong.

A simple test would be the play the .MP4 in VLC, and try and display the captions using the .SRT file. When I do that though, I get this:

Droplr • Screenshot 2013-03-11 at 12.30.51.png (http://d.pr/i/Df3S)

That tells me something is wrong with the .SRT file, but I can't figure out what? It's encoded with UTF-8, which should be correct. I can upload it if needed.

When I try to add it in Handbrake, then view the MP4 with the captions in Quicktime, I see nothing. Maybe because something is wrong with the .SRT file? Not sure...

Has anyone done any work at all with this sort of thing? I'm really at my wits end here...

Thanks so much for any help!

Seth Bloombaum
March 31st, 2013, 04:53 PM
I'm new to captions, just been working with them for a couple days. So far no success in JWPlayer, but I have had success with muxing an srt file into an MP4 in Handbrake that will display in VLC.

The srt contents should look like this:
1
00:01.00,000 --> 00:01:12,000
This would be some text here

2
00:01:12,500 --> 00:01:20,300
This would be some more text here,
and it can flow onto the second line.
The leading numbers are needed. (1, 2, etc.) in an srt, but not in some other formats.
The time format is hours:minutes:seconds,milliseconds, and all places must have something in them as above.

I've found some good online resources, including an editor that can convert between several caption formats including srt and vtt, and will likely catch any formatting errors. Find it here: http://nikse.dk/SubtitleEdit/

I'd like to get external srts or vtts linked up with JWPlayer, as managing the text externally to the media seems like the only efficient way to associate captions with media when I'm working with multibitrate, of which I already have a sizable content library on a particular project. I really don't want to re-encode it all to mux in the captions.