Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#3043 closed enhancement (fixed)

RFE: Implement updated comment header packets in OGG/vorbis streams

Reported by: mathstuf Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: ogg vorbis
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I am looking to implement this feature, but am unsure of how best to approach it. It looks like the best thing to do would be to have libavcodec/vorbisdec.c:1741 set some flag to indicate that a new header should be parsed from the stream using libavformat (since this is where the comment/metadata parsing currently exists and it looks like just moving it into libavcodec would get pretty hairy).

The end goal is to have mpv output new titles, artist, etc. updates from an mpd stream (currently, only the first metadata packet is used).

Tracked for mpd on its issue tracker[1].


Change History (7)

comment:1 Changed 6 years ago by cehoyos

Please test current git head and add a failing ffmpeg command line together with the complete, uncut console output to make this a valid ticket.

comment:2 Changed 6 years ago by mathstuf

It's not really a failure in ffmpeg. I'm mainly looking at implementing code behind the comment[1] about ignoring vorbis comment headers. Here[2] is my post to the MPlayer list about the problem; I'll get master output from ffmpeg when I'm back at a computer.


comment:3 Changed 6 years ago by mathstuf

This is output from playing a -dumpstream from an MPD build with tags in it (note the "Ignoring comment header" line when MPD changed tracks):

% ../ffmpeg/bin/ffplay mpd-0.15.8.dump.ogg
ffplay version N-57001-g65c2fe7 Copyright (c) 2003-2013 the FFmpeg developers
  built on Oct  9 2013 23:05:22 with gcc 4.8.1 (GCC) 20130920 (Red Hat 4.8.1-10)
  configuration: --prefix=/home/boeckb/misc/root/ffmpeg
  libavutil      52. 46.101 / 52. 46.101
  libavcodec     55. 35.100 / 55. 35.100
  libavformat    55. 19.100 / 55. 19.100
  libavdevice    55.  4.100 / 55.  4.100
  libavfilter     3. 88.101 /  3. 88.101
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.103 /  0. 17.103
[ogg @ 0x3409460] Cannot identify new stream  0KB sq=    0B f=0/0   
[ogg @ 0x3409460] failed to create or replace stream
[ogg @ 0x3409460] Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from 'mpd-0.15.8.dump.ogg':
  Duration: 00:02:18.05, start: 0.000000, bitrate: 109 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, mono, fltp, 110 kb/s
      COMPOSER        : Christopher Tin & Shoji Kameda
      TITLE           : A Rapture
      DATE            : 2012-02-14
      DISC            : 1
      album_artist    : Stereo Alchemy
      ALBUM           : God of Love
      ARTIST          : Stereo Alchemy
      TRACK           : 1
[vorbis @ 0x340e640] Invalid packet1KB vq=    0KB sq=    0B f=0/0   
    Last message repeated 1 times
[vorbis @ 0x340e640] Invalid packet1KB vq=    0KB sq=    0B f=0/0   
[vorbis @ 0x340e640] Ignoring comment header  0KB sq=    0B f=0/0   

comment:4 follow-up: Changed 6 years ago by mathstuf

An initial stab at the implementation is on my GitHub? fork[1] of the mirror repository there. The next step is to get avformat to signal that there is new metadata available, but I'm unsure of how to best approach this. Any guidance?


comment:5 in reply to: ↑ 4 Changed 6 years ago by cehoyos

Replying to mathstuf:

Any guidance?

Unfortunately, most developers do not comment on patches posted here, consider posting your patch (or pointing to your github repository) on the ffmpeg-devel mailing list where developers will (hopefully) reply.

comment:6 Changed 5 years ago by mathstuf

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 5 years ago by cehoyos

  • Component changed from avcodec to avformat
  • Keywords ogg added
  • Priority changed from normal to wish
  • Version changed from 2.0.1 to git-master
Note: See TracTickets for help on using tickets.