Earthnuker
4th November 2021, 22:53
Hello everyone,
i am currently working on a tool to extract EIA-608 closed captions from MPEG2 streams demuxed from VOB files. Mainly as a learning excercise but also because ffmpeg's extractor doesn't work properly for me and neither does CCExtractor.
The decoding of the text itself works fine, but from the information i could find (EIA-608 Wikipedia article, VLC source code, ffmpeg source code, mencoder source code) it is not really clear to me where the timestamps for when to display the captions come from, when i use the PTS of the packet containing the "Display Buffer" control command the captions are delayed by a factor of about 12 (i.e. they run 12 times slower than they should).
VLC displays the caption without issue and with proper timing.
i hope someone can point me in the right direction.
(the end goal is to wrap this and some other tooling i wrote up in a script as a headless (maybe i'll add a GUI when everything works), cross-platform alternative to MakeMKV that's aimed at preparing DVDs for filtering using Vapoursynth or AVISynth)
Best regards,
Earthnuker
i am currently working on a tool to extract EIA-608 closed captions from MPEG2 streams demuxed from VOB files. Mainly as a learning excercise but also because ffmpeg's extractor doesn't work properly for me and neither does CCExtractor.
The decoding of the text itself works fine, but from the information i could find (EIA-608 Wikipedia article, VLC source code, ffmpeg source code, mencoder source code) it is not really clear to me where the timestamps for when to display the captions come from, when i use the PTS of the packet containing the "Display Buffer" control command the captions are delayed by a factor of about 12 (i.e. they run 12 times slower than they should).
VLC displays the caption without issue and with proper timing.
i hope someone can point me in the right direction.
(the end goal is to wrap this and some other tooling i wrote up in a script as a headless (maybe i'll add a GUI when everything works), cross-platform alternative to MakeMKV that's aimed at preparing DVDs for filtering using Vapoursynth or AVISynth)
Best regards,
Earthnuker