Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

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

Download all attachments as: .zip

Change History (17)

Changed 3 years ago by Alex Halovanic <halovanic@…>

CCExtractor output from clip

comment:1 Changed 3 years ago by Alex Halovanic <halovanic@…>

comment:2 Changed 3 years ago by gregorio.gervasio@…

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.)

Changed 3 years ago by gregorio.gervasio@…

Fix handling of duplicate CC608 codes.

comment:3 Changed 3 years ago by markk

  • Owner changed from markk to danielk
  • Status changed from new to assigned

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

comment:4 Changed 3 years ago by Alex Halovanic <halovanic@…>

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.

Changed 3 years ago by Alex Halovanic <halovanic@…>

CCExtractor output from NikToons? clip

Changed 3 years ago by Alex Halovanic <halovanic@…>

CCExtractor output from FX clip

comment:5 Changed 3 years ago by Alex Halovanic <halovanic@…>

comment:6 Changed 3 years ago by Alex Halovanic <halovanic@…>

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

comment:7 Changed 3 years ago by gregorio.gervasio@…

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.)

Changed 3 years ago by gregorio.gervasio@…

Fix handling of duplicate CC608 codes. (v2)

Changed 3 years ago by gregorio.gervasio@…

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

comment:8 Changed 3 years ago by Alex Halovanic <halovanic@…>

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 Changed 3 years ago by Alex Halovanic <halovanic@…>

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 Changed 3 years ago by Github

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 Changed 3 years ago by Github

  • Milestone changed from unknown to 0.25
  • Resolution set to fixed
  • Status changed from assigned to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.