After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586957 - [ffdemux_ape] APE file metadata not retained during transcode
[ffdemux_ape] APE file metadata not retained during transcode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
0.10.22
Other Linux
: Normal normal
: 0.10.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-25 14:44 UTC by rigel
Modified: 2009-07-28 22:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description rigel 2009-06-25 14:44:43 UTC
Please describe the problem:
APE file metadata is not retained when converting to flac. (also to ogg, but i have tested that conversion less extensively)

Steps to reproduce:
1. gst-launch-0.10 filesrc location="14 - When DId You Stop Loving Me, When Did I Stop Loving You (Reprise).ape" ! decodebin ! fakesink -t

will display the metadata/tag information for the ape file

2. gst-launch-0.10 -v filesrc location="14 - When DId You Stop Loving Me, When Did I Stop Loving You (Reprise).ape" ! decodebin ! audioconvert ! flacenc quality=8 ! filesink location="./test.flac"

this will convert the file to flac but the metadata is not retained.
3. 


Actual results:
the file is converted to flac, but no metadata is added to the file. this includes the flac bitrate, which the encoding should be tagged with anyway.

Expected results:
that the file would convert and convert the tags to vorbis comments.

Does this happen every time?
yes

Other information:
$ gst-launch-0.10 -v filesrc location="14 - When DId You Stop Loving Me, When Did I Stop Loving You (Reprise).ape" ! decodebin ! audioconvert ! flacenc quality=8 ! filesink location="./test.flac"
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = application/x-apetag
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstApeDemux:apedemux0.GstPad:sink: caps = application/x-apetag
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdemux_ape:ffdemux_ape0.GstPad:sink: caps = application/x-ape
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = audio/x-ffmpeg-parsed-ape, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, depth=(int)16, codec_data=(buffer)820fd0071600
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = audio/x-ffmpeg-parsed-ape, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, depth=(int)16, codec_data=(buffer)820fd0071600
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_ape:ffdec_ape0.GstPad:sink: caps = audio/x-ffmpeg-parsed-ape, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, depth=(int)16, codec_data=(buffer)820fd0071600
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_ape:ffdec_ape0.GstPad:src: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstFlacEnc:flacenc0.GstPad:src: caps = audio/x-flac, channels=(int)2, rate=(int)44100

(gst-launch-0.10:4500): GStreamer-CRITICAL **: gst_util_uint64_scale: assertion `denom != 0' failed
/GstPipeline:pipeline0/GstFlacEnc:flacenc0.GstPad:sink: caps = audio/x-raw-int, rate=(int)44100, channels=(int)2, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstFlacEnc:flacenc0.GstPad:src: caps = audio/x-flac, channels=(int)2, rate=(int)44100, streamheader=(buffer)< 7f464c414301000002664c614300000022120012000000000000000ac4d7fb497ec53200000000000000000000000000000000, 84000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = audio/x-flac, channels=(int)2, rate=(int)44100, streamheader=(buffer)< 7f464c414301000002664c614300000022120012000000000000000ac4d7fb497ec53200000000000000000000000000000000, 84000028200000007265666572656e6365206c6962464c414320312e322e3120323030373039313700000000 >
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 3657622315 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstFlacEnc:flacenc0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstFlacEnc:flacenc0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_ape:ffdec_ape0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_ape:ffdec_ape0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdemux_ape:ffdemux_ape0.GstPad:audio_00: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdemux_ape:ffdemux_ape0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstApeDemux:apedemux0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstApeDemux:apedemux0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
Setting pipeline to NULL ...
FREEING pipeline ...

$ gst-launch-0.10 filesrc location="14 - When DId You Stop Loving Me, When Did I Stop Loving You (Reprise).ape" ! decodebin ! fakesink -t
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
FOUND TAG      : found by element "apedemux0".
          artist: Marvin Gaye
           album: Here My Dear
    track number: 14
           title: When DId You Stop Loving Me, When Did I Stop Loving You (Reprise)
FOUND TAG      : found by element "ffdemux_ape0".
     audio codec: Monkey's Audio
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 1109865274 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...


__tim (t. i. m @ zen co uk) from #gstreamer has been provided with a copy of the ape file for testing purposes.

tags were set by EasyTAG. many do not show up in soundconverter (which uses the GStreamer framework) for some reason.
Comment 1 Tim-Philipp Müller 2009-07-28 22:59:54 UTC
This should fix it:

 commit d917f59a84b1d81c14ed7642ab04d254a97838d2
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Tue Jul 28 23:21:11 2009 +0100

    ffmpegdemux: cache events from upstream and re-send them later
    
    Cache any events we get from upstream before we're open, especially
    tag events we may be getting from apedemux/id3demux or the like, and
    push them downstream later when we've added our pads instead of just
    dropping them silently. Fixes transcoding tags for Monkey's Audio
    Files with preceding APE or ID3v2 tags (#586957). Add minimal unit
    test for this.
    
    Also push stream tags later after the global tags and the newsegment
    event rather than right after creating the pad.