[FFmpeg-devel] [PATCH] write AC-3 metadata

Justin Ruggles justin.ruggles
Wed Dec 22 00:13:22 CET 2010

On 12/21/2010 05:20 PM, Kieran Kunhya wrote:

>> Date: Tuesday, 21 December, 2010, 21:56
>> Hi,
>> This patch adds writing of AC-3 metadata to the AC-3
>> encoder.
>> I chose to use AVOption instead of trying to move the
>> metadata API to
>> libavcodec because the AC-3 metadata isn't just regular
>> metadata.  Even
>> though it is not audio data, many of the fields actually
>> affect decoding.
>> Some of the options use integers to set a specific code
>> value rather
>> than using a float value directly (e.g. mixing
>> levels).  It looks a bit
>> ugly, but I chose to do this because there are only a few
>> valid values.
>>  Trying to determine which value the user wants by
>> comparing floats
>> seems more complicated.  Plus this allows the help
>> text to tell the user
>> what the valid values are for those options.
>> Thanks,
>> Justin
> Is there any possibility of making these metadata options changeable per frame? Quite useful for broadcast applications when the metadata needs to be different during advertising or during specific programming.

If you're changing programs, you should probably re-initialize encoding
anyway.  Other things can change too like bitrate, number of channels,

As for setting metadata per-frame, it is possible.  New patch attached.
 It adds an option to enable per-frame validation of metadata so that it
won't significantly affect performance when the option is not enabled.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_ac3_metadata.patch
Type: text/x-patch
Size: 16146 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101221/32797e8f/attachment.bin>

More information about the ffmpeg-devel mailing list