Bug 213706

Summary: Phonon does not play last and/or first second of an audiofile.
Product: [Frameworks and Libraries] phonon-backend-vlc Reporter: Nikita Skovoroda <chalkerx>
Component: generalAssignee: Matthias Kretz <kretz>
Status: RESOLVED UPSTREAM    
Severity: normal CC: adawit, bcooksley, dplater, fabo, gumb, jb, martin.sandsmark, myriam, sitter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: vlc file open dialog backtrace log file...

Description Nikita Skovoroda 2009-11-08 17:01:58 UTC
Version:            (using KDE 4.3.3)
OS:                Linux
Installed from:    Archlinux Packages

1 file - the last second (or something about thar) is not played.
Several files (.enqueue()) -  1st item plays normally, 2nd-(last-1) - all but the first second, last - all but the first and last seconds.

The seekSlider also stops about 1 second before it should.

Xine backend. Xine-ui and mocp work fine, Phonon does not.

Test file: http://audio.rightmark.org/lukin/msu/Metronome.wav
Comment 1 Nikita Skovoroda 2009-11-10 20:14:17 UTC
Found a workaround.

setTransitionTime(1) helps, and everything works as it should.
Comment 2 Nikita Skovoroda 2009-11-11 09:00:20 UTC
I am not sure (that machine has problems with sound under windows), but it looks like on windows there is no such bug. Tested with Qt SDK 2009.04 and phonon4qt.
Comment 3 Myriam Schweingruber 2010-02-10 11:32:27 UTC
Confirmed with latest KDE SC 4.4 The test file stops too early. Is this only valid for *.wav files?
Comment 4 gumb 2010-03-21 14:44:25 UTC
I previously submitted a report about this to openSUSE Bugzilla, here:
https://bugzilla.novell.com/show_bug.cgi?id=546048
which was closed and redirected here.

It was occurring on openSUSE 11.1 with the KDE 4.3 Factory packages, and now it has continued on 11.2 with the KDE 4.3.5 online update. I have Xine backend with latest libxine 1.1.18 from Packman. Seems that WAV, OGG, FLAC and possibly other files are all affected. They play fine with Gstreamer backend and/or non-KDE software like RealPlayer.

Could somebody advise how to apply the above setTransitionTime workaround, i.e. which config file do I need to put that line in?
Comment 5 Nikita Skovoroda 2010-03-22 23:25:48 UTC
That is not a config file workaround, it is a *.cpp workaround.

http://doc.trolltech.com/4.6/phonon-mediaobject.html#transitionTime-prop

Actually, gapeless playback is not working fine with phonon-xine. Adding 1ms gap helps. Not sure if you can change that from config files.

If that is not possible, you can always try another backend, for example, phonon-vlc or phonon-gstreamer.
Comment 6 Myriam Schweingruber 2010-04-06 15:01:16 UTC
It would be nice if you could try with the vlc backend.
Comment 7 Nikita Skovoroda 2010-08-15 20:45:56 UTC
Xine is still affected. Gstreamer works fine.

$ pacman -Qi phonon
Name           : phonon
Version        : 4.4.2-1

$ pacman -Qi xine-lib
Name           : xine-lib
Version        : 1.1.19-1


Affects Amarok and any other audio player. I can hear that not only on wav files.

I will try the phonon-vlc soon.
Comment 8 Nikita Skovoroda 2010-08-15 21:17:29 UTC
phonon-vlc + qmusicplayer (qt examples) = 4 entries in the playlist for 1 file loaded, affected. Last seconds are missing.
phonon-xine + qmusicplayer = playlist ok, last seconds are missing.
phonon-gstreamer + qmusicplayer = playlist ok, last seconds ok. 

phonon-vlc is also affected by this bug.
Comment 9 Nikita Skovoroda 2010-08-15 21:29:57 UTC
phonon-vlc-0.2.0-1  vlc-1.1.2-2
Comment 10 Nikita Skovoroda 2010-08-15 22:00:13 UTC
Just 'vlc Metronome.wav' => no voice at the end of test file for me.

Vlc itself is affected for me, so the problem is there.

Xine-ui worked fine last time I checked, but phonon-xine did not.
Comment 11 Myriam Schweingruber 2010-08-17 19:32:41 UTC
Thank you for the feedback, setting bug to VLC backend, as the active development is there
Comment 12 Nikita Skovoroda 2010-08-17 20:46:38 UTC
It looks like vlc backend itself is ok.

For phonon-vlc, the problem is with the vlc itself, as "vlc Metronome.wav" is affected.
For phonon-xine, the problem is with the backend. As I remember, xine-ui was not affected.

A person I asked to test said that he can reproduce the bug with phonon-xine, but can't with phonon-vlc. He uses the same packages and the same versions (Arch Linux current) of vlc and phonon-vlc. He does not have pulseaudio, I do. Not sure if that changes anything, maybe there is some other difference that I could not see.
Comment 13 Jean-Baptiste Kempf 2010-10-17 20:15:02 UTC
Yes, it can make a difference, since the problem is that VLC doesn't wait correctly for all audio output modules to finish, before stopping.

This is a misconception in VLC and should have been fixed in VLC 1.2.0-git, if you have time to try.
Comment 14 Myriam Schweingruber 2010-10-17 20:39:47 UTC
Closed as upstream, based on comment #13
Comment 15 Jean-Baptiste Kempf 2010-10-17 20:40:56 UTC
Upstream bug is http://trac.videolan.org/vlc/ticket/3152
Comment 16 Nikita Skovoroda 2010-10-19 06:49:47 UTC
Ok, and what about phonon-xine?
Comment 17 Nikita Skovoroda 2010-10-19 12:39:09 UTC
1) 
vlc-git 20101019
Still affected.

2)
The bug i reported was initially about phonon-xine. It is affected too, while xine is not.
Comment 18 Dawit Alemayehu 2011-01-22 00:34:38 UTC
Created attachment 56309 [details]
vlc file open dialog backtrace log file...
Comment 19 Dawit Alemayehu 2011-01-22 00:38:48 UTC
(In reply to comment #18)
> Created an attachment (id=56309) [details]
> vlc file open dialog backtrace log file...

Sorry this was not meant to be attached to this bug report...
Comment 20 Harald Sitter 2011-02-25 11:41:58 UTC
Ohm, no clue why this is reopened. Closing as Upstream again.
Comment 21 Myriam Schweingruber 2011-04-27 21:32:08 UTC
Reassigning to the new bugzilla product for better bug tracing of the various
backends. Sorry for the noise.