[FFmpeg-devel] I want to make ffmpeg read Matrox DVCPRO SD files with Closed Caption(608). But, line 21 is hidden.
Helmuth Schmitz
helmuthschmitz at gmail.com
Tue Mar 31 22:44:14 EEST 2020
I'm a lit bit crazy with some especific video files. I want to decode it
and change ffmpeg to specifically decode 608 Closed Captions.
The AVI file format/codec is DVCPRO at SD(720x480) resolution. The enconder
is "Matrox DSX AVI file . Format: 6. Build: 1.0.0.451"
That's was ok, until moment i tried to see or decode 608 closed captions.
There was nothing at line 21. So, i decid to play this file at
Matrox Sample Video Player(an example of their SDK) and for my surprise
there was 608 closed captions.
So, i read Matrox SDK documentation, and found this
"Using closed caption information Some of the Matrox NTSC codecs can
extract the closed caption information from the video buffers and store it
as metadata in the compressed buffer. On decompression, these same codecs
can restore the lines to their proper position. Other NTSC codecs just
encode the closed caption lines as video data. The closed caption lines
that are extracted are defined by the EIA-608 specification. The two lines
are defined as lines 21 from both the first and second fields. The
following codecs keep the closed caption lines as metadata (NTSC only): •
Matrox DV (encode and decode). • Matrox MPEG-2 I-frame (encode and decode).
• Matrox MPEG-2 IBP, except 720×512 resolution (decode only). The following
codecs keep the closed caption lines as video data (NTSC only): • Matrox
D10 (encode and decode). • Matrox MPEG-2 IBP in 720 ×512 resolution (decode
only). • Matrox M-JPEG (decode only)."
So, i thought that VBI or Closed Caption(608) will be stored at some
metadata. But, exploring the entire file,
i found nothing "hide" in metadata. Even in frames metadata. Is like magic.
There is nothing in line 21 and
nothing in metadata's. So, how Matrox sample example is the only one video
player that show's it?
I wrote a small AVI parser using c/c++ to verify this AVI content. All
chunks seems to be right and there's no data
stream and no subtitle stream neither. So, from where this closed caption
608 come from? it seems that isn't
anywhere, but when i play it using Matrox Video Player ... this 608 closed
caption show's ok. With all others
players, including ffmpeg, it dosent show it.
This video is DCPRO SD yuv411p 29.97 25mbit
But Matrox Sample Player called "Flex Channel Tester", treats this video as
720x486 instead 720x480.
And this, makes all sense, cause in digital video, the analog line 21,
needs a few more lines,
what leave as 486 instead 480 pixels(i guess)
So, i know maybe i am being stuped asking what i will ask you guys now...
but, if try force(changing sourcecode of course) ffmpeg treat this video
stream as 720x486, forcing decoder uses additional bytes maybe can
work to bring back full video displayiung the CC608 on top?
I believe that this CC608(VBI, ANcilary data) is really hidden inside every
encoded frame buffer. Probably in
the end of every frame packet(maybe i sounds stup right now haha)
Has anybody someideia how can i solve this?
I want to give this feature to FFmpeg. Let FFMpeg treat this like regutlar
CC608 or even some subtitle.
Best regards,
Helmuth Schmitz
Ahhhh... sorry for my english
More information about the ffmpeg-devel
mailing list