[FFmpeg-devel] Handling dual language mono audio encoded as?stereo
Michael Niedermayer
michaelni
Wed Nov 10 21:15:09 CET 2010
On Tue, Jul 27, 2010 at 08:14:10AM +0300, Anssi Hannula wrote:
> Anssi Hannula kirjoitti lauantai, 17. hein?kuuta 2010 02:35:53:
> > Michael Niedermayer kirjoitti lauantai, 20. helmikuuta 2010 03:00:20:
> > > On Tue, Feb 16, 2010 at 12:35:02AM +0200, Anssi Hannula wrote:
> > > > > On Sun, Feb 14, 2010 at 07:32:08PM +0200, 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.
> > > >
> > > > it ["null" byte above] is the audio type code of the first track,
> > > > which is always present but is ignored by ffmpeg even without this
> > > > patch. There's another audio type code for the second channel after the
> > > > second ISO639 language code.
> > > >
> > > > The possible values are:
> > > > 00 Undefined
> > > > 01 Clean effects
> > > > 02 Hearing impaired
> > > > 03 Visual impaired commentary
> > > > 04-FF Reserved
> > > >
> > > > I guess we should somehow add this in metadata. Then of course there's
> > > > also the case where audio type differs between channels :)
> > >
> > > this really is a mess :(
> > > why do all these comitees always come up with doing everything in the
> > > most painfull and backwardly hacked in way.
> > > I guess simply setting the AVStream metadata to things like
> > > Channel0/Language="eng"
> > > Channel1/Language="jpn"
> > > Channel0/Disposition="comment"
> > > Channel0/TargetAudience="visually impaired"
> > >
> > > is the least annoying way to handle this
> >
> > Attached is a patchset that sets
> > channel0/language="eng"
> > channel1/language="jpn"
> > channel1/audio_type="visual impaired"
> > language="eng+jpn"
> >
> > This time also mpegtsenc gets the support, and there is also a patch for
> > ffplay to add '-ach' commandline option and 'c' key binding to switch
> > audible audio channel, and a patch for ffmpeg that adds '-achannel' for
> > selecting a single channel.
> >
> > If e.g. re-encoding channel 1 of above example, the metadata will be
> > mangled accordingly:
> > language="jpn"
> > audio_type="visual impaired"
> >
> > Now, about the metadata format... I named the "audio_type" key as per specs
> > as avformat.h does currently say "exported exactly as stored in the
> > container", though I'm not really sure if it can be applied like this.
> > Do you think we should directly mangle it to "target_audience" (and make it
> > a generic name listed in avformat.h?) as "visually impaired"?
> > If so, would "clean effects" translate to "disposition=clean effects"?
>
> After more thought, I think it'd be enough just using generic tags for
> audio_type.
>
> I guess those could be:
> (channelN/)target_audience="visually impaired"
> (channelN/)target_audience="hearing-impaired"
> (channelN/)disposition="clean effects"
>
> Do you agree?
yes but maybe "clean effects" should be called karaoke
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101110/59957bcb/attachment.pgp>
More information about the ffmpeg-devel
mailing list