2

I am going to be working on a video project that needs closed captioning. The requirement we got from the client says....

Closed Captioning

  • Embedded Timed Text subtitle track (ISO/IEC 14496-17)

After doing some research I haven't been able to find anything that would let you embed a Timed Text file into a video. Is that even possible? What would be the process for accomplishing this? I am using Adobe Premiere.

2 Answers 2

1

http://en.wikipedia.org/wiki/MPEG-4_Part_17 "Timed Text" Format comes in many flavors

example tools would be ffmpeg, subler, mp4box

1

If you can use mkv instead of mp4 as your container format, there is widespread player and muxer support for various subtitle formats in matroska. (widespread throughout free / open source software. I can't comment on other players.)

Then you can use SRT, ASS, and many other text subtitle formats. You can even use bitmap sub formats like VOBSUB (dvd) or PGS (blu-ray).

wikipedia has an interesting table of subtitle formats.

To properly answer your question, though, I just tried muxing SRT subs into an mp4. It doesn't work.

ffmpeg -i in.mkv -i in.srt -c copy /var/tmp/out.mkv # works
ffmpeg -i in.mkv -i in.srt -c copy /var/tmp/out.mp4 # just timestamps

The mp4 has a mov_text stream, but displaying it in mpv just shows "00:00:00.000" or some other timestamp, with no text. Ok, apparently ffmpeg doesn't get it right unless you specifically use -c:s mov_text. If you use -map 0 -map 1, I get

  Stream #1:0 -> #0:2 (subrip (srt) -> ? (?))
Encoder (codec none) not found for output stream #0:2

(My subs are in a separate file, not muxed in the mkv, so I need a -map for each to make sure I take all streams from all files. Otherwise ffmpeg just takes the first a, v, and sub stream it finds. And without -map 1, it doesn't try to use the srt input at all, for some reason. Like I said, it makes a mov_text stream, though.)

Anyway, I left in my mis-steps in case they're helpful when you're trying to figure out this stuff yourself. This works and plays with subs in mpv:

ffmpeg -i in.mkv -i in.srt -codec copy -c:s mov_text /var/tmp/out.mp4

The key line in the output is:

  Stream #1:0 -> #0:2 (subrip (srt) -> mov_text (native))

For editting your subtitles, you can use anything that can produce a subtitle format that ffmpeg can read. (It should be able to convert any text-based format to mov_text.) Subtitle Edit is one of the newer better-maintained GUIs, and runs on Windows and Linux at least. IDK about OS X.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.