Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#9829 closed Bug Report - General (fixed)

Doubled EIA-608 letters in digital channels

Reported by: Alex Halovanic <halovanic@…> Owned by: danielk
Priority: minor Milestone: 0.25
Component: MythTV - Video/OSD Rendering Version: Master Head
Severity: low Keywords: caption captioning EAI-608
Cc: Ticket locked: no

Description

SD digital channels captured from Wide Open West (WOW) contain EIA-608 captions. On MythTV 0.25 (a2a32e605e08501f19e7e6ea052ecf9dcfdf6c50) turning on closed captions frequently (but not always) results in doubled letters in words, ie "SNONOWW" for "SNOW". Attached is a clip where the captions appear to display correctly briefly before this problem starts. CCExtractor pulls captions fine from this clip. This issue also occurred in 0.24.

Attachments (6)

12131_20110605190527.srt (3.5 KB ) - added by Alex Halovanic <halovanic@…> 15 years ago.
CCExtractor output from clip
cc608_dup.patch (5.7 KB ) - added by gregorio.gervasio@… 15 years ago.
Fix handling of duplicate CC608 codes.
3233_20110606180600.srt (800 bytes ) - added by Alex Halovanic <halovanic@…> 15 years ago.
CCExtractor output from NikToons clip
3194_20110606181315.srt (1.6 KB ) - added by Alex Halovanic <halovanic@…> 15 years ago.
CCExtractor output from FX clip
cc608_dup_v2.patch (10.7 KB ) - added by gregorio.gervasio@… 15 years ago.
Fix handling of duplicate CC608 codes. (v2)
cc608_scte_inv.patch (1.7 KB ) - added by gregorio.gervasio@… 15 years ago.
Improved XDS check for SCTE field inversion. (Apply on top of v2 patch).

Download all attachments as: .zip

Change History (19)

by Alex Halovanic <halovanic@…>, 15 years ago

Attachment: 12131_20110605190527.srt added

CCExtractor output from clip

comment:1 by Alex Halovanic <halovanic@…>, 15 years ago

comment:2 by gregorio.gervasio@…, 15 years ago

This seems to be a case where the stream has caption codes repeated in different packets with the same timestamp. I have attached a fix you can try out. The fix is a little ugly because this case needs to be distinguished from the valid case of multiple caption codes in the same packet. Maybe there's a better way to do this.

The patch also fixes a long-standing problem with digital streams that contain multiple backspace codes. (The decoder incorrectly suppressed all but one.)

by gregorio.gervasio@…, 15 years ago

Attachment: cc608_dup.patch added

Fix handling of duplicate CC608 codes.

comment:3 by markk, 15 years ago

Owner: changed from markk to danielk
Status: newassigned

Passing on to Daniel, who knows far more about this than me:)

comment:4 by Alex Halovanic <halovanic@…>, 15 years ago

Thanks for looking at this. The patch definitely fixes this particular clip. Unfortunately, I was able to capture some more that still have issues. In one case, the patch has definitely improved the caption rendering, as it's only doubled, while it looks like it was tripled or quadrupled previously. In the other, it's rendering as almost (but not quite) complete gibberish.

by Alex Halovanic <halovanic@…>, 15 years ago

Attachment: 3233_20110606180600.srt added

CCExtractor output from NikToons clip

by Alex Halovanic <halovanic@…>, 15 years ago

Attachment: 3194_20110606181315.srt added

CCExtractor output from FX clip

comment:5 by Alex Halovanic <halovanic@…>, 15 years ago

comment:6 by Alex Halovanic <halovanic@…>, 15 years ago

I forgot to mention the bad characters on the one clip showed up prior to applying the patch too.

comment:7 by gregorio.gervasio@…, 15 years ago

Ah, I misunderstood the problem. It looks like the problem with the duplicate codes is that the stream has both ATSC and SCTE-20 captions, but the ffmpeg decoder stuffs them both into the same structure.

The problem with the bad characters is that the decoder does not know how to handle SCTE-20 captions for repeated fields (film mode).

I have attached a new patch that seems to fix both problems. Please try it out. (You'll need to revert the previous patch.)

by gregorio.gervasio@…, 15 years ago

Attachment: cc608_dup_v2.patch added

Fix handling of duplicate CC608 codes. (v2)

by gregorio.gervasio@…, 15 years ago

Attachment: cc608_scte_inv.patch added

Improved XDS check for SCTE field inversion. (Apply on top of v2 patch).

comment:8 by Alex Halovanic <halovanic@…>, 15 years ago

Just tested. These two patches work great, I haven't been able to trigger any issues with regular or ATSC captioning. I'll try on some more channels tonight.

comment:9 by Alex Halovanic <halovanic@…>, 15 years ago

Done a lot more testing; these work on all the digital and analog recordings I have, including very old ones from different providers.

comment:10 by Github, 15 years ago

Refs #9829. Handle duplicate SCTE and ATSC captions with patch from Alex Halovanic.

The primary problem is that some streams have both SCTE and ATSC captions, so we need to capture them seperately and then decide which to use.

A secondary problem is inversion and repeats in 608 captions, esp SCTE.

Branch: master Changeset: d526385aa4c1466b064e9544cdb663f357007e35

comment:11 by Github, 15 years ago

Milestone: unknown0.25
Resolution: fixed
Status: assignedclosed

Fixes #9829. Move the CC 608 parity check up so we don't make bad decisions about handling the next field based on bogus data.

Branch: master Changeset: 408c173adfc0cb21ac5f7f4334c8d05d6f143255

comment:12 by Jim Stichnoth <jstichnoth@…>, 11 years ago

In 68bd03ffe5b7bb6456519639caac77486ea0941c/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:13 by Jim Stichnoth <jstichnoth@…>, 11 years ago

In bcdaa8865ef8700ccbb7214ec39dcbcd8392b2af/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.