GNOME Bugzilla – Bug 682959
[0.11] flacparse: early EOS
Last modified: 2012-08-30 09:31:44 UTC
Hi, I am experiencing issues with decoding a FLAC file using software based on the gstreamer API. When played back in software such as Exaile or Totem, the playback stops at 1 minute and 36 seconds. However, when decoding the FLAC file using gst-launch I experience no issues. I use the following command to decode the FLAC file: "gst-launch-0.10 filesrc location=/tmp/test.flac ! flacdec ! audioconvert ! pulsesink" Furthermore, when I attempt to convert the FLAC file to OGG using Sound Converter, the OGG file is truncated to 1 minute and 36 seconds. However, when converting the OGG file using gst-launch, the result is just fine. I use the following command to convert the FLAC file to OGG: "gst-launch-0.10 filesrc location=/tmp/test.flac ! flacdec ! audioconvert ! vorbisenc ! oggmux ! filesink location=/tmp/test.ogg" The FLAC file origins from a WAV file I have ripped from a CD. I have attached the WAV file and the FLAC file to this bug report. The WAV file was converted to FLAC using gst-launch. I have also tried converting the WAV file to FLAC using Sound Converter but the resulting FLAC file suffers from the same. My system: gstreamer0.10 0.10.36-1 libogg 1.3.0-1 flac 1.2.1 Arch Linux 64-bit
Attachment was too big (100 MB), here is a link instead: http://rvzt.net/Temp/682959testfiles.zip I was helped over at the Sound Converter debugger and have found out what command Sound Converter sends in order to convert the FLAC file to OGG. This was what I found: "giosrc location="file:///tmp/test.flac" name=src ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.6 ! oggmux ! giosink location="file:///tmp/test.ogg"" The above commandline will create a truncated OGG file. After some experiments I got a working gst-launch pipeline which produces the same truncated OGG file. "gst-launch-0.10 filesrc location=/tmp/test.flac ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.6 ! oggmux ! filesink location=/tmp/test.ogg" More experiments showed that the issue is related to "decodebin name=decoder". When "flacdec" is used instead of that, the resulting OGG file is fine. I have yet to figure out what command Exaile or Totem uses to decode the FLAC file.
I suspect this is an issue with flacparse (which decodebin/playbin will plug before flacdec in recent versions of gstreamer), which is fixed in 0.10 git (and gstreamer 1.0), but will check the sample files.
Hrm, actually it's fixed in 0.10 git, but not in git master: tpm@zingle:~/gst/glib-0.10$ gst-launch-0.10 filesrc location=/home/tpm/tmp/test.flac ! decodebin ! progressreport ! fakesink progressreport0 (00:00:01): 333 / 333 seconds (100.0 %) Got EOS from element "pipeline0". tpm@zingle:~/gst/0.11$ gst-launch-1.0 filesrc location=/home/tpm/tmp/test.flac ! decodebin ! progressreport ! fakesink progressreport0 (00:00:01): 96 / 333 seconds (28.8 %) Got EOS from element "pipeline0".
Looks like merging some 0.10 stuff into master went a bit wrong way back: commit a2475a40a5df2cbed2443da33d5237936ea4cf71 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Thu Aug 30 11:30:01 2012 +0200 flacparse: fixup 0.11 port of suspect frame checking Fixes https://bugzilla.gnome.org/show_bug.cgi?id=682959