wader / fq

jq for binary formats - tool, language and decoders for working with binary and text formats
Other
9.53k stars 218 forks source link

[FORMAT] Analog Captions & DTVCC Specs #536

Open bbgdzxng1 opened 1 year ago

bbgdzxng1 commented 1 year ago

maybe open a new issue if you want to dump some specs and ideas.

The wikipedia article about it seems quite good https://en.wikipedia.org/wiki/EIA-608 but would be nice to get hands on the spec.

Line 21 Analog Captions (EIA-608)

Spec for Analog Line 21 Captions is available, free to everyone, from https://shop.cta.tech/products/line-21-data-services. EIA-608 was originally designed for line-21 analog captions, so the spec covers both the data format and control codes and how to transmit them as analog. The transmission in line 21 analog is irrelevant in a digital world, but the control codes and decoding part is still referenced by its successor, DTVCC (EIA-708).

However, there is also a great Web1.0 Page, which covers the mystery 608 control codes, data channels, fields and 7 bit and includes lookup tables for the two-byte words. The control codes are typically marked up in human readable as {ENM}, {EOC}, {EDC}, as these are the abbreviations used in the EIA-608 spec. The McPoodle tools are written in circa-2005 perl. You will have seen references to SCC captions, which is basically just the file-based representation of 608 data. When caption tools disassemble the 608/SCC data, they are usually represented in these human readable closed caption disassembly (CCD) codes, although each captioning and conversion tool has their own proprietary format of CCD file, but the codes contained within like {ENM}, {EOC}, {EDC} are usually represented in the same markup. This reverse-engineered documentation is what everyone used before the EIA-608 spec became freely available.

Digital TV Closed Captions (DTVCC), aka EIA-708.

Spec for DTVCC (EIA-708) is available, free to everyone, from https://shop.cta.tech/products/digital-television-dtv-closed-captioning. The DTVCC spec then defines both the transmission format, ccdata() and a new encoding format called 708 (Service 1/2), but the same spec allows cross-references EIA-608 for CC1/2/3/4 compatibility and explains how EIA-608 is encoded in ccdata(), which is exactly what we have been playing with.

You'll have to register with CTA to "buy it for $0", but all the other standards shops charge for it. If you get it from the CTA (previously EIA/CEA), both are free. Historically, they were chargeable. Since it is copyrighted material, I have not attached these to your repo, not out of laziness, but out of respect.

Feel free to close this ticket.

wader commented 1 year ago

👍 Great, can keep open until there eventually is a PR