Giter Site home page Giter Site logo

klvovermpegtsextractor's Introduction

KLV Over MPEG-TS Extractor

Extract MISB 601 KLV data from MPEG-TS stream (STANAG 4609).

Credit

KLV Data is adapted from https://github.com/paretech/klvdata.

The code changes include the following:

  • Ignore errors (write -1000 or -2000 as value).
  • Output readable value when printing structure.
  • Adding CRC validation to packet.

Implementation

MPEG-TS extraction is partly implemented, many unneeded fields are not extracted.
Packet ID extraction doesn't seem to be correct when comparing to FFMPEG.

The code is exposed a CLI but can be used as a package to extract KLV data.

Getting Started

Clone the repository.
Use an IDE such as PyCharm.
Create a virtual environment fro the project using python 3.6+.
No additional dependencies are required.

Extracting KLV

The code can run on entire MPEG-TS file or extracted KLV binary file.
The extract KLV binary use the following:

  • Using tool such as ffprobe get the mapping of KLV stream, e.g. 0:3
  • Using tool such as ffmpeg copy the KLV stream to file, e.g.:
    ffmpeg -i [video-name].ts -map 0:3 -c copy -f data [video-name].klv

Usage

run.py is a CLI for parsing klv/mpeg-ts files.
As output can be large, depending on input file, it is advised to pipe to log file.

KLV binary file

python run.py -f [file.klv] -k

MPEG-TS video file

python run.py -f [file.ts]

klvovermpegtsextractor's People

Contributors

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