[FFmpeg-devel] Handling dual language mono audio encoded as stereo

Anssi Hannula anssi.hannula
Sun Feb 14 19:11:08 CET 2010

On sunnuntai 14 helmikuu 2010 19:32:08 Anssi Hannula wrote:
> Hi all!
> Some nordic DVB channels encode e.g. four mono tracks with different
> languages into two stereo tracks (mpeg layer 2). The ISO639 language
> descriptor then has both language codes, separated by a null byte. This is
> probably a remnant from pre-DVB era, but we should somehow handle it
> nevertheless.

Ah, looking at ISO/IEC 13818-1, the format is a sequence of 3-byte language 
codes and 1-byte audio types (0x00 being normal audio), and
"In the case of multilingual audio streams the sequence of 
ISO_639_language_code fields shall reflect the content of the audio stream."

Audio type byte is currently ignored by the mpegts demuxer.

> How should we handle this, what do you think?
> Attached is a patch which simply sets language tag to e.g. "nor+fin" for
> dual- language stereo tracks. Seems to show up correctly in ffplay (though
> of course there doesn't seem to be a way to choose a single channel from
> stereo track in ffplay).

Anssi Hannula

More information about the ffmpeg-devel mailing list