Bug 363192 - Amarok & VLC both seek track when starting playing. Sometimes seek to the end of the file and moves on to the next one
Summary: Amarok & VLC both seek track when starting playing. Sometimes seek to the end...
Status: RESOLVED WORKSFORME
Alias: None
Product: phonon-backend-gstreamer
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 4.8
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-17 22:40 UTC by Najjar
Modified: 2022-11-20 05:12 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
'amarok --debug' output (130.56 KB, text/x-log)
2016-05-17 22:44 UTC, Najjar
Details
'amarok --debug' output (130.56 KB, text/x-log)
2016-05-17 22:46 UTC, Najjar
Details
'amarok --debug-audio' output (34.32 KB, text/x-log)
2016-05-20 15:30 UTC, Najjar
Details
'amarok --debug-audio' on VLC (12.92 KB, text/x-log)
2016-05-23 22:08 UTC, Najjar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Najjar 2016-05-17 22:40:14 UTC
Alright, firstly I don't know the source of this bug. I filed it under Amarok, but the dev there told me it's not related to Amarok

I suspect that the underlying libvlc used in the backend is the root cause

If VLC is running with a file in play (paused or resuming), then Amarok will behave wrongly. Amarok will skip tracks in the playlist (actually it's seeking to the end of the file, then the player moves on to the next song which then again it finds itself at the end of the file which means it has to move to the next one and so on), till it reaches a random track on that playlist that it'll play fully.

In VLC meanwhile, sometimes the next played file will seek randomly to a point in the video (but not to the end. Most of the time it skips the first 2 minutes or so).

This behavior in Amarok stops when I press "Stop" in VLC. It doesn't matter if Amarok was running first, or was started during VLC's playback (or if Amarok had a file loaded 'paused' or not).

I've changed Amarok back to the GStreamer backend (but in System Settings it's still set to prefer VLC). The problem still persists.

I've captured Amarok's debug output, not sure if it's much of a help: https://paste.kde.org/pza1te60q

Please point me to the right direction if this isn't a Phonon bug

pacman -Qs phonon 
local/phonon-qt4 4.9.0-1
local/phonon-qt4-gstreamer 4.9.0-1
local/phonon-qt4-vlc 0.9.0-1
local/phonon-qt5 4.9.0-1
local/phonon-qt5-gstreamer 4.9.0-1
local/phonon-qt5-vlc 0.9.0-1

local/vlc 2.2.3-2
local/amarok 2.8.0-9



Reproducible: Always

Steps to Reproduce:
1. Open a video file in VLC
2. Try playing a song in Amarok
3. Amarok will keep skipping tracks
Comment 1 Najjar 2016-05-17 22:44:12 UTC
Created attachment 99042 [details]
'amarok --debug' output

It keeps skipping the files till it reaches VORC001-2.mp3, which it plays
Comment 2 Najjar 2016-05-17 22:46:14 UTC
Created attachment 99043 [details]
'amarok --debug' output

It keeps skipping the files till it reaches VORC002-2.mp3, which it plays
Comment 3 Najjar 2016-05-19 17:35:55 UTC
Actually it might be related to Firefox somehow. I restarted the computer, and everything worked as it should until I started Firefox many hours later
Comment 4 Harald Sitter 2016-05-20 07:30:09 UTC
you need to run with --debug and --debug-audio
Comment 5 Najjar 2016-05-20 15:30:59 UTC
Created attachment 99101 [details]
'amarok --debug-audio' output

I've provided the output of 'amarok --debug' previously. Now here's the output of --debug-audio (using a different set of files)

It skips the first 2 files, then plays "Right Behind You". I listened to the first few seconds, then pressed Stop and quit Amarok

I left filenames and paths intact in this one
Comment 6 Harald Sitter 2016-05-22 18:44:23 UTC
You aren't using the phonon vlc backend actually.

From the debug output it looks a lot like what is happening is that this file:
> /home/user/Music/Tribal INK/Surrounded by Freaks/04 - Refugee.mp3
has bogus metadata such that the length is incorrectly detected which makes gstreamer want to transition to the next source too late:
> PHONON-GST     remaining time 320 
> PHONON-GST     waiting for 0 
this ultimately means that gstreamer only realized the track is about to end 320 milliseconds before the actual end, which is not enough time for Amarok to hand us the next source, which is why we didn't wait for the source. In the end the lack of a new track triggered a change to stop, which happend concurrently to amarok giving us the next source.
Comment 7 Najjar 2016-05-23 22:08:34 UTC
Created attachment 99150 [details]
'amarok --debug-audio' on VLC

But this is an entirely new issue

I've been playing those files for a long time on Amarok (years) without similar problems. And the issue isn't related to this directory, but all music files (and video files for that matter in VLC) show the same issue

I switched Amarok to Phonon GStreamer because Phonon VLC was too buggy (one of the more annoying bugs is that it kept setting Amarok's volume to VLC's) and I thought switching to GStreamer for Qt4 would solve the conflict (Amarok is the only Qt4 application on my PC that uses audio). Before all of this I was on VLC for both Qt4/5

Here's the output after switching back to VLC. It skipped, but I don't see the files in the log
Comment 8 Justin Zobel 2022-10-21 00:17:43 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 9 Bug Janitor Service 2022-11-05 05:08:16 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2022-11-20 05:12:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!