Bug 491322 - Playback doesn't start when playing from File browser
Summary: Playback doesn't start when playing from File browser
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playback (show other bugs)
Version: 3.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-05 18:41 UTC by momo
Modified: 2024-08-12 12:45 UTC (History)
1 user (show)

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


Attachments
amarok audio debug (53.77 KB, text/plain)
2024-08-12 02:02 UTC, momo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description momo 2024-08-05 18:41:05 UTC
SUMMARY

In https://bugs.kde.org/show_bug.cgi?id=491321 I couldn't add files to the collection. Trying to circumnavigate that, I was trying to use the File browser menu to play them, but after hitting Play, the playback never starts.

These files play correctly in Elisa/VLC.

STEPS TO REPRODUCE
1. Go to File browser and add a song to the playlist
2. Try to play it 

OBSERVED RESULT
Playback doesn't start.

EXPECTED RESULT
Playback starts.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.2-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

This is the output of amarok --debug when trying to play:

amarok: BEGIN: void Playlist::PrettyListView::trackActivated(const QModelIndex&)
amarok:   BEGIN: void Playlist::Actions::play(const QModelIndex&)
amarok:     BEGIN: void Playlist::Actions::play(quint64, bool)
amarok:       BEGIN: void EngineController::play(Meta::TrackPtr, uint, bool)
amarok:         BEGIN: void EngineController::stop(bool, bool)
amarok:         END__: void EngineController::stop(bool, bool) [Took: 0s]
amarok:         [EngineController] play: bounded is  QObject(0x0) current "Title"
amarok:         [EngineController] Just a normal, boring track... :-P
amarok:         BEGIN: void EngineController::playUrl(const QUrl&, uint, bool)
amarok:           [EngineController] URL:  QUrl("file:///home/momocao/Música/metroid-prime-fusion-original-soundtracks/CD 1/01. Title.mp3") "file:///home/momocao/Música/metroid-prime-fusion-original-soundtracks/CD 1/01. Title.mp3"
amarok:           [EngineController] Offset:  0
amarok:           [EngineController] Using gain of 0 with relative peak of 0
amarok:         END__: void EngineController::playUrl(const QUrl&, uint, bool) [Took: 0.001s]
amarok:       END__: void EngineController::play(Meta::TrackPtr, uint, bool) [Took: 0.001s]
amarok:     END__: void Playlist::Actions::play(quint64, bool) [Took: 0.001s]
amarok:   END__: void Playlist::Actions::play(const QModelIndex&) [Took: 0.001s]
amarok: END__: void Playlist::PrettyListView::trackActivated(const QModelIndex&) [Took: 0.001s]
Comment 1 momo 2024-08-05 18:44:55 UTC
By the way, Art of Nations (Amarok theme) does start correctly so it doesn't seem like a general playback bug.
Comment 2 Tuomas Nurmi 2024-08-06 19:46:03 UTC
Thank you for this report, too! 
Interesting. I'll be able to try to reproduce only a bit later, but could you also try running
amarok --debug --debug-audio
and paste the corresponding output (including EngineController::playUrl and some surrounding lines) here, too; I think it might provide some useful extra output information.
Comment 3 momo 2024-08-12 02:02:26 UTC
Created attachment 172527 [details]
amarok audio debug
Comment 4 momo 2024-08-12 02:04:24 UTC
I attached the output, please let me know if there is something that can be done to play those files. If the problem is a missing dependency it would be nice to make it work by default somehow, given that other players can play this without any extra setup.
Comment 5 momo 2024-08-12 02:10:35 UTC
Yes, the player started to work after installing gstreamer1.0-plugins-good on Arch. Why is this? I thought Amarok had ffmpeg as dependency which should play an mp3? There is nothing about gstreamer listed https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=amarok
Comment 6 Tuomas Nurmi 2024-08-12 12:45:57 UTC
Okay, great to hear you managed to get playback  working!

As to why the gstreamer plugins were required; I guess it's a long story: ffmpeg is indeed a dependency, but it isn't actually used for playback, only for some song fingerprinting / something like that. For playback, Phonon is used, the corresponding dependency in PKGBUILD listing being phonon-qt5. There are multiple possible backends for Phonon, so I guess the package manager just requires that one of them is installed, and in your case it was phonon-gstreamer, which uses gstreamer (and its codecs) for playback. (Phonon-gstreamer has been unmaintained for some years now, but it still works somewhat ok. Another backend option is phonon-vlc)