[FFmpeg-devel] [PATCH] avformat/mov: parse 3gpp titl from media or track udta
Jan Ekström
jeebjp at gmail.com
Wed Jul 21 00:42:43 EEST 2021
On Wed, Jul 21, 2021 at 12:10 AM Jan Ekström <jeebjp at gmail.com> wrote:
>
> Seems to be:
> * Utilized by Handbrake for track titling
> * Actually defined as "title for the media"
>
> Definition from 3GPP TS 26.244 follows:
>
> Field Type Details Value
> BoxHeader.Size Unsigned int(32) BOX_SIZE
> BoxHeader.Type Unsigned int(32) 'titl'
> BoxHeader.Version Unsigned int(8) 0
> BoxHeader.Flags Bit(24) 0
> Pad Bit(1) 0
> Language Unsigned int(5)[3] Packed ISO-639-2/T language code
> Title String Text of title
>
> Semantics:
>
> Language: declares the language code for the following text. See
> ISO 639-2/T for the set of three character codes. Each character
> is packed as the difference between its ASCII value and 0x60.
>
> The code is confined to being three lower-case letters, so these
> values are strictly positive.
>
> Title: null-terminated string in either UTF-8 or UTF-16 characters,
> giving a title information. If UTF-16 is used, the string shall
> start with the BYTE ORDER MARK (0xFEFF).
> ---
A sample for this sort of metadata can be seen with
https://0x0.st/-zjq.m4v , which was posted at
https://github.com/mpv-player/mpv/issues/8488 .
The sample contains both "name" and "titl" boxes:
[udta: User Data Box]
position = 3991500
size = 71
[name]
position = 3991508
size = 28
[titl]
position = 3991536
size = 35
...out of which if I read QTFF documentation correctly "name" should
not be utilized for user-facing naming, and "titl" is actually a
user-facing metadata box. Thus I implemented the latter.
Jan
More information about the ffmpeg-devel
mailing list