As promised, I’m posting some sample code for converting from DFXP to SCC. Actually, the SCC generated is contained in a class (captionConvertClass.php) independent of the DFXP parsing. To use it, all you do is:

$myClass = new captionConvert(startingTimecode);


$finishedCaptions = $myClass->outputCaptions();

the “startingTimecode” item is somewhat important. Quicktime files can have timecode tracks that don’t start at zero, but DFXP captions are always relative to a 00:00:00.00 start time. So, if the timecode track of your movie begins at 01:00:00:00 (as any file coming out of FCP will) but your DFXP file starts at 00:00:00.00, you need to let the convertor know so that it adds the right times.

Otherwise, it’s pretty simple and pretty basic. There are lots of things it doesn’t do (scc formating, proper Drop Frame handling, foreign characters, etc). But at least it’s a start. If you want to see conversion done right, look at SCC Tools, which is much more feature complete, at the expense of being much more complicated and … perl.

captionConvert.phps (sample dfxp parsing)

captionConvertClass.phps (plain text -> scc conversion)

One thought on “DFXP to SCC

  1. Hi there,
    I just found this old post when searching for caption conversion tools.
    We are currently developing an open source web app in php that will allow to create captions and descriptive video on line as well as many import export among caption formats.
    I’m trying to contact the author of this DFXP to SCC solution and ask him/her about the copyright of the code here posted.
    please feel free to contact me to my personal email or through the capscribe.ca website.
    Thank you, and looking forward to hear from you soon.
    Antonio Gamba
    ATRC University of Toronto,
    Capscribe Developer

Leave a Reply

Your email address will not be published. Required fields are marked *