Bug 197584 - Amarok playes songs from their e.g.15th second
Summary: Amarok playes songs from their e.g.15th second
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: Xine backend (show other bugs)
Version: 4.4.0 (KDE 4.4.2)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Matthias Kretz
URL:
Keywords:
: 195567 198240 206178 268332 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-23 10:09 UTC by Tom Kijas
Modified: 2011-06-08 00:13 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Interview snippet as a flac (700.89 KB, audio/x-flac)
2009-10-13 16:20 UTC, Oliver Henshaw
Details
Interview snippet as a mp3 (183.86 KB, audio/mpeg)
2009-10-13 16:26 UTC, Oliver Henshaw
Details
Interview snippet as an ogg (147.50 KB, audio/ogg)
2009-10-13 16:28 UTC, Oliver Henshaw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Kijas 2009-06-23 10:09:49 UTC
Version:           2.1.1 (using 4.2.90 (KDE 4.2.90 (KDE 4.3 Beta2)), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.30-020630-generic

Whenever I play playlist i  Amarok 2.1.1 it plays the next song from it's for 15th or 14th second. Don't know why, it did with KDE4.2.4 too and with Amarok 2.0 too.
Comment 1 Dekans 2009-06-28 16:55:29 UTC
I have this bug too.
On Kubuntu Jaunty 64.
KDE 4.2.4 and Amarok 2.1.1

Sometimes, song don't start at 0 second, but 30, 40 or even more...
It did it with amarok 2.0 and 2.1
Comment 2 Myriam Schweingruber 2009-06-28 17:22:07 UTC
This only happens with FLAC files here, and not all the time, using 2.2-SVN, build 28.6.2009
Comment 3 Rex Dieter 2009-06-28 17:56:11 UTC
By all accounts, it's likely related to this xine/flac bug:
http://bugs.xine-project.org/show_bug.cgi?id=225

triggered when playing flac files and using the xine phonon backend, of course.
Comment 4 Tom Kijas 2009-06-28 18:12:23 UTC
Not right, for me it does to all of the mp3 not just FLAC.... but you are right that it don't do always, sometimes it plays these song OK and sometimes it is unuasble due to this bug and only re-login helps.
Comment 5 Rex Dieter 2009-06-28 19:38:47 UTC
OK, for mp3's,
http://bugs.xine-project.org/show_bug.cgi?id=76
Comment 6 Myriam Schweingruber 2009-06-29 08:39:55 UTC
*** Bug 198240 has been marked as a duplicate of this bug. ***
Comment 7 Myriam Schweingruber 2009-07-30 19:50:19 UTC
*** Bug 195567 has been marked as a duplicate of this bug. ***
Comment 8 Myriam Schweingruber 2009-08-30 16:05:19 UTC
reassigning to phonon, there is little Amarok can do about that, sorry.
Comment 9 Dario Andres 2009-09-04 01:43:49 UTC
*** Bug 206178 has been marked as a duplicate of this bug. ***
Comment 10 Oliver Henshaw 2009-10-13 16:17:21 UTC
Since the bugs about truncated playback with xine have been duplicated to this bug, I'll make my comment here.

I see the very last seconds cut from mp3 and flac (and sometimes ogg) files. This is most noticeble with speech as incomplete sentences are hard to miss. I managed to reproduce this on three machines and with both Fedora 11 and Fedora 12/rawhide (though not all combinations of machine and OS were tested).

I extracted the ogg audio from http://www.redhat.com/v/magazine/ogg/NET_MAN.ogg using oggSplit from oggvideotools and then cut a small snippet of speech out using audacity:

$ cat labels.txt
95.546667       107.226667      Snippet

where the label boundaries are snapped to cdda frames. I then exported the snippet as ogg, mp3 and as flac and played each with kmplayer.

When I use phonon-backend-xine then the .flac and .mp3 files are truncated and the .ogg file is fine, but all files play to the end when I use phonon-backend-gstreamer. Playback is also fine with xine from the command line.

Although fedora has pulseaudio I don't think it's responsible since I also tested bypassing pulseadio - interestingly even the .ogg files were truncated in this case. So while it might influence the bug, I don't think it causes it. (I bypassed PA by using the hardware device in the phonon device list. In case that was not enough I removed the pulseaudio alsa plugin, and then removed the pulseaudio package (though pulseaudio-libs was impossible to remove). In each case I made sure that PA was not running before the test and hadn't re-spawned after the test)


Note: I first saw this on my machine, and confirmed it on a laptop and on a third machine. I repeated the tests on the laptop using both the original F11 liveiso as well as a recent live image from F12/rawhide. phonon-backend-gstreamer and standalone xine gave me problems with the snapshot I used, so not all possibilities were tested.

1: phonon-backend-xine is tested on fedora 11 and on 12/rawhide.
2: phonon-backend-gstreamer is tested on f11 but only with ogg on 12/rawhide
2a: gstreamer has been tested through totem in f12/rawhide and all files play fine.
3: xine in f11 is tested for ogg and mp3, but crashes on the flac. xine in rawhide didn't start for any of the files.
Comment 11 Oliver Henshaw 2009-10-13 16:20:27 UTC
Created attachment 37555 [details]
Interview snippet as a flac
Comment 12 Oliver Henshaw 2009-10-13 16:26:37 UTC
Created attachment 37557 [details]
Interview snippet as a mp3
Comment 13 Oliver Henshaw 2009-10-13 16:28:06 UTC
Created attachment 37558 [details]
Interview snippet as an ogg
Comment 14 Martin Sandsmark 2009-10-14 17:42:24 UTC
I'm unable to reproduce here on ArchLinux.

Does everyone have PulseAudio installed and/or running?
Comment 15 ericaltendorf 2009-10-14 18:28:07 UTC
I am using pulseaudio (a fairly vanilla recent Kubuntu install) and
observe this bug.

On Wed, Oct 14, 2009 at 8:42 AM, Martin Sandsmark
<sandsmark@samfundet.no> wrote:
> https://bugs.kde.org/show_bug.cgi?id=197584
>
>
> Martin Sandsmark <sandsmark@samfundet.no> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |sandsmark@samfundet.no
>
>
>
>
> --- Comment #14 from Martin Sandsmark <sandsmark samfundet no>  2009-10-14 17:42:24 ---
> I'm unable to reproduce here on ArchLinux.
>
> Does everyone have PulseAudio installed and/or running?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 16 Oliver Henshaw 2009-10-14 21:37:21 UTC
I just managed to reproduce it on the chakra alpha 3 livecd, where I don't think pulseaudio is installed. That is, I have truncation with the flac and the mp3 but not the ogg - tested with kaffeine (seems to be the new phonon-based version) and phonon-backend-xine.

I didn't manage to test with kmplayer, phonon-backend-gstreamer or with standalone xine as I couldn't get wireless working to install packages.
Comment 17 Oliver Henshaw 2009-10-21 17:53:14 UTC
I checked things on chakra again, this time with a net connection so I could install/update packages - but I still have truncation.

I played back the snippets with kmplayer (using the phonon output) and still get truncation (of flac and mp3) with the phonon-backend-xine backend. I don't get any truncation with phonon-backend-gstreamer or phonon-backend-mplayer. xine-ui's xine also plays back all the snippets without truncation.

Updating phonon-backend-xine from the version on the livecd to the latest available version (kdemod-phonon-backend-xine-4.3.1-7) didn't help either.
Comment 18 Oliver Henshaw 2009-10-29 18:21:53 UTC
Can anyone else confirm this (the truncation) on the chakra alpha 3 livecd? Maybe it's hardware dependent?
Comment 19 ericaltendorf 2009-10-29 18:23:50 UTC
So one thing I don't understand about this bug is the following:

Amarok skips the first n seconds when starting to play the track, but,
without fail, if I manually "rewind" the track position to the
beginning, and start playing again, it plays from the start.

This suggests that Amarok does indeed actually have control over this behavior.

On Thu, Oct 29, 2009 at 10:21 AM, Oliver Henshaw <yoho_ahoy@hotmail.com> wrote:
> https://bugs.kde.org/show_bug.cgi?id=197584
>
>
>
>
>
> --- Comment #18 from Oliver Henshaw <yoho_ahoy hotmail com>  2009-10-29 18:21:53 ---
> Can anyone else confirm this (the truncation) on the chakra alpha 3 livecd?
> Maybe it's hardware dependent?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 20 Oliver Henshaw 2009-11-08 19:28:55 UTC
I saw that there was a newer chakra live image (crush), so tried again with that. Still truncation with the flac and mp3 snippets.

xine-lib 1.1.16.3-3
kdemod-phonon-backend-xine 4.3.1-7
kdemod-kdemultimedia-dragonplayer 4.3.2-1
Comment 21 Oliver Henshaw 2009-11-29 23:01:31 UTC
So to recap, I can reproduce this at will with the pristine chakra livecd. Which also means that pulseaudio isn't involved in the truncation bug.

Could someone important take note, and confirm this, please?
Comment 22 Tom Kijas 2010-02-01 08:58:20 UTC
It does again in Amarok 2.2.2.
Comment 23 Tom Kijas 2010-03-11 21:47:12 UTC
And in 2.2.9
Comment 24 Myriam Schweingruber 2010-04-06 13:02:51 UTC
Is this still valid with KDE SC 4.4.2/Phonon 4.4.0?
Comment 25 ericaltendorf 2010-04-06 19:23:09 UTC
I don't know.  I gave up on Amarok about 6 months ago because I'd been
waiting about 6 months for it to be fixed.  I'm using a different
player now.

One thing I brought up before which I still don't understand: Amarok
is perfectly capable of playing from the beginning of the track if you
manually rewind to the beginning of the track.  I don't understand why
"rewind to start upon beginning every track" can't be a valid
workaround for this Phonon bug.

--eric

On Tue, Apr 6, 2010 at 4:02 AM, Myriam Schweingruber <myriam@kde.org> wrote:
> https://bugs.kde.org/show_bug.cgi?id=197584
>
>
> Myriam Schweingruber <myriam@kde.org> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Status|NEW                         |NEEDSINFO
>         Resolution|                            |WAITINGFORINFO
>
>
>
>
> --- Comment #24 from Myriam Schweingruber <myriam kde org>  2010-04-06 13:02:51 ---
> Is this still valid with KDE SC 4.4.2/Phonon 4.4.0?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 26 Myriam Schweingruber 2010-04-09 09:06:07 UTC
Oliver, can you reproduce this? I tried many times and can't, everything works fine for me, using KDE SC 4.4.2/Phonon 4.4.0 and Amarok 2.3-git. This has always worked for me even with older versions.
Comment 27 Matt Whitlock 2010-04-09 17:01:10 UTC
This is starting to annoy me, too.  I don't know how long it's been a problem on my system, but I've recently been re-ripping a lot of my CDs as FLAC, and now I'm noticing that the last second or so of FLAC tracks get cut off when playing in Amarok.

If I play the track using mplayer (CLI), the entire track plays to the very end, but if I play it in Amarok, a piece at the end goes missing.

I am using the Xine backend for Phonon (because I've never been able to make the GStreamer backend work).  I have an Intel HDA chipset, and I'm using the digital optical output.  No special ALSA configuration, just the defaults.

One strange thing I do notice about Amarok's behavior: when nearing the end of playing a FLAC file, it throws up the OSD for the next track WAY early -- like several seconds before the current track finishes.  This makes me believe Amarok is already starting to decode the next file (which is great because it means there ought to be no gaps between tracks), but why would it behave differently for FLAC files specifically?  The OSD doesn't come up early when playing other file types.
Comment 28 Myriam Schweingruber 2010-04-12 00:34:26 UTC
Sorry Matt, but you did not specify what version you are talking about.
Comment 29 Matt Whitlock 2010-04-12 11:13:30 UTC
(In reply to comment #28)
> Sorry Matt, but you did not specify what version you are talking about.

Oh sorry.  I am using Amarok 2.3.0, Phonon 4.4.0, and Phonon Xine 0.2.60.
Comment 30 Oliver Henshaw 2010-04-12 20:14:31 UTC
I just reproduced it again with chakra-i686-panora-alpha5-v4.iso. The relevant packages seem to be:

amarok 2.3.0-1
qtmod-phonon 4.4.0-1
xine-lib 1.1.18.1-1

Myriam, have you tried to reproduce this with the chakra live cd? At least then the only variable is hardware. Actually, this time I booted the livecd in virtualbox so even hardware can be eliminated.
Comment 31 Myriam Schweingruber 2010-04-18 11:10:32 UTC
Thank you for the feedback.
Comment 32 Jonah Bernhard 2011-01-05 21:18:21 UTC
I consistently observe this bug on Arch Linux.  For me, the last 2-3 seconds of the last flac file in a playlist are always skipped.  This only happens with flac files, not mp3 or ogg.  

I'm using phonon-xine and alsa.  The problem does not occur in the xine player or in kaffeine.  I have similar configurations on two computers -- a laptop and a desktop -- and the problem is identical on both systems.

I've found that it can be worked around be either putting the playlist on repeat or appending a short (1 second) silent file to the end of every playlist.

Here are my package versions (all latest in Arch repos):

amarok 2.3.2-3 / GIT-20110104  (and many other previous versions as well)
xine-lib 1.1.19-2
phonon, phonon-xine 4.4.3-1
kdelibs 4.5.4-1
flac 1.2.1-2

If it would be helpful, I can easily test possible patches.
Comment 33 Myriam Schweingruber 2011-03-19 03:07:19 UTC
*** Bug 268332 has been marked as a duplicate of this bug. ***
Comment 34 Myriam Schweingruber 2011-06-07 23:29:10 UTC
Please use another backend, the xine backend is deprecated as the upstream development is stalled. 

You can choose between the gstreamer backend or the vlc backend, both are actively developed and maintained.
Comment 35 ericaltendorf 2011-06-08 00:13:10 UTC
Sigh, and this is why I am discouraged from reporting bugs.  They get beat around for years and finally marked "UNMAINTAINED".

(Gave up on Amarok over a year ago, but still cc'd on this bug.)