Is it possible to find a way to preserve or convert the EIA-608 Closed Caption data into CEA-708 (10 bit VANC) when transcoding files?
Here is the source file info. Scrolling down to the bottom, you see the existing EIA-608 data location.
Complete name : \\10.0.0.202\dubs\AM9196SPPZ24.mpg
Format : MPEG-PS
File size : 1.30 GiB
Duration : 28 min 30 s
Overall bit rate mode : Constant
Overall bit rate : 6 512 kb/s
Frame rate : 29.970 FPS
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings : BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=12
Format settings, picture structure : Frame
Duration : 28 min 29 s
Bit rate mode : Constant
Bit rate : 6 127 kb/s
Maximum bit rate : 6 000 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 (30000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.591
Time code of first frame : 00:00:10;00
Time code source : Group of pictures header
GOP, Open/Closed : Closed
Stream size : 1.22 GiB (94%)
Audio
ID : 192 (0xC0)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 28 min 30 s
Bit rate mode : Constant
Bit rate : 256 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 41.667 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 52.2 MiB (4%)
Text
ID : 224 (0xE0)-CC1
Format : EIA-608
Muxing mode : A/53 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 28 min 29 s
Duration of the visible content : 28 min 28 s
Start time (commands) : 604 ms
Start time : 638 ms
End time : 28 min 29 s
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Count of frames before first event : 44
Type of the first event : RollUp
Closed captions 608 to 708 VANC
Re: Closed captions 608 to 708 VANC
Hi Ray,
transporting teletext data is a very very dark ancient art.
Answer is: cannot be answered without knowing your output format but for start i can tell you that for mxf you have to buy something, no open source that i know can put 608/708 into mxf.
transporting teletext data is a very very dark ancient art.
Answer is: cannot be answered without knowing your output format but for start i can tell you that for mxf you have to buy something, no open source that i know can put 608/708 into mxf.
emcodem, wrapping since 2009 you got the rhyme?
Re: Closed captions 608 to 708 VANC
yeah... emcodem is right, unfortunately with open source tools the only thing we can do is preserve a subtitles track, like if you wanted to remux it in the end file but without changing container nor Teletext page. Unfortunately there's no way to convert it or indeed change the page. 
I know 'cause I still mux .stl subtitles into mxf as OP-47 (i.e carried via a 436M track) with the Italian being in page 777 and the original language being in page 778. Unfortunately no open source implementation was able to do that.
Oh and by the way, that would only work with a command line execution node that uses ffmpeg because any internal encoder has -map_metadata -1 which would nuke the TTX (which is the right thing to do in 99.9% of the use cases). Also keep in mind that open source tools also can't change the timecode of embedded subtitles, which means that if you had a source at let's say 01:00:00:00 and you changed the timecode to 10:00:00:00 then the subtitles would no longer be displayed. Last but not least, subtitles are also frame rate dependant, so if you convert the video frame rate and just remux them they would go out of sync.
TL;DR it's a mess and unfortunately it's such a tiny market that nobody ever made an open source implementation.

I know 'cause I still mux .stl subtitles into mxf as OP-47 (i.e carried via a 436M track) with the Italian being in page 777 and the original language being in page 778. Unfortunately no open source implementation was able to do that.

Oh and by the way, that would only work with a command line execution node that uses ffmpeg because any internal encoder has -map_metadata -1 which would nuke the TTX (which is the right thing to do in 99.9% of the use cases). Also keep in mind that open source tools also can't change the timecode of embedded subtitles, which means that if you had a source at let's say 01:00:00:00 and you changed the timecode to 10:00:00:00 then the subtitles would no longer be displayed. Last but not least, subtitles are also frame rate dependant, so if you convert the video frame rate and just remux them they would go out of sync.
TL;DR it's a mess and unfortunately it's such a tiny market that nobody ever made an open source implementation.

-
- Posts: 19
- Joined: Thu Dec 09, 2021 9:06 pm
Re: Closed captions 608 to 708 VANC
HI, TKS FOR YOUR HELP.
Here is the configuration file that i need to keep when file pass true FFastrans.
Format: .MXF
Format profile: OP-1a
VIDEO
Format: MPEG Video: XDCAM HD422
Bit rate: 50.0 Mb/s
Width: 1 920 pixels
Height: 1 080 pixels
Display aspect: 16:9
Frame rate: 29.970
Scan type: Interlaced
Audio #1
Format: PCM
Sampling rate: 48.0 kHz
Frame rate: 29.970 FPS
Bit depth: 24 bits
Audio #2 (AUDIO DESCRICAO)
Format: PCM
Sampling rate: 48.0 kHz
Frame rate: 29.970 FPS
Bit depth: 24bits
CLOSED CAPTION
Text
ID: 1024-CC1
Format: EIA-608
Caption Service Name: CC1
Here is the configuration file that i need to keep when file pass true FFastrans.
Format: .MXF
Format profile: OP-1a
VIDEO
Format: MPEG Video: XDCAM HD422
Bit rate: 50.0 Mb/s
Width: 1 920 pixels
Height: 1 080 pixels
Display aspect: 16:9
Frame rate: 29.970
Scan type: Interlaced
Audio #1
Format: PCM
Sampling rate: 48.0 kHz
Frame rate: 29.970 FPS
Bit depth: 24 bits
Audio #2 (AUDIO DESCRICAO)
Format: PCM
Sampling rate: 48.0 kHz
Frame rate: 29.970 FPS
Bit depth: 24bits
CLOSED CAPTION
Text
ID: 1024-CC1
Format: EIA-608
Caption Service Name: CC1
Re: Closed captions 608 to 708 VANC
hi @luzimarsorgi 
unfortunately we do not know any opensource tools that are able to deal with EIA-608 in MXF container. I looked into it myself but it is just too much work to add this to BMX or ffmpeg just for fun.

unfortunately we do not know any opensource tools that are able to deal with EIA-608 in MXF container. I looked into it myself but it is just too much work to add this to BMX or ffmpeg just for fun.
emcodem, wrapping since 2009 you got the rhyme?
Re: Closed captions 608 to 708 VANC
I know it is a dead horse, however it is a shame. We once used FFAStran extensively but have simply stopped using it. Without the Closed Caption preservation, it has no real purpose in our environment.
Re: Closed captions 608 to 708 VANC
@Ray4x4x4 Yeah its a pity. I'm not even aware about any "small" tool that one could maybe buy and utilize it in ffastrans. Even @FranceBB had to spend a few ten thousands to the major vendors for the worfklows where he needs it. Well maybe there are ways to sub-utilize something like adobe premiere via watchfolders but such solutions are really ugly.
emcodem, wrapping since 2009 you got the rhyme?
Re: Closed captions 608 to 708 VANC
Nothing open source exists anywhere on the web unfortunately. There just doesn't seem to be much interest.

Yeah... Speaking of major vendors, Cavena (fairly old software) runs on prem and can mux .stl files in an mxf container just fine to create a 436m track. Unfortunately, the company who created it went bursted long time ago, so it can't be bought any longer, but it used to be possible to buy it alongside the USB dongle and use it.
Telestream DisadVantage (pun absolutely intended) can also mux an .stl file in an mxf container to create a 436m track, however, unlike Cavena, its Timed Text Flip only supports one language, which means that if you have two subtitles (like we do with Italian in page 777 and the Original language in page 778) you're out of luck. Telestream nowadays is pushing everyone towards their cloud thing 'cause, you know, why selling software and cash in once when you can sell a service and cash in every time. Anyway, EDC (encoding.com, their cloud thing, which they now rebranded DisadVantage Gateway - pun still intended) supports muxing .stl into the .mxf container and it can take multiple inputs (so multiple languages). It supports remuxing several codecs (both video and audio) in the mxf container when it's muxing the subs in, including UHD the likes of XAVC Intra Class 300. It even allows you to perform framerate conversion, so you can have a video at 50fps and the subtitles at 25fps and it will automatically convert the framerate of the subs before muxing them so you can just create the subs once for the FULL HD 25i version (which for us is a normal XDCAM-50) and re-use them for the UHD 50p version (which for us is an XAVC Intra Class 300). It even supports remuxing with ommcp which is the proprietary omneon muxer provided by Harmonic and it currently supports version 10.1.0.0.1 which is the latest one released in summer 2024. I'm not a fan of Telestream as a company to say the least (I won't comment any further) and this functionality used to be limited and far from perfect, but there were a few people - one of which is Denis Kalashnikov - who talked to me on a weekly basis and sure enough fixed everything. To this day, I'm using EDC on a daily basis in our supply chain. Keep in mind that all our supply chains are Avisynth based and go through FFAStrans for the encoding part so much so that we're NOT using EDC to encode anything, but muxing .stl into an .mxf container to create a 436m Teletext track is such a niche thing that there aren't many things that can do that.
From the distribution side, ATEME Titan can take the .stl file and mux them in a .ts container by maintaining the styling, positioning etc and it can also take them from the 436m track within the mxf container and remux them in a .ts container just fine. I haven't had any issues with it.
Hyper (the NTT Data encoder maintained by Fabio Sonnati) can also do just that both from the sidecar .stl file and from the embedded 436m track in the mxf container.
AWS Elemental Mediaconvert (as of now) can only do it by using the embedded 436m track, however there are issues with it, like the fact that if you set the muxing bitrate as automatic it will get it wrong and reserve almost 2 Mbit/s for the subtitles track instead of 394 kbit/s and then when it realises that it doesn't need as much bitrate it just fills the stream with zeroes (padding). If you make it use a sidecar .stl file instead it will lose the styling and positioning like it won't read the colour tags etc.
This is just to say that this is such a niche thing that even major players in the industry are struggling to get it right or even support it at all.
I really hope someone will write something open source to do it, but as things currently stand, there's no such a thing.
Heck, if you mux the subtitles in an mxf container, you can't even decode them as there's no open source demuxer+decoder that can read them and display them, in fact MPV won't even tell you that they're there and FFMpeg will only tell you that there's a data track (vbi_vanc_436m) and the only thing it can do it remux it (i.e pass it through) but if - for instance - you change the timecode, it won't change the timecode of the subtitles. Same goes if you change the framerate. So yeah, tough times for the Teletext aficionados...
