[FFmpeg-trac] #9113(ffmpeg:new): [MPEG-TS] Allow setting the disposition without also setting the language for a track
FFmpeg
trac at avcodec.org
Sun Feb 21 18:42:15 EET 2021
#9113: [MPEG-TS] Allow setting the disposition without also setting the language
for a track
-------------------------------------+-------------------------------------
Reporter: droid-xx | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version:
Keywords: disposition | unspecified
mpegts ts | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
In MPEG-TS streams the ISO 639 language descriptor holds information about
both the language and the audio type (clean effects, hearing impaired, or
visual impaired) of a track.
When remuxing to .ts container, if the user sets the language for a track,
an ISO 639 language descriptor containing the correct language code and an
undefined audio_type is attached to the stream.
Command used:
{{{
ffmpeg -i input.ts -map 0 -metadata:s:a:0 language=eng -c copy output.ts
}}}
Output from an MPEG-TS stream analyzer regarding the language descriptor
of the first audio track:
{{{
descriptor_tag=0x0a
descriptor_length=4
ISO_639_language_code=eng
audio_type=0 (Undefined)
}}}
If the user sets the language AND the disposition for a track, an ISO 639
language descriptor is created for that track in the output, containing
both the passed language code and audio type.
Command used:
{{{
ffmpeg -i input.ts -map 0 -metadata:s:a:0 language=eng -disposition:a:0
clean_effects -c copy output.ts
}}}
Language descriptor of the first audio track in the output file:
{{{
descriptor_tag=0x0a
descriptor_length=4
ISO_639_language_code=eng
audio_type=1 (Clean effects)
}}}
However if the user sets only the disposition for a track (without a
language), disposition settings are ignored in the output file and there's
no language descriptor assigned to the specified track.
Correct behavior would be: if the user sets the disposition for a track,
without also setting the language, then proceed to assign a language
descriptor with an undefined ISO_639_language_code and an "audio_type"
corresponding to the passed disposition (just like what happens when
setting only the language, but reverse).
Command used (not working, i.e. no language descriptor assigned to the
first audio track):
{{{
ffmpeg -i input.ts -map 0 -disposition:a:0 clean_effects -c copy output.ts
}}}
Language descriptor that would otherwise be expected in the output:
{{{
descriptor_tag=0x0a
descriptor_length=4
ISO_639_language_code=und
audio_type=1 (Clean effects)
}}}
Language code is allowed to be undefined, and the "clean effects" audio
type only makes sense to also be undefined because it indicates that the
referenced track has no language. The language codes of the remaining two
dispositions can also be undefined.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9113>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list