Opened 10 years ago

Closed 10 years ago

#11899 closed Bug Report - General (Fixed)

Garbled CCs on some stations

Reported by: faginbagin <mythtv@…> Owned by: Jim Stichnoth
Priority: minor Milestone: 0.27.1
Component: MythTV - Captions Version: 0.27-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Closed captions of shows recorded from CBC (Canadian Broadcasting Corporation) are garbled on 0.27, but work reasonably well on 0.23. I'm in Metro Detroit where we get Windsor, Ontario TV from our cable service, Wide Open West.

My production mythtv environment is 0.23 but I want to upgrade to 0.27. In my testing I discovered this problem. I have two samples that demonstrate the problem available on my web server: http://www.hbuus.com/~buus/rollup.mpg - a show that uses rollup captions http://www.hbuus.com/~buus/popup.mpg - a show that uses popup captions CCextractor v 0.66 has no problem decoding the captions in these recordings. As proof, I am attaching rollup.srt and popup.srt.

I've also seen CC problems on one show (Buffy the Vampire Slayer) recorded from basic cable station, FX, but I want to do more testing to see if other shows on that station are affected. I also want to test other stations I care about but don't have current samples. Closed captions on HD broadcast stations and other basic cable stations appear to be OK.

Attachments (3)

rollup.srt (5.3 KB) - added by faginbagin <mythtv@…> 10 years ago.
popup.srt (908 bytes) - added by faginbagin <mythtv@…> 10 years ago.
version.txt (918 bytes) - added by faginbagin <mythtv@…> 10 years ago.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by faginbagin <mythtv@…>

Attachment: rollup.srt added

Changed 10 years ago by faginbagin <mythtv@…>

Attachment: popup.srt added

Changed 10 years ago by faginbagin <mythtv@…>

Attachment: version.txt added

comment:1 Changed 10 years ago by Jim Stichnoth

Status: newaccepted

comment:2 Changed 10 years ago by Jim Stichnoth

A few observations so far.

  1. Mostly (but not entirely), the garbling is because roughly half the characters aren't being displayed.
  1. xine shows almost exactly the same garbled captions as MythTV.
  1. As noted, ccextractor (version 0.65 in my case) produces very clean captions.
  1. If you combine the captions from fields 0 and 1 by setting field=0 at the beginning of CC608Decoder::FormatCCField(), most (but not all) of the caption characters are correctly displayed.

Especially in light of the xine behavior, I suspect an upstream ffmpeg problem, though it's also possible that it's a problem in our avformatdecoder.cpp.

comment:3 Changed 10 years ago by Jim Stichnoth <jstichnoth@…>

In e20a6310b1a2716ce601950a7278726c6d41b538/mythtv:

Fix some cc608 field number handling. Refs #11899.

More accurately decodes CEA-608 captions encoded in SCTE-20 user data.

  • Field number 3 is merged with field number 1 instead of 2.
  • Data in field number 3 is not rejected.
  • Field numbers 1 and 2 are then swapped if top_field_first is false.

These changes are based on the SCTE 20 handling code from ccextractor.

comment:4 Changed 10 years ago by Jim Stichnoth

Milestone: unknown0.27.1

Helen, after committing e20a6310b1 to master, your two samples seem to show the captions perfectly. Are you able to apply this patch to your 0.27 test environment? If so, I'd appreciate if you could do more extensive testing on your recordings before I commit it to 0.27-fixes.

Note that for HD broadcasts, the default is always to prefer CEA-708 "digital" captions, so you need to go into the Subtitles submenu during playback to enable the CEA-608 "VBI" captions for testing.

comment:5 Changed 10 years ago by faginbagin <mythtv@…>

I applied both e20a6310b1 and a6e72eb27 to 0.27-fixes and then tested recordings made on all the channels I regularly record, both ATSC CC and VBI CC. All work well for me, including the rollup.mpg and popup.mpg examples. I see no regressions. I believe it is safe to commit to 0.27-fixes. Thanks!

comment:6 Changed 10 years ago by Jim Stichnoth <jstichnoth@…>

In 7323c328dea2094edb369433092696a06cd3b243/mythtv:

Fix some cc608 field number handling. Refs #11899.

More accurately decodes CEA-608 captions encoded in SCTE-20 user data.

  • Field number 3 is merged with field number 1 instead of 2.
  • Data in field number 3 is not rejected.
  • Field numbers 1 and 2 are then swapped if top_field_first is false.

These changes are based on the SCTE 20 handling code from ccextractor.
(cherry picked from commit e20a6310b1a2716ce601950a7278726c6d41b538)

comment:7 Changed 10 years ago by Jim Stichnoth

Resolution: Fixed
Status: acceptedclosed

Thanks for the extensive testing!

Note: See TracTickets for help on using tickets.