soundconverter attempts to convert APE (Monkey's Audio) files but produces garbage

Bug #1096658 reported by Tim K
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
SoundConverter
Confirmed
Low
GautierPortet

Bug Description

Attempting to convert APE files to ogg produced garbage ogg files. This is potentially devastating if used with "delete original file"

Soundconverter needs to not try to convert files it can't convert. This is an absolutely horrible bug.

Tim K (kelletim)
tags: added: ape
tags: added: destruction ogg
Revision history for this message
Michael Schwendt (mschwendt) wrote :

Could you attach full output of "soundconverter --debug" for an attempt at converting the file?

Revision history for this message
Michael Schwendt (mschwendt) wrote :

It may also be necessary to show/publish the APE file and tell a bit about your GStreamer version and plugins. Here, SoundConverter 2.0.4 with Fedora 18, manages to convert APE (test files for versions 3970 and 3990).

Revision history for this message
Michael Schwendt (mschwendt) wrote :

I've had to install gstreamer-ffmpeg for the APE support:

$ rpm -q gstreamer-ffmpeg
gstreamer-ffmpeg-0.10.13-5.fc18.x86_64

Revision history for this message
Tim K (kelletim) wrote :

Here is the output, trying to convert a 39MB ape file, the resulting OGG is only 240K and about 8 seconds long:

$ soundconverter --debug
SoundConverter 2.0.1
  using Gstreamer version: 0.10.36
  using 8 thread(s)
  using gio
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
Queue start: 1 tasks, 8 thread(s).
launching: 'giosrc location="file:///home/tim/Music/Mercury_Living_Presence-Decca/APE/CD37-Brahms-Violin_Concerto_in_D_major_Khachaturian-Violin_Concerto/(02)%20Violin%20Concerto%20in%20D%20major,%20Op.%2077-%20II.%20Adagio.ape" ! typefind name=typefinder ! fakesink'
have_type: application/x-apetag (02) Violin Concerto in D major, Op. 77- II. Adagio.ape
found_type (02)%20Violin%20Concerto%20in%20D%20major,%20Op.%2077-%20II.%20Adagio.ape
Queue done in 0.012s (1 tasks)
Queue start: 1 tasks, 8 thread(s).
launching: 'giosrc location="file:///home/tim/Music/Mercury_Living_Presence-Decca/APE/CD37-Brahms-Violin_Concerto_in_D_major_Khachaturian-Violin_Concerto/(02)%20Violin%20Concerto%20in%20D%20major,%20Op.%2077-%20II.%20Adagio.ape" name=src ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.8 ! oggmux ! giosink location="file:///home/tim/Music/Mercury_Living_Presence-Decca/APE/CD37-Brahms-Violin_Concerto_in_D_major_Khachaturian-Violin_Concerto/_02__Violin_Concerto_in_D_major__Op._77-_II._Adagio.ogg"'
found_tags: (02) Violin Concerto in D major, Op. 77- II. Adagio.ape
 container-format=APE tag
got file duration: -1
found_tags: (02) Violin Concerto in D major, Op. 77- II. Adagio.ape
 audio-codec=Monkey's Audio
found_tags: (02) Violin Concerto in D major, Op. 77- II. Adagio.ape
 codec=Vorbis
 audio-codec=Vorbis
Queue done in 4.272s (1 tasks)

Revision history for this message
Tim K (kelletim) wrote :

My gstreamer version is 0.10.13-5. I have all the libs to play ape files with gstreamer ....

Revision history for this message
Tim K (kelletim) wrote :

Actually that's not right, see the output of soundconverter above, it's gstreamer 0.10.36. The .10.13-5 is the version in the ubuntu repo, not sure how they're different, since I'm using strictly stock ubuntu 12.10

Revision history for this message
Tim K (kelletim) wrote :

Here's all my gstreamer related packages and version:

Package: libgstreamer0.10-0
Version: 0.10.36-1ubuntu2
Package: gstreamer0.10-plugins-base
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-plugins-base
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-gconf
Version: 0.10.31-3ubuntu1
Package: gstreamer0.10-pulseaudio
Version: 0.10.31-3ubuntu1
Package: gstreamer0.10-plugins-good
Version: 0.10.31-3ubuntu1
Package: gstreamer0.10-tools
Version: 0.10.36-1ubuntu2
Package: gstreamer0.10-alsa
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-alsa
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-doc
Version: 0.10.36-1ubuntu2
Package: libgstreamer0.10-dev
Version: 0.10.36-1ubuntu2
Package: gstreamer0.10-gnonlin
Version: 0.10.17-2build1
Package: gstreamer0.10-gnonlin-dbg
Version: 0.10.17-2build1
Package: gstreamer0.10-gnonlin-doc
Version: 0.10.17-2build1
Package: gstreamer0.10-nice
Version: 0.1.2-1
Package: gstreamer0.10-plugins-bad
Version: 0.10.23-7ubuntu1
Package: gstreamer0.10-plugins-base-apps
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-plugins-base-apps
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-plugins-base-dbg
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-plugins-base-dbg
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-x
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-x
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-gnomevfs
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-gnomevfs
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-plugins-bad-dbg
Version: 0.10.23-7ubuntu1
Package: gstreamer0.10-plugins-base-doc
Version: 0.10.36-1ubuntu1.1
Package: gstreamer0.10-plugins-base-doc
Version: 0.10.36-1ubuntu1
Package: gstreamer0.10-plugins-good-doc
Version: 0.10.31-3ubuntu1
Package: gstreamer0.10-plugins-good-dbg
Version: 0.10.31-3ubuntu1
Package: gstreamer0.10-fluendo-mp3
Version: 0.10.15.debian-1ubuntu1
Package: gstreamer0.10-plugins-ugly
Version: 0.10.19-2
Package: libgstreamer0.10-0-dbg
Version: 0.10.36-1ubuntu2
Package: gstreamer0.10-ffmpeg
Version: 0.10.13-5
Package: gstreamer0.10-plugins-ugly-dbg
Version: 0.10.19-2
Package: gstreamer0.10-plugins-bad-multiverse
Version: 0.10.21-1
Package: gstreamer0.10-buzztard
Version: 0.6.0-1
Package: gstreamer0.10-plugins-cutter
Version: 1.1.7-1.2
Package: gstreamer0.10-plugins-ugly-doc
Version: 0.10.19-2
Package: gstreamer0.10-buzztard-doc
Version: 0.6.0-1
Package: gstreamer0.10-chromaprint
Version: 0.1-3
Package: gstreamer0.10-crystalhd
Version: 1:0.0~git20110715.fdd2f19-7
Package: gstreamer0.10-dvswitch
Version: 0.0.1-1
Package: gstreamer0.10-ffmpeg-dbg
Version: 0.10.13-5
Package: gstreamer0.10-hplugins
Version: 0.2.0-2
Package: gstreamer0.10-packagekit
Version: 0.7.6-1
Package: gstreamer0.10-plugins-bad-doc
Version: 0.10.23-7ubuntu1
Package: gstreamer0.10-pocketsphinx
Version: 0.5.1+dfsg1-0ubuntu3
Package: gstreamer0.10-qapt
Version: 1.4.1-0ubuntu2
Package: gstreamer0.10-vaapi
Version: 0.3.6-0ubuntu3
Package: gstreamer0.10-vaapi-doc
Version: 0.3.6-0ubuntu3
Package: libgstreamer0.10-cil-dev
Version: 0.9.2-4
Package: gstreamer0.10-plugins-bad-multiverse-dbg
Version: 0.10.21-1

Revision history for this message
Michael Schwendt (mschwendt) wrote :

> got file duration: -1

That's odd, and SoundConverter doesn't seem to handle the -1 value (there are examples which simply ignore it), but here a duration of -1 is not enough to reproduce a truncated conversion.

Are you able to cut'n'paste the following into a terminal in order to run GStreamer conversion at the command-line? Not inserting any type mistakes would be important, as well as working with an input file that exists, and after a few seconds (at most) the output should be in file "test.ogg" in your home dir. Adjust the two input/output file paths as necessary.

gst-launch giosrc location="file:///home/tim/Music/Mercury_Living_Presence-Decca/APE/CD37-Brahms-Violin_Concerto_in_D_major_Khachaturian-Violin_Concerto/(02)%20Violin%20Concerto%20in%20D%20major,%20Op.%2077-%20II.%20Adagio.ape" name=src ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.8 ! oggmux ! giosink location="file:///home/tim/test.ogg"

Revision history for this message
Tim K (kelletim) wrote :

sure -

Tried this on a 58MB ape file:
tim@echo:~$ gst-launch giosrc location="file:///home/tim/test.ape" name=src ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.8 ! oggmux ! giosink location="file:///home/tim/test.ogg"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 3916433311 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

the result is a severely truncated ogg file:

tim@echo:~$ ls -lrt test.*
tim@echo:~$ ls -lrht test.*
-rw-r--r-- 1 tim tim 58M Jan 7 10:57 test.ape
-rw-rw-r-- 1 tim tim 42K Jan 7 11:00 test.ogg

Revision history for this message
Michael Schwendt (mschwendt) wrote :

So, the problem is reproducible outside SoundConverter already. With the GStreamer pipeline that doesn't manage to convert the file either.

What audio player do you play your APE files with?

The following is a simple GStreamer pipeline to play it via ALSA and/or Pulse Audio (alternativel "pulsesink" instead of "alsasink"), which should work except for maybe minor buffering issues:

gst-launch giosrc location="file:///home/tim/test.ape" name=src ! decodebin name=decoder ! audioconvert ! audioresample ! alsasink

Revision history for this message
GautierPortet (kassoulet) wrote :

Doesn't sound like a SoundConverter problem, and it will be difficult to do anything if we can't reproduce. I will try to find an APE file and an Ubuntu.

Anyway SoundConverter should probably take the -1 duration as an error.

Revision history for this message
GautierPortet (kassoulet) wrote :

GStreamer cannot read APE files on Ubuntu 12.10 for me.

Changed in soundconverter:
status: New → Confirmed
assignee: nobody → GautierPortet (kassoulet)
importance: Undecided → Low
Revision history for this message
Tim K (kelletim) wrote : Re: [Bug 1096658] Re: soundconverter attempts to convert APE (Monkey's Audio) files but produces garbage

Yes it appears to be a gstreamer problem, but soundconverter really should
be able to tell and send an error accordingly, not just merrily produce
junk files, especially since "delete original file" is an option ....

On Wed, Jan 9, 2013 at 9:24 AM, GautierPortet <email address hidden> wrote:

> Doesn't sound like a SoundConverter problem, and it will be difficult to
> do anything if we can't reproduce. I will try to find an APE file and an
> Ubuntu.
>
> Anyway SoundConverter should probably take the -1 duration as an error.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1096658
>
> Title:
> soundconverter attempts to convert APE (Monkey's Audio) files but
> produces garbage
>
> Status in SoundConverter:
> Confirmed
>
> Bug description:
> Attempting to convert APE files to ogg produced garbage ogg files.
> This is potentially devastating if used with "delete original file"
>
> Soundconverter needs to not try to convert files it can't convert.
> This is an absolutely horrible bug.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/soundconverter/+bug/1096658/+subscriptions
>

--
Tim Kelley

Revision history for this message
GautierPortet (kassoulet) wrote :

The problem is that from the SoundConverter process, everything is fine. GStreamer stops decoding after a few seconds, without raising an error.

Revision history for this message
Speckmade (speckmade) wrote :

just used it with "delete original"... :-(
what's up? will it be solved? can it at least decline to process any *.ape?
very frustrating...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.