Amarok can't fast-forward FLAC files.

Bug #162470 reported by Michael Bogdan on 2007-11-13
94
This bug affects 14 people
Affects Status Importance Assigned to Milestone
xine-lib
New
Undecided
Unassigned
amarok (Ubuntu)
Wishlist
Unassigned
Nominated for Jaunty by david wood
Nominated for Karmic by ilna
xine-lib (Ubuntu)
Low
Unassigned
Nominated for Jaunty by david wood
Nominated for Karmic by ilna

Bug Description

After fast-forwarding a FLAC file, Aarok isn't able to play sound any longer, skipping/stopping the song or waiting until the next song plays helps. I am using the XINE audio server.

description: updated
Sir Nikon (omnineko) wrote :

That's odd... I noticed the same thing today. Fast forward and rewind works fine with all other formats I have tested (mostly MP3 and OGG) but with FLAC, the music stops, halts for about thirty seconds, then restarts at the beginning.

Changed in amarok:
status: New → Confirmed

[7.10] on my system using Amarok 1.4.7, using the playhead just makes sound stop coming out for however long it was from where the playhead WAS to where you put it. For example, if a song was at 1:15 and I moved the playhead to 1:45, I'd hear nothing for 30 seconds - but at the end of those 30 seconds of silence, the song would play again "properly" at 1:45.

Sir Nikon (omnineko) wrote :

It seems that when I fast forward a FLAC audio file, it will pause, then start over at the beginning. This actually happens on any program that will play a FLAC file.

I am thinking that the issue might be with the FLAC codec itself... flaclib or something along those lines...?

Fired up xine-ui and the problem appears to be with xine itself; xine-ui couldn't handle the flac files either. Also, Totem using Gstreamer worked fine on the same flacs.

Steps to reproduce:
1. Download the attached FLAC file and open it in Amarok
2. Try moving the seekhead while the attached file is playing

This is still an issue on the newest updates in Hardy.

Probable affected packages:
amarok-xine 2:1.4.8-0ubuntu3
libxine1 1.1.10.1-2

Harald Sitter (apachelogger) wrote :
Changed in amarok:
status: Confirmed → Invalid

How does a manual workaround fix this bug? Unless somebody is subscribed to this thread or hunts around the KDE forums, they won't know about it. Chances are that even if they do, they won't wanna go through the steps to wipe their seek tables and create new ones. I don't think this should be marked invalid as it is an actual reproducible bug. If nobody is gonna fix Amarok/Xine to work on FLAC files without seek tables, at least add the functionality to create seek tables.

Changed in amarok:
status: Invalid → Confirmed
Loïc Martin (loic-martin3) wrote :

http://amarok.kde.org/forum/index.php/topic,13977.msg22328.html#msg22328

[quote]#!/bin/sh

if [ ! "$1" ]
then
  find . -name "*.flac" -exec $0 {} \;
else
  metaflac --list --block-type=SEEKTABLE "$1" | grep -q SEEKTABLE

  if [ $? -ne 0 ]
  then
    echo "No SEEKTABLE in $1, generating..."
    metaflac --preserve-modtime --add-seekpoint=1s "$1"
  else
    echo "$1 has a SEEKTABLE. No action required."
  fi
fi

Run this bad boy at the top of a tree with a bunch of FLACs and you're on your way.[/quote]

I just modified the seek points to be every 1s (the post advises every 10s) because I didn't notice any slowdown and the file size is more or less the same (didn't notice a difference on a 10Go directory).

teratomata (superfunfun) wrote :

I tried this and can't get it to work. I get a 'cannot execute binary file' for every flac in the folder, for example:

c: ./Animal Collective 2007.09.10 Strawberry Jam flac/Animal Collective [06] #1.flac: cannot execute binary file

What should I do now?

Loïc Martin (loic-martin3) wrote :

Sorry for the late response I apparently didn't get Launchpad notification.

First, you need to install the flac package :
sudo apt-get install flac

(or use Synaptic)

Second, the script doesn't work for me anymore, and I don't know why it worked once but doesn't anymore, except maybe that some packages have been updated on the system. So use these 2 commands instead (but it's going to take a long time, since it will redo it even for files that already had a SEEKTABLE :

find . -name *flac -exec metaflac --remove --block-type=SEEKTABLE {} \;
find . -name *flac -exec metaflac --add-seekpoint=10s {} \;

4 files out of several thousand gave me some errors, but the rest was ok.

teratomata (superfunfun) wrote :

I tried out the coment above and it works great, no need to restart amarok or anything you might think. One comment I do have is that you need to cd into the main folder with all your music, something I'm sure everyone but me instantly understood ;p

Daniel T Chen (crimsun) on 2008-11-28
Changed in amarok:
importance: Undecided → Wishlist
Changed in xine-lib:
importance: Undecided → Wishlist
status: New → Confirmed
david wood (david-wood) wrote :

This is still an issue on 8.10.

Does anyone more knowledgeable about Amarok know whether this can be addressed by just updating a xine dependency?

The current status quo is not a great user experience.

Traffic on xine-devel (http://www.nabble.com/Seeking-in-FLAC-files.-td1892865.html) suggests the xine devs feel the FLAC files themselves are malformed. Unfortunately, they do not care to answer why other players can seek inside them just fine.

I can however confirm that Amarok seeks properly on FLACs once the metaflac workaround described above is used to remove and replace seekpoints.

Either FLACs are not generated properly by default in any ripper we ship, or xine has a bug related to FLAC seeking. We should fix one or the other...

Jonathan Thomas (echidnaman) wrote :

The xine guys would have to release a new version of xine that doesn't have this bug.

Changed in amarok:
status: Confirmed → Invalid
Changed in xine-lib:
importance: Wishlist → Low
teratomata (superfunfun) wrote :

This doesn't seem to be a problem in amarok 2.0 and songbird. Only thing is songbird doesn't have keyboard shortcuts making the best linux player less than worthless, and amarok 2.0 isn't so nice as amarok 1.4 that I would switch just for this.

Magnes (magnesus2) wrote :

It's still a problem in amarok 2.0 (and 2.1). I just reencode all my flac files that don't have seek information with flac filename.flac -S 1s -o new_filename.flac - to fix this. It would be great if this step wasn't necessary.

Russ Brown (pickscrape) wrote :

Just to note that I have this problem with a number of media players, not just amarok:

 * Amarok
 * Banshee
 * Rhythmbox
 * Totem
 *

The following work however:

 * KPlayer
 * VLC
 * mplayer

Re-encoding or adding seek points to the files doesn't seem to help at all...

ilna (a-gaydenko) wrote :

Being using Kubuntu Karmic testing, I can confirm the issue wrt Amarok2 and FLAC files. MPD seeks FLAC files fine.

baytuni (oytun-peksel) wrote :

Confirmed for Karmic & Banshee

strav (strav) wrote :

Don't know if it's a sin somewhere, but if you're using Kde4 systemSettings, just install gstreamer-phonon-backend and in the backend preferences of the multimedia section from systemsettings, prioritize Gstreamer.

Ability to seek FLAC files: +1 Gstreamer.

beadrifle (beadrifle) wrote :

Bug confirmed in Banshee 1.5.4 also; bump

Miguel Guedes (miguelg) wrote :

I'm using Kubuntu but also have Gnome installed. Seeking FLAC files in Rhythmbox (in Gnome or KDE) works as intended but it fails in Amarok (in KDE) with the symptoms previous posters have described above.

I tried the solution strav posted (BTW: the package is phonon-backend-gstreamer) but, after prioritizing Gstreamer over Xine in Multimedia (System Settings), Amarok won't load and crashes all the time with a segmentation fault.

Lastly, I also didn't try the solution Loïc Martin posted above since I'd rather not mess with my precious FLAC files' metadata.

So, just confirming the bug still persists here and oddly affects only the FLAC audio format.

Givrix (geoffrey-mosini) wrote :

The problem is still there, unsolved, with Xine 4.4.4... though compared to the posts I see the music stops when seeking but goes back to initial point after ~2s.

I installed gstreamer phonon backend. After changing the engine in phonon properties (accessible for gnome users in Amarok preferences -> Playback section), and restarting Amarok, it works flawlessly.

Tried also the vlc backend, was quite surprised to see vlc usable as a backend ! It works but segfaults when closing Amarok, small burden but still gstreamer seems better on this point.
The only regression I find about gstreamer is that the output configuration cannot be configured inside phonon properties (it works with vlc). Strange as i thought pulseaudio was taking care of that, not the sound engine.

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

Duplicates of this bug

Other bug subscribers

Bug attachments