ccextractor icon indicating copy to clipboard operation
ccextractor copied to clipboard

SCC output omits some line position instructions which are included in G608 output

Open yukichigai opened this issue 2 months ago • 3 comments

I've run into an intermittent issue with DVD and TS sources where SCC output somehow skips the line position instructions for some captions. Converting these same streams to G608 output shows the correct positioning, so it is clearly there but somehow being omitted. Here's an example:

SCC

00:09:28:28	 9420 4ce5 f420 6de5 20ea 7573 f420 7361 7920 73ef 6de5 f468 e96e 672c 2073 e9f2 ae80 942f 94ae

00:09:30:19	 942c

Corresponding CCD Disassembly

00:09:28:28	{RCL}Let me just say something, sir._{EOC}{ENM}
00:09:30:19	{EDM}

G608

148
00:09:28,936 --> 00:09:30,635
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
                                99999999999999999999999999999999RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Let me just say something, sir. 00000000000000000000000000000009RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

There should be a 9470/{1500} instruction at the start of the text in the SCC/CCD version, but it is missing for some reason.

yukichigai avatar Dec 06 '25 19:12 yukichigai

Hi! I can reproduce this the row positioning codes (like 9470/{1500}) appear in G608 but are missing in SCC, so the SCC encoder is skipping them. I’m planning to work on a PR for this. Before I start, can you confirm that SCC should always output these positioning commands whenever they appear in the input?

Rahul-2k4 avatar Dec 08 '25 19:12 Rahul-2k4

Hi! I can reproduce this the row positioning codes (like 9470/{1500}) appear in G608 but are missing in SCC, so the SCC encoder is skipping them. I’m planning to work on a PR for this. Before I start, can you confirm that SCC should always output these positioning commands whenever they appear in the input?

I can confirm that. While most 608 captions are encoded in presentation order (i.e. left to right, top to bottom) the spec does allow for arbitrary position changes at any point in the stream.

yukichigai avatar Dec 08 '25 20:12 yukichigai

Okay, got it thanks for confirming! I’ll work on a PR to make sure the SCC encoder always outputs those positioning PACs.

Rahul-2k4 avatar Dec 09 '25 05:12 Rahul-2k4

@yukichigai Can you share a sample that shows this problem?

cfsmp3 avatar Dec 12 '25 18:12 cfsmp3

@yukichigai Actually I found one. Can you take https://github.com/CCExtractor/ccextractor/pull/1791 for a spin?

cfsmp3 avatar Dec 12 '25 18:12 cfsmp3

Just ran it on one of the sources that was giving me trouble (the one in the example actually) and the output now looks correct.

SCC

00:09:28:28	 9420 9470 4ce5 f420 6de5 20ea 7573 f420 7361 7920 73ef 6de5 f468 e96e 672c 2073 e9f2 ae80 942f 94ae

00:09:30:19	 942c

CCD

00:09:28:28	{RCL}{1500}Let me just say something, sir._{EOC}{ENM}
00:09:30:19	{EDM}

yukichigai avatar Dec 13 '25 04:12 yukichigai