Giter Club home page Giter Club logo

ezo-caption-decode's Introduction

ezo-caption-decode

Crude caption decoding

Code is extremely ugly and some variable names are effectively obfuscated from hasty writing.

First, DataStreams.py takes (a) line(s) from a --luma-4fsc TBC video export and creates PNG waterfalls of those lines. 40 (field 1 line 20, zero-indexed) is usually the "line 21" that captions are stored on. Likewise, if i remember correctly, 20 (field 0 line 20, zero-indexed) is the "line 21" that XDS is stored on.

Second, decode_cc_from_waterfall_2_alt.py takes a waterfall generated by DataStreams.py and does the actual decoding work on it. At some point I'll add back in the caption display emulation code that was partially hacked out for the Hot Springs SRT captions.

CC/XDS decoding is agnostic. You do not have to specify if you're decoding CC or XDS because those have their own starting bytes regardless. You won't normally find XDS on the caption stream (40, CC2), but you can sometimes find captions on the XDS stream (20, CC1).

When it decodes XDS it would show onscreen with the display emulation code:

XDS example

but normally (and currently only) decodes into JSON (which isn't yet saved). Something along the lines of...

{
    "nul":"                                ",
    "end":"                                ",
    "Station.CallLetters": "TBS     ", 
    "Station.StationName":"Turner Broadcasting System        ",
    "Current.ProgramID":"                                ",
    "Current.ProgramLength":"                                ",
    "Current.ProgramName":"NOW AND THEN                    ",
    "Current.ProgramType":"Entertainment   "
    }

...with fields dynamically added depending on received packets.

ezo-caption-decode's People

Contributors

flashlightet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.