Play mpeg-2 file with 608/708 embedded captions out Decklink

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

asperi

  • Posts: 16
  • Joined: Sat Nov 27, 2021 5:59 pm
  • Real Name: Matt Cavis

Play mpeg-2 file with 608/708 embedded captions out Decklink

PostMon Nov 29, 2021 6:26 am

I have never seen captions out of a Decklink board.. Starting to think it is impossible. I have built ffmpeg with Decklink support, it plays my file fine out the SDI but not seeing any captions on my broadcast monitor (JVC DT-V17G1Z). I have mpeg-2, H.264 and MXF test files with embedded 608 and 708 captions but cannot get them to show on SDI. Using Decklink 4k Extreme. Any help would be great, thanks!
Offline

asperi

  • Posts: 16
  • Joined: Sat Nov 27, 2021 5:59 pm
  • Real Name: Matt Cavis

Re: Play mpeg-2 file with 608/708 embedded captions out Deck

PostThu Dec 02, 2021 4:21 pm

Really wish there was some sort of guidance or help on this.
Last edited by asperi on Mon Jan 24, 2022 3:41 pm, edited 1 time in total.
Offline

petrno

  • Posts: 17
  • Joined: Sat Jan 16, 2021 9:00 pm
  • Real Name: Petr Novak

Re: Play mpeg-2 file with 608/708 embedded captions out Deck

PostFri Dec 10, 2021 3:46 pm

I have a modified version of ffmpeg which allows to play out MXF files with ancillary data using the Blackmagic cards (DeckLink Duo 2 and Quad 2) and modules (UltraStudio Monitor 3G). But at this moment this is not public. This has been tested with OP-47 subtitling (Europe/Australia), but it could be modified for the 608/708 as well.

What is your input format you want to play out - is it MXF or something else? In what format is the CC data inside? What we are using at the moment is the SMPTE 436M track in MXF files. We can also make the same files from SDI input - or display them locally on screen on the computer including the subtitles.

This was used for testing of various , in production we have a live VANC inserter and extractor built on Blackmagic cards, but not based on ffmpeg.

This was tested with Desktop Video 12.1 and 12.2 and reasonably recent ffmpeg (Sept 2021).

I have a binary demo for macOS and Windows (static builds, no external dependencies), but as mentioned, at the moment it is set up for OP-47 SDP (Subtitle Distribution Packet).
--
Petr Novak
Offline

asperi

  • Posts: 16
  • Joined: Sat Nov 27, 2021 5:59 pm
  • Real Name: Matt Cavis

Re: Play mpeg-2 file with 608/708 embedded captions out Deck

PostSat Dec 18, 2021 7:58 pm

Its has been crazy hard to get any sort of help on this, thank you so much for taking the time to reply. Just hoping to find a solution for passing 608/708 closed captions out a Blackmagic design Decklink board (we have the 4k extreme and the 4k SDI board).
Last edited by asperi on Mon Jan 24, 2022 3:42 pm, edited 2 times in total.
Offline

petrno

  • Posts: 17
  • Joined: Sat Jan 16, 2021 9:00 pm
  • Real Name: Petr Novak

Re: Play mpeg-2 file with 608/708 embedded captions out Deck

PostMon Dec 20, 2021 9:15 pm

Hi Matt,

I have downloaded your provided samples and I can extract the Closed Captions from all of them.

There are 3 different ways the 608/708 data are embedded in those samples.

In the files named 720ts_6DK01H_tru720og.ts and 1080i_PS_SampleFileCC.mpg, the 608/708 data are in the MPEG-2 Picture Extension User Data according to ATSC A/53 Part 4 Section 6.2. Using mediainfo you will see something like this:

Text #1
ID : 224 (0xE0)-CC1
Format : EIA-608
Muxing mode : A/53 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 4 min 14 s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC1

Text #2
ID : 224 (0xE0)-1
Format : EIA-708
Muxing mode : A/53 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 4 min 14 s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)

The file 1080i_PS_SampleFileCC.mpg contains the 608/708 data as MPEG-4 NAL units of type SEI according to SCTE 128-1 section 8.1 and 8.2, so mediainfo will show something like this:

Text #1
ID : 1-CC1
Format : EIA-608
Muxing mode : SCTE 128 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 2 min 46 s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC1

Text #2
ID : 1-1
Format : EIA-708
Muxing mode : SCTE 128 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 2 min 46 s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)


Finally, the MXF file 1080mxf_708_I28706.mxf uses a separate SMPTE 436M track which contains the CDP (Caption Distribution Packets) as VANC data - so this is the only case where the CC are not embedded into video and this is the closest to what I have been using with OP-47.

The mediainfo output for the MXF is like this:

Text
ID : 1280-1
Format : EIA-708
Muxing mode : Ancillary data / CDP
Duration : 3 min 6 s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Language : English

So with a bit of effort all these files can be output using a Decklink card to SDI with the 608/708 data as VANC.

I have written to you a private message via this forum (so please check it, it is in your User Control Panel) with my contact details so that we can take the rest offline, but for all the samples you have provided, I believe there is a solution to output the clip including the closed captions via a Decklink card.
--
Petr Novak
Offline

asperi

  • Posts: 16
  • Joined: Sat Nov 27, 2021 5:59 pm
  • Real Name: Matt Cavis

Re: Play mpeg-2 file with 608/708 embedded captions out Deck

PostMon Jan 03, 2022 8:02 pm

Thanks for the info Petr, posting here to see if there is anyone that has been successful at this as there currently is no budget to hire out. I built a version of ffmpeg 4.4 that includes the BMD 12.2 SDK on Ubuntu 20.04, it will play out the Decklink but still not getting captions to pass. Wondering if anyone knows a good line to get captions to pass...
These play fine out the SDI but shows no captions:

Code: Select all
ffmpeg -i /home/matt/VideoTests/1080i_PS_SampleFileCC.mpg -codec:v mpeg2video -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" -f decklink -a53cc boolean -map 0 -vcodec v210 "DeckLink SDI 4K"

ffmpeg -i /home/matt/VideoTests/1080i_PS_SampleFileCC.mpg -pix_fmt uyvy422 -f decklink -a53cc boolean -map 0 -vcodec v210 "DeckLink SDI 4K"

ffmpeg -i /home/matt/VideoTests/1080i_PS_SampleFileCC.mpg -codec:v mpeg2video -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" -pix_fmt uyvy422 -f decklink -a53cc boolean -map 0 -vcodec v210 "DeckLink SDI 4K"

ffmpeg -i /home/matt/VideoTests/1080i_PS_SampleFileCC.mpg -codec:v mpeg2video -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" -f decklink -a53cc boolean -map 0 -vcodec v210 "DeckLink SDI 4K"


Any ideas or help would be great. Thanks!

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 16 guests