Sunday, 31 January 2010

SBV file format for Youtube Subtitles and Captions

For those of you who post vids on youtube you will probably have noticed that you can add subtitles or captions to your video.  Captions are the text that pops up and gives visual info on what is being said in the video at the relevant times (different from Youtube's annotations).
Youtube's support page contains some info on the caption file or .SBV file format but fails to mention a few important details.

Below is an example of a bit of an SBV file I recently made.  This can be made in any text editing program (notepad/textedit/etc.) provided you save it as a plain text file with the .SBV extension.
You'll notice the first line of each new caption has the start time and end time.  These times are seperated by a comma (no spaces) in the format H:MM:SS.000 with milliseconds after the decimal point.
This is followed by a line break and then the text (each line on a new line). A blank line (2 line breaks) indicates the end of the caption and the start of the next time code.  *This is very important* If you miss this blank line then youtube doesn't seem to understand your SBV file.

0:05:40.000,0:05:46.000
Don’t think that you can just ignore them
because they’re not your children or relatives.

0:05:46.000,0:05:51.000
Because every child in our society is
a part of that society.

0:05:51.000,0:05:55.000
We should give them opportunities
and only good things,…

0:05:55.000,0:05:59.000
…so that they can grow up to be
good adults in the future.

0:06:31.000,0:06:36.000
Produced by
HOTS (Heart of the Street)
www.hots-th.org

Easy as that! 
You may also want to convert the SBV file to the SRT format (which is used by VLC and Subtitle Workshop). 
Gideon Goldberg has made a great little online converter tool that does just this - www.gidsgoldberg.com

Web Design Courses Brighton UK
Share/Bookmark