Opened 14 years ago

Closed 12 years ago

#1095 closed task (fixed)

Improve EIA-708 caption decoding

Reported by: danielk Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I started working on EIT-708 caption decoding a long time ago. I recently resynced them with the latest SVN, and it looks like the decoding is working fine, we just need to display them properly in the OSD.

Attachments (3)

eit708-v2.patch (76.6 KB) - added by danielk 14 years ago.
decoding portion of EIA-708 caption support
eia708-v3.patch (87.7 KB) - added by danielk 14 years ago.
minor update, an OSD now displays show text of captions
copy-caption-descriptor-from-vct.patch (2.9 KB) - added by danielk 13 years ago.
Terrestrial ATSC is not required to have a caption descriptor in the PMT, this copies it over from the VCT when it isn't in the PMT.

Download all attachments as: .zip

Change History (19)

Changed 14 years ago by danielk

Attachment: eit708-v2.patch added

decoding portion of EIA-708 caption support

Changed 14 years ago by danielk

Attachment: eia708-v3.patch added

minor update, an OSD now displays show text of captions

comment:1 Changed 14 years ago by danielk

(In [9140]) References #1095. Adds EIA-708 caption decoder.

This is far from a complete implementation of EIA-708.

But it does decode the plain left-to-right, scroll up captions still in use by most networks. The advantage over the the EIA-608 caption decoder already in SVN for ATSC is that this decodes additional caption streams available on some networks (PBS) and supports all unicode characters, not just an extended version of ASCII.

Some caveats:

  • This does not decode the ATSC caption descriptors, so you won't know what streams are available, and in what languages they are in.
  • This does not work when the captions are out of order, this mean FOX, UPN and others probably won't work. This is because we are not yet reordering the captions out of picture order. So only networks that use only B frames for captions like CBS, NBC and others work.

The default key to toggle the EIA-708 captions is '#', once I've resolved the caveats I'll integrate this into the 'T' binding. Defaulting to EIA-708 captions when they are available. The second caption stream is available via the menu.

comment:2 Changed 14 years ago by danielk

(In [9288]) References #1095. Implement CC708Decoder dtor.

comment:3 Changed 14 years ago by danielk

(In [9289]) References #1095, parse ATSC CaptionDescriptor? in ctor + some refactoring of ISO language handling.

comment:4 Changed 14 years ago by danielk

(In [9290]) References #1095. Glue to allow MythTV to know more about the currently in use PMT.

This will be used in a later changeset to discover the properties of the current captions such as language, text width and reading level.

comment:5 Changed 14 years ago by danielk

(In [9291]) References #1095. UI cleanup for captions/subtitle/teletext.

Puts the EIA-608 and EIA-708 captions in the track selection system previously only used for subtitles and audio. This also tells you what language these streams are in if this information is available in the PMT.

Puts all the caption types into an SetCaptionsEnabled?(bool) method which selects the best set available. TOGGLECC uses this function to toggle the best available caption. For instance, if two captions in a different language are available the one in your most preferred language is chosen, subtitles are preferred over teletext, etc.

Adds TOGGLE bindings for each type of caption and uses that in the individual caption menus rather than the global TOGGLECC.

Adds a NEXTCC binding which allows you to go through all the available caption types including teletext menus in PAL countries.

None of the new bindings have a keyboard binding by default, and I've removed the "" default keybinding for TOGGLECC708. NEXTCC is the only one I could see as being of general use.

comment:6 Changed 14 years ago by danielk

(In [9306]) References #1095. Removes debugging statement I accidentally left in [9291].

comment:7 Changed 14 years ago by danielk

(In [9312]) References #1095. Reorder ATSC caption packets properly.

The caption packets are in display order, but we were processing them in decode order. Many channels transmit captions only on B frames, so this wasn't a problem on those channels. But for channels like FOX and UPN to work we need to do this properly.

This also makes the implementation closer to what the ffmpeg folks want for ATSC caption decoding to be accepted upstream, by using a stream of data rather than a callback; it just needs to be repackaged into an av_stream before they will accept the patch.

comment:8 Changed 14 years ago by danielk

(In [9353]) References #1095. Draw text background in the right position when preceeded by spaces.

comment:9 Changed 14 years ago by danielk

(In [9358]) References #1095. EIA-708 caption improvements

  • Adds support for EIA-708 fg/bg/edge colors and fonts.
  • Also fixes some problems with drawing the background for the captions in the right place.
  • Also exposes a few EIA-708 params in the frontend setup.
  • Makes EIA-708 captions rather than EIA-608 the default when EIA-708 streams are available.

comment:10 Changed 14 years ago by danielk

(In [9361]) References #1095. Fixes a runtime warning in [9358].

comment:11 Changed 14 years ago by cpinkham

(In [9367]) Reenable the autoselection of tracks when we open a file in AvFormatDecoder?. Removal of this code in [9291] broke transcoding. References #1095.

comment:12 Changed 14 years ago by danielk

(In [9687]) References #1095. Implements some more of the EIA-708 standard.

comment:13 Changed 13 years ago by danielk

Milestone: 0.200.21
Summary: Add EIA-708 caption decodingImprove EIA-708 caption decoding

Changed 13 years ago by danielk

Terrestrial ATSC is not required to have a caption descriptor in the PMT, this copies it over from the VCT when it isn't in the PMT.

comment:14 Changed 13 years ago by danielk

(In [11403]) Refs #1095. Copies ATSC Caption descriptor from VCT to PMT in DVBRecorder.

Terrestrial ATSC is not required to have a caption descriptor in the PMT, this copies it over from the VCT when it isn't in the PMT. Since we don't save the VCT in our DVB recordings we need these descriptors in the PMT so we can inform the user of the language and other properties of their caption streams.

This mostly effects PBS, other networks already copy the caption descriptor to the PMT before transmission.

comment:15 Changed 13 years ago by danielk

(In [12657]) Refs #1095. Bugfix for EIA-708 caption decoding.

It is possible to get a clear window request before a window is created. This adds a check for this so we don't try to clear a window which doesn't exist.

This also clears the window info more completely when a window is deleted, for easier debugging.

comment:16 Changed 12 years ago by danielk

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.