PDA

View Full Version : ANN: syncscc 0.2


jmac698
12th March 2006, 02:52
I would like to announce a new tool for resyncing subtitles.

Features

This program reads the edit decision list produced by
Cuttermaran, and an SCC file.
It outputs an SCC file which is resynced to the cuts.

Cuttermaran is a lossless (also known as GOP level)
mpeg2 video editor. More information can be found at:
www.cuttermaran.de/

SCC is a Scenarist Closed Caption format file. It is
used by many subtitle tools. More information on
SCC, and capturing closed captions at:
www.geocities.com/mcpoodle43/SCC_TOOLS/DOCS/SCC_TOOLS.HTML

There is another feature, that a format other than
cuttermaran is accepted. This format must be as follows:

StartPosition "1" "2"
StartPosition "120" "234"
...
The first number and second number on each line are
the inclusive list of frames to be kept.
It is similar to a simple version of the cuttermaran file.
This is actually a joke, that a programmer will understand,
this "feature" is a bug :)

Usage

syncscc cutfile captionfile syncedcaptionfile

cutfile is an existing cuttermaran project file, eg capture.cpf
captionfile is an existing SCC file, eg capture.scc
syncedcaptionfile is a created SCC with fixed sync, eg capture1.scc

Example

We have an mpeg2 captured video with captions, 1000 frames
long. A commercial break is from 500-599 frames. We
cut it out with cuttermaran. Now we have a 900 frames video.
There is also some captions at every 100 frames lasting 99 frames.
We have to remove the caption starting at 500, and captions
starting at 600-900 must be adjusted by -100 frames in time.
The program does this automatically.
If the cuttermaran project were capture.cpf, the captions
file were capture.scc, and we want to call the new captions
file capture1.scc, we type:

syncscc capture.cpf capture.scc capture1.scc

Known bugs

There is no error checking. Please make sure the input
files exist and that the output file can be made.
The reading of the cuttermaran file format is very simple
and will only work if you edited a single file, and
may not work in some other circumstances.
The program may not work if there are not many captions.
There may be preciseness issues; I don't know if cuttermaran
lists it's cut points inclusively or not.
I also don't know if SCC files can start at 00:00:00:00.
I don't know if cuttermaran starts numbering frames at 0.
What this means to you, the user, is that timing may be
wrong by several frames by the end of the file.
It is unlikely to cause a large visual difference.

Update: version 0.2 fixed a jump in output timecodes.

McPoodle
18th March 2006, 04:59
That's a nice tool you have there. Are you hosting it anywhere? If not, I'd be glad to do so.

jmac698
18th March 2006, 05:29
Hello,
thanks for your comments. Your fine research has been a great help to me. I'd be glad to have a home for my project, and there is still work to do. I wrote it because I am interested in helping those with disabilities, I have no need for it myself.
I've been analyzing the workflow with free only tools, and I think I need to work directly with .srt format as well. Do you have any other ideas for needed tools? Together we can help the goal of universal availability.

McPoodle
19th March 2006, 21:33
Well, what sort of workflow do you have in mind? I'm currently working on what I consider to be the crucial link, CC_MUX, a tool that will mux SCC files into M2V files. Once this is done, you could use Muxman to create a DVD with closed captions.

The other missing tool (which is far beyond my skillset) would be a visual caption editor. You can edit an SCC file, create one from scratch, or you can import a text file and then use the tool to set the timing and positioning.

The most extensive of my workflows would then look like this:

1. Make a movie and record it on a digicam.

2. Import the footage onto the PC.

2a. Encode to M2V/AC3 if necessary.

3. Use the (currently nonexistent) free caption editor to write, time and position closed captions.

4. Use CC_MUX to put the captions into the M2V file.

5. Create the menu and subpicture images and the chapterlist.

6. Use Muxman to create a DVD.

Since there is no editor yet, Step 3 currently consists of using a subtitle editor to create the text and timing of the captions in SubRip format, and then using SUBRIP2SCC to convert to SCC format. Optionally, you can use CCASDI to convert the SCC file to CCD format and insert positioning information before finally using CCASDI again to go back to SCC format.

Another workflow would start with a capture card. Some capture cards encode the captions in the captured MPEG using an incorrect version of the DVD format. You would edit the video with Cuttermaran, use General Parser to extract the captions in raw format, convert to SCC with RAW2SCC, strip the incorrectly-formatted captions out of the M2V with ReStream, put the captions back in correctly with CC_MUX, and then use Muxman.

Other capture cards only capture AVI, but enable you to seperately capture the captions in raw format. You would encode the video to M2V/AC3 using any number of different encoders, convert the raw captions with RAW2SCC, adjust the timing with CCADJ, then edit with Cuttermaran and SyncSCC before turning to Muxman.

If you're consolidating material from DVDs, you'd rip, edit with Cuttermaran, and use Muxman.

If the DVDs did not have captions, then you'd have to convert a subtitle stream to SubRip format then use SUBRIP2SCC to create crude SCC captions. The editor would come in handy here, to set positioning. Edit if desired with Cuttermaran and SyncSCC, then finish with Muxman.

Those are all of the workflows I can think of.

jmac698
21st March 2006, 16:17
I use DvdStyler for authoring,
http://dvdstyler.sourceforge.net/
Since I couldn't get cc_mux to work, I had to write my tool. Also I found I have to prepend FFFFFFFF to the cc.bin each time, can you fix that?
So I cap/rip cc.bin,
fix it with fffff,
convert to .scc
cut the video
fix the .scc with my syncscc
convert .scc to .srt (I could eliminate this step with my tool)
convert .srt to .sup, using txt2sub
http://www.videohelp.com/tools?tool=Txt2Sup
Then I drag the .m2v, .mp2, .sub file onto the DVDstyler, make a menu and create dvd.