[FFmpeg-devel] [PATCHv4 0/7] vorbis: update metadata mid-stream

wm4 nfxjfg at googlemail.com
Mon Nov 18 11:29:20 CET 2013


On Sun, 17 Nov 2013 20:36:24 -0500
Ben Boeckel <mathstuf at gmail.com> wrote:

> Ogg/vorbis streams from MPD contain metadata updates mid-stream and need to be
> plumbed from ffmpeg. A new side_data type is added for the data. The ogg
> decoder in avformat needs a way for codecs to plumb up the metadata and then,
> finally, vorbis fills it in.
> 
> Patch 4 has ffmpeg combine multiple tags with the same name with semicolon
> separators. This is to prevent tags such as performer from only showing up as
> the last one in the file. An example file can be retrieved from my site[1].
> When played using this branch, the following is output as metadata:
> 
>       RELEASETYPE     : album;remix
>       PERFORMER       : prophetik (saxophone);Usa (percussion)
> 
> without the patch, the following is shown instead:
> 
>       RELEASETYPE     : remix
>       PERFORMER       : Usa (percussion)
> 
> The file is from the OverClocked Remix album Teen Agent.
> 
> Testing with flac, mp3 (via lame; twolame untested), and ogg/opus in MPD (and
> one mp3 stream from somafm) shows no mid-stream tag updates, only ICY Info, so
> I have not updated these decoders. If other formats are found, the
> av_packet_pack_dictionary function should make things easy.
> 
> The last patch contains an entry to doc/APIchanges.
> 
> [1]http://benboeckel.net/files/multi-performer.ogg
> [2]http://teenagent.ocremix.org/
> 
> Ben Boeckel (7):
>   avcodec: add side_data type for updated metadata
>   avpacket: add pack/unpack functions for AVDictionary
>   ogg: allow streams to update metadata
>   vorbis: append data from tags together
>   vorbis: extract metadata from the middle of a stream
>   avcodec/utils: use the unpack_dictionary function
>   Document new APIs for av_packet_{un,}pack_dictionary()
> 
>  doc/APIchanges               |  5 +++
>  libavcodec/avcodec.h         | 25 ++++++++++++++
>  libavcodec/avpacket.c        | 58 ++++++++++++++++++++++++++++++++
>  libavcodec/utils.c           | 25 +++-----------
>  libavformat/oggdec.c         | 26 ++++++++++++---
>  libavformat/oggdec.h         |  2 ++
>  libavformat/oggparsevorbis.c | 78 +++++++++++++++++++++++++++++++++++---------
>  7 files changed, 177 insertions(+), 42 deletions(-)
> 

I guess these all look ok, except for the one comment I posted. Although
I didn't look at patch 4 again (let's just say I hate classic C string
processing).


More information about the ffmpeg-devel mailing list