Giter VIP home page Giter VIP logo

libklvanc's Introduction

Introduction

Libklvanc is a library which can be used for parsing/generation of Vertical Ancillary Data (VANC) commonly found in the Serial Digital Interface (SDI) wire protocol.

The library includes a general parser/decoder and an encoder for VANC lines, as well as the ability to both decode and generate protocols commonly found in SDI, including:

  • SMPTE ST 334 - CEA-708 closed captions in VANC
  • SMPTE ST 2016 Active Format Descriptor (AFD) and Bar Data
  • SCTE-104 Ad triggers
  • SMPTE ST 2038 arbitrary VANC encapsulation
  • SMPTE ST 12-2 Timecodes
  • SMPTE RDD 8 Subtitle Distribution packets
  • SMPTE ST 2108-1 HDR/WCG Metadata Packing and Signaling

By providing both encoders and decoders, the library can be used for common use cases involving both capture of SDI (and subsequent decoding) as well as generation of VANC for inclusion in an SDI output interface. This includes computing/validating checksums at various levels and dealing with subtle edge cases related to VANC line formatting such as ensuring packets are contiguous.

The library also provides utility functions for various colorspaces VANC may be represented in, including the V210 format typically used by BlackMagic Decklink SDI cards.

Beyond this Readme.MD file, API level documentation can be generated via Doxygen (see "Making Documentation" section below).

Users should refer to the "tools" subdirectory for some test code which which make use of the library. For a "real world" application, refer to the klvanc-tools package, which make use of libklvanc in conjunction with Blackmagic cards to capture real SDI signals.

https://github.com/stoth68000/klvanc-tools

LICENSE

LGPL-V2.1
See the included lgpl-2.1.txt for the complete license agreement.

Dependencies

  • Doxygen (if generation of API documentation is desired)

Compilation

    ./autogen.sh --build
    ./configure --enable-shared=no
    make

Making Documentation:

To make doxygen documentation in the doxygen folder, run the following command:

    make docs

To view the documentation, cd into the doxygen/html/ directory and open the index.html file in a browser window.

Verifying the compilation:

The library comes with a series of test cases which allow the user to confirm the library is working appropriately (as well as allowing us to watch for regressions).

To run the tests after compilation, run the following command:

    make test

Compilation with meson

Meson can be used as an alternative to autotools:

    meson build
    ninja -C build

The documentation will be built automatically if Doxygen is available

Running tests with meson

    meson test -C build

libklvanc's People

Contributors

dheitmueller avatar gizahnl avatar gizmocuz avatar mathieuduponchelle avatar pkeroulas avatar stoth68000 avatar stuartm avatar yvesdm3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libklvanc's Issues

How do I add this when compiling ffmpeg?

How do I add this when compiling ffmpeg?
If I add libklvanc \ to

sudo apt-get update -qq && sudo apt-get -y install \

I get:
Note, selecting 'git' instead of 'git-core'
E: Unable to locate package libklvanc

This lib does not show up in https://packages.ubuntu.com/
I am on 20.04 ..sorry bit of a noob here, thanks!

Question about ffmpeg integration

Hi,

I'm following along w/ some of the patches integrating this library into ffmpeg. Was wondering if there was a branch of ffmpeg on github somewhere with all the changes, would love to read through all the changes as a hole and maybe try building it.

Really excited about this work.

Thanks

Issue in parse_dtmf_request_data

Hi,
In parse_dtmf_request_data(), the following condition is there to copy dtmf characters.

if (d->dtmf_length < sizeof(d->dtmf_char)) {
	memcpy(d->dtmf_char, p, d->dtmf_length);
}

In above code snippet "sizeof(d->dtmf_char)" is always 7. As per SCTE-35 standard d->dtmf_length can have value 7. In this case the above condition will fail and will not copy dtmf characters to the destination array.
So the condition check has to be modified with "<=" instead of "<". Please check and let me know your view on this.

Porting to Windows

Hi,
This is more a question than an issue.
I tested the lib on Linux, and it's impressive. However, we need to use this lib in a Windows-10 based project. I wonder if there were previous attempts to port the lib, and if there are any limitations that would prevent us from doing it. I am aware that the Decklink stuff will need adaptation, but except that, are there any blockers?

Illegal cc_count received

Hi, first I want to thank all who made libklvanc, it works amazing and I am so grateful!

So running Ubuntu 21.10, ffmpeg compiled with libklvanc and Decklink, playing great out the SDI, I can see my captions on the broadcast monitor while playing files, all is well for file based playback with 608/708 embedded mpegs TS files.

My next step is to get the SRT stream from OBS out the Decklink and hopefully maintain the captions it is generating with it's "Cloud Closed Captions" plug-in. https://github.com/ratwithacompiler/OBS-captions-plugin it uses Google Cloud Speech Recognition to listen to the audio from the live video happening on OBS and adds captions automatically. OBS can output via SRT and it will pass these captions in the SRT stream.

To view the OBS plug in at work, simply install it, set source to caption, activate and stream by setting the stream server to Custom and service to:
srt://127.0.0.1:10000?mode=listener
Then, just open in MPV player:
mpv srt://127.0.0.1:10000

Then click on the text/ keyboard icon in MPV and you will see the captions. Now when I open the stream in ffmpeg with:

ffmpeg -i srt://127.0.0.1:10000 -pix_fmt yuv420p -f decklink -vcodec v210 "DeckLink SDI 4K"
I get a ton of
Illegal cc_count received errors
Video plays out the Decklink, but no captions show.
Wondering if I need to add something more in my ffmpeg line or more likely the OBS is not putting out CEA compliant captions and thus the Illegal cc_count received errors?
https://github.com/obsproject/obs-studio/issues/4006

Guessing the above ticket is the issue but looking to be sure and any guidance on what they need to do to fix this as I will follow up with the OBS folks too. Thanks in advance!

Why is there a CPP file?

Hello,

I'd like to evaluate the integration of this library+tools in our SMPTE ST2110 analyser. When using CMake, I get errors which leads me to this question: is there any particular reason why tools/parse.cpp is a C++ file, the only one?

I have a patch which turns it into a C file if you're interested.

PK

Should core-packet-smpte_2108_1.c be linked in?

I was just messing around with an MSYS2 build and I noticed that the meson.build didn't reference core-packet-smpte_2108_1.c

ld.exe: src/libklvanc.dll.p/core-packets.c.obj:core-packets.c:(.rdata+0x3a8): undefined reference to 'parse_SMPTE_2108_1' ld.exe: src/libklvanc.dll.p/core-packets.c.obj:core-packets.c:(.rdata+0x3b0): undefined reference to 'klvanc_dump_SMPTE_2108_1'

The linker was grumpy until I added it.

HDMI REC trigger

is:issue is:open Hi! Im very excited about this project. Im still reading how to catch VANC date from my SONY camera which support sending REC trigger over the HDMI. This project seems to be solution for me. I would like to use HDMI to USB or HDMI to CSI (C779) adapter to be able to recieve video stream and hope also the VANC where should be hidden that REC flag... Would you be kind and tell me more about this - if you know more? Thanks!

Compiling the library

Hi,

I tried compiling the library but I can't find any declaration of "struct buffer_s" ? Maybe a file not checked in?

Yves

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.