[Bug 773863] decklinkvideosrc: add VANC parsing

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Nov 9 00:22:21 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=773863

--- Comment #4 from John Poet <jppoet at gmail.com> ---
There is still quite a bit needed.  The basic support for grabbing the VANC
data from the decklink API is there, but that data further decoded into caption
data, so those captions can then be processed by the mpeg2 encoder.  VANC can
have a lot of other data besides Closed Captions, and there is some basic
support for extracting those other types there in case someone wants to expand
on this work.

I have updated the github repo with my current code.  It pushes the VANC
metadata out with the video buffer from decklinkvideosrc, and that metadata is
being seen by gst_ffmpegvidenc_handle_frame(), but is getting garbled along the
way:

The data seems to be added to the metadata correctly:

"gst_buffer_add_vanc_meta did 353 sdid 257 checksum 141 first 662 len 43"

But ffmpeg decodes it as:

"gst_VANCPacket_add       did 1611456576 sdid 32740 checksum 9312 first 22736
len 2"

Further, in gst_decklink_video_src_create(), I have to comment out:

// gst_buffer_add_video_time_code_meta (*buffer, f->tc);

or the VANC metadata is NOT seen by gst_ffmpegvidenc_handle_frame()

This tells me that I am not adding the VANC metadata correctly, but I have not
been able to figure out what I am doing wrong.

If you are in the mood to try it, I am running it like:

export GST_DEBUG=*:WARN,decklinkvideosrc:DEBUG
export DEVICE=2
gst-launch-1.0 decklinkvideosrc device-number=${DEVICE} mode=12 video-format=2
enable-vanc=1 ! queue ! autovideoconvert ! deinterlace mode=2 ! queue !
avenc_mpeg2video bitrate=800000 ! mpegvideoparse ! mpegtsmux name=mux !
filesink location=video.ts decklinkaudiosrc device-number=${DEVICE} !
audioconvert ! avenc_ac3 bitrate=640000 ! ac3parse ! queue ! mux.

Otherwise, if you can think of what I might be doing wrong when adding the
metadata to the buffer, I would appreciate a hint.

https://github.com/jpoet/gst-plugins-bad/blob/VANC/gst-libs/gst/vanc/gstvancmeta.h
https://github.com/jpoet/gst-plugins-bad/blob/VANC/gst-libs/gst/vanc/gstvancmeta.c

Thanks,

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list