[FFmpeg-devel] [PATCH v3 1/1] avformat/mpegtsenc: Write necessary descriptors into PMT for arib_caption muxing

zheng qian xqq at xqq.im
Wed Apr 21 04:00:07 EEST 2021


On Wed, Apr 21, 2021 at 7:04 AM Jan Ekström <jeebjp at gmail.com> wrote:
>
> I think in general I am preferring the "follow the TR" way since I
> just heard another implementer generally speaking also ignores
> everything else than 0x30/0x87.
>
> Did not yet add the per-program limitation but poked a bit at it with
> https://github.com/jeeb/ffmpeg/commits/mpegts_arib_caption_muxing .
>
> 1. Split the writing of the ARIB caption descriptor as the PMT writing
> function is already way too long. Was not sure if exit or plain break
> would be sufficient, but nothing else around in that function seems to
> return with an error... so break it is.
> 2. Added logging in case an unset/unknown profile was utilized.
> 3. Re-added extraction of additional_arib_caption_info into extradata,
> and writing it out in the muxer if available.
>

I doubt whether it's necessary to extract addtitional_arib_caption_info.
According to ARIB TR-B24, Fascicle 1, 4.2.8.4 - 4.2.8.5:

> Data Encoding Method Descriptor required in PMT:
>     DMF is always '0011', aka 0x3
>     Timing is always '01' for caption, aka 0x1

Reversed is filled as '11'  aka 0x3 as you know, so for arib_caption,
addtitional_arib_caption_info could be determined as 0x3d.

ARIB superimpose should utilize Timing(00) since superimpose
uses Asynchronous_PES, but it belongs to another topic.

In other words, addtitional_arib_caption_info can be generated by
profile information safely and is not necessary to copy by extradata.

Regards,
zheng

> Feel free to note how you like these changes :)
>
> Jan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list