[FFmpeg-devel] [PATCH] write AC-3 metadata
Justin Ruggles
justin.ruggles
Fri Dec 31 17:53:42 CET 2010
On 12/31/2010 10:08 AM, Anssi Hannula wrote:
> On 31.12.2010 15:31, Kieran Kunhya wrote:
>>> clean effects ? This field indicates that the referenced
>>> program element has no language.
>>> hearing impaired ? This field indicates that the
>>> referenced program element is prepared for the hearing
>>> impaired.
>>> visual_impaired_commentary ? This field indicates that the
>>> referenced program element is prepared for the visually
>>> impaired viewer.
>>> [...]
>>
>> For what it's worth, I've never seen anyone use anything other
>> than "undefined" for that field in MPEG-2 systems. Visual Impaired
>> commentary uses the country code "NAR" over here in the UK.
>
> Here in Finland visual impaired commentary is marked correctly using
> that field (additionally it has the country code "hun").
Well, since this is both codec-level and container-level information,
there are limited options to support it.
1) a new field in AVCodecContext called audio_service_type
- define FF_AUDIO_SERVICE_TYPE_AC3_COMPLETE_MAIN, etc...
- define FF_AUDIO_SERVICE_TYPE_MPEG2LANG_CLEAN_EFFECTS, etc...
- set the values in demuxers/decoders/muxers/encoders
- I don't know if this would copy over when transcoding though
2) Move the metadata API to libavcodec and use key "audio_service_type"
- define generic values so that they are compatible across
formats/codecs
- convert names to codes and vice-versa
- Downside: mixing of metadata and AVOption APIs to set codec
bitstream parameters
> Also, somewhat relatedly, some channels (eurosport mainly, at least when
> I last checked) are broadcast with mono audio encoded as 2 channels of a
> single stream and therefore there are multiple language tags present per
> stream.
I am curious to know if those streams contain AC-3 in dual-mono or if it
is actually indicated as stereo in the AC-3 stream itself. Do you
happen to have a sample? We don't support dual mono channel layout
currently, but we could possibly add AV_CH_DUALMONO1, AV_CH_DUALMONO2,
and AV_CH_LAYOUT_DUALMONO. And in that case, some of the AC-3 metadata
is specified per-channel as well.
-Justin
More information about the ffmpeg-devel
mailing list