[FFmpeg-devel] [PATCH 3/5] mpegts: add channel specific languages into metadata

Janne Grunau janne-ffmpeg
Tue Feb 15 00:43:01 CET 2011


On Mon, Feb 14, 2011 at 11:11:45PM +0000, M?ns Rullg?rd wrote:
> > +                if (!language_key)
> > +                    break;
> > +                language_key[7] = '0' + ch;
> > +                language[0] = combined_lang[ch * 4 + 0] = get8(pp, desc_end);
> > +                language[1] = combined_lang[ch * 4 + 1] = get8(pp, desc_end);
> > +                language[2] = combined_lang[ch * 4 + 2] = get8(pp, desc_end);
> > +                language[3] = 0;
> > +                combined_lang[ch * 4 + 3] = '+';
> > +                av_metadata_set2(&st->metadata, language_key, language,
> > +                                 AV_METADATA_DONT_STRDUP_KEY);
> > +                if (get8(pp, desc_end))
> > +                    av_log_ask_for_sample(fc, "Multiple languages and non-zero audio_type.");
> > +            }
> > +            combined_lang[tag_count * 4 - 1] = 0;
> > +            av_metadata_set2(&st->metadata, "language", combined_lang,
> > +                             AV_METADATA_DONT_STRDUP_VAL);
> 
> I don't understand the idea behind this.  The descriptor applies to one
> program element (AVStream).  If it contains several language codes, this
> simply means the stream contains multiple languages.  The MPEG spec
> doesn't specify any further interpretation.  Does DVB use this to
> indicate multiple mono streams coded as one elementary stream?  I don't
> have those specs at hand.

The component descriptor is afaik the only way to signal dual mono mpeg
layer 2 streams for DVB. It doesn't specify how multiple languages in
the ISO 639 language descriptor should be interpreted. Dual mono is
generally considered deprecated in DVB.

Janne



More information about the ffmpeg-devel mailing list