Read AIFF metadata

Michael Schwendt mschwendt at gmail.com
Sun Feb 10 12:27:10 UTC 2013


On Sat, 09 Feb 2013 21:01:09 -0500, Kanwar Ranbir Sandhu wrote:

> On Sat, 2013-02-09 at 18:06 +0100, Michael Schwendt wrote:
> > I wonder what happens if you convert them using "soundconverter"?
> > SoundConverter uses GStreamer as a backend, which afaik handles ID3
> > tags in AIFF files.
> 
> I installed soundconverter and tried to read in one of the AIFF files -
> it no worky!

"it no worky" is a very poor problem description, unfortunately. :-/
It has been interesting enough to make me fetch my collection of audio
test files and take a brief look myself:

  $ gst-inspect-0.10 |grep aiff
  aiff:  aiffparse: AIFF audio demuxer
  aiff:  aiffmux: AIFF audio muxer
  typefindfunctions: audio/x-aiff: aiff, aif, aifc

gstreamer-ffmpeg also advertizes support of AIFF but with the warning
"not recommended, use aiffmux". So, I continued with just this

  $ rpm -qf /usr/lib64/gstreamer-0.10/*aiff*
  gstreamer-plugins-bad-free-0.10.23-13.fc18.x86_64

and the default GStreamer 0.10 based audio player. However, it turnt out
I'm currently unable to use Rhythmbox. It's an application that thinks it
knows better than me what to do, so it starts scanning my entire home dir,
fills terminal output with hundreds of warnings (one even says "this
should never happen"), and I cannot be bothered to find a way to make it
scan my test files folder or open a single file only. I've uninstalled it
now [again].

Since Audacious plays AIFF via either libsndfile or ffmpeg and doesn't use
GStreamer, I searched for a different GStreamer based audio player,
installed "decibel-audio-player": it's written in Python and features
hardcoded support for a few file formats only and doesn't handle AIFF:

  $ cd /usr/share/decibel-audio-player/src/media/format/
  $ ls *.py
  asf.py   __init__.py      mp3.py  mpc.py  wavpack.py
  flac.py  monkeysaudio.py  mp4.py  ogg.py  wav.py

Next tried "whaawmp", it's also written in Python and also filters out
AIFF in its file viewer.

Totem (based on GStreamer 1.x instead) opens a dialog, offers to search
for a plug-in, but doesn't find any.

Back to GStreamer 0.10.x, what does the GStreamer documentation say?

  http://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/gst-plugins-bad-plugins-0.10/

  $ gst-launch-0.10 filesrc location=love_theme.aiff ! aiffparse ! audioconvert ! alsasink

That one plays the test file, at least.
So, what's up with SoundConverter?

  $ soundconverter -d love_theme.aiff 
  SoundConverter 2.0.4
  ...
  launching: 'giosrc location="file:///home/personal/Music/test/love_theme.aiff" ! typefind name=typefinder ! fakesink'
  have_type: audio/x-aiff love_theme.aiff
  found_type love_theme.aiff
  Queue done in 0.006s (1 tasks)
  Queue start: 1 tasks, 2 thread(s).
  launching: 'giosrc location="file:///home/personal/Music/test/love_theme.aiff" name=src ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.6 ! oggmux  ! giosink location="file:///home/ms19/love_theme.ogg"'

  Error: <b>GStreamer Error:</b>
  GStreamer encountered a general stream error.
  <i>(love_theme.aiff)</i>
  got file duration: 95
  Queue done in 2.018s (1 tasks)
  closing...

The GStreamer pipeline it uses fails only because of the "audioresample"
element, which causes the following GStreamer error:

  $ gst-launch-0.10 giosrc location="file:///home/personal/Music/test/love_theme.aiff" name=src ! decodebin name=decoder ! audiorate ! audioresample ! audioconvert ! vorbisenc quality=0.6 ! oggmux ! giosink location="file:///home/ms19/love_theme.ogg"
  Setting pipeline to PAUSED ...
  Pipeline is PREROLLING ...
  ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decoder/GstAiffParse:aiffparse0: Internal data flow error.
  Additional debug info:
  aiffparse.c(1320): gst_aiff_parse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decoder/GstAiffParse:aiffparse0:
  streaming task paused, reason not-negotiated (-4)
  ERROR: pipeline doesn't want to preroll.
  Setting pipeline to NULL ...
  Freeing pipeline ...

If one drops that element, the pipeline works:

  $ rm ~/love_theme.ogg
  $ gst-launch-0.10 giosrc location="file:///home/personal/Music/test/love_theme.aiff" name=src ! decodebin name=decoder ! audiorate ! audioconvert ! vorbisenc quality=0.6 ! oggmux ! giosink location="file:///home/ms19/love_theme.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 2308919408 ns.
  Setting pipeline to PAUSED ...
  Setting pipeline to READY ...
  Setting pipeline to NULL ...
  Freeing pipeline ...

I cannot tell what that would do to AIFF metadata, however, since my test
file lacks such tags.

-- 
Fedora release 19 (Rawhide) - Linux 3.7.5-201.fc18.x86_64
loadavg: 0.02 0.11 0.14


More information about the users mailing list