Bug 487121 - Music can't play. Can't init QMediaPlayer
Summary: Music can't play. Can't init QMediaPlayer
Status: REPORTED
Alias: None
Product: audiotube
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.02.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Jonah Brüchert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-16 21:48 UTC by A M
Modified: 2024-09-23 03:45 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A M 2024-05-16 21:48:42 UTC
App loads fine, nothing remarkable
Attempting to play any music leaves the player at a constant 0:00/0:00, and logs "No QtMultiMedia backends found... Failed to initialize QMediaPlayer"

STEPS TO REPRODUCE
1. Open app
2. Select any music to play

Logs
```
[tl1248@MArch ~]$ audiotube
futuresql: Migrations finished
futuresql: Running "select distinct (search_query) from searches order by search_id desc limit 20"
futuresql: Running "select * from favourites natural join songs order by favourites.rowid desc"
futuresql: Running "select * from played_songs natural join songs"
futuresql: Running "select * from played_songs natural join songs order by plays desc limit 10"
futuresql: Running "select * from playlists"
Running with untested version of ytmusicapi 1.7.1.
The currently tested and supported version is 1.5.1
Running with untested version of ytmusicapi 1.7.1. If you experience errors, please report them to your distribution.
futuresql: Running "select * from playlists"
futuresql: Running "select * from playlists"
qrc:/qt/qml/org/kde/kirigamiaddons/components/BottomDrawer.qml:156:9: QML Control: Binding loop detected for property "implicitWidth"
No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
Failed to initialize QMediaPlayer "Not available"
futuresql: Running "select count(*) > 0 from favourites where video_id = ?"
[youtube] Extracting URL: 6EU7T3Z1Piw
[youtube] 6EU7T3Z1Piw: Downloading webpage
[youtube] 6EU7T3Z1Piw: Downloading ios player API JSON
[youtube] 6EU7T3Z1Piw: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "6EU7T3Z1Piw")
[youtube] 6EU7T3Z1Piw: Downloading player 74a3a562
[youtube] 6EU7T3Z1Piw: Downloading m3u8 information
futuresql: Running "insert or replace into songs (video_id, title, artist, album) values (?, ?, ?, ?)"
futuresql: Running "insert or ignore into played_songs (video_id, plays) values (?, ?)"
futuresql: Running "update played_songs set plays = plays + 1 where video_id = ? "
futuresql: Running "select * from played_songs natural join songs"
futuresql: Running "select * from played_songs natural join songs order by plays desc limit 10"
```
SOFTWARE/OS VERSIONS
OS: Arch x86_64
Host: 23532LU ThinkPad T430s
Kernel: 6.8.6-zen1-1-zen
KDE Plasma Version:  6.0.2
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Graphics Platform: Wayland
Comment 1 Jonah Brüchert 2024-05-16 21:49:52 UTC
Were was this build installed from?
The package is missing basic dependencies.
Comment 2 Antonio Rojas 2024-05-16 22:12:15 UTC
Apparently audiotube only works with the gstreamer qtmultimedia backend, which is not documented anywhere.
Comment 3 A M 2024-05-16 22:32:25 UTC
(In reply to Jonah Brüchert from comment #1)
> Were was this build installed from?
> The package is missing basic dependencies.

Through `pacman`, sorry if that's too vague, i am still a bit new to linux
I've tried running `pacman -Syu audiotube`(full sys update) to no avail
Comment 4 A M 2024-05-16 22:33:22 UTC
(In reply to Antonio Rojas from comment #2)
> Apparently audiotube only works with the gstreamer qtmultimedia backend,
> which is not documented anywhere.

Is that something i can fix on my end?
Comment 5 Antonio Rojas 2024-05-16 22:36:39 UTC
(In reply to A M from comment #4)
> (In reply to Antonio Rojas from comment #2)
> > Apparently audiotube only works with the gstreamer qtmultimedia backend,
> > which is not documented anywhere.
> 
> Is that something i can fix on my end?

pacman -S qt6-multimedia-gstreamer
Comment 6 A M 2024-05-16 22:42:42 UTC
(In reply to Antonio Rojas from comment #5)
> (In reply to A M from comment #4)
> > (In reply to Antonio Rojas from comment #2)
> > > Apparently audiotube only works with the gstreamer qtmultimedia backend,
> > > which is not documented anywhere.
> > 
> > Is that something i can fix on my end?
> 
> pacman -S qt6-multimedia-gstreamer

That's fixed it, Thank you plenty.
Comment 7 Jonah Brüchert 2024-05-16 23:20:20 UTC
> Apparently audiotube only works with the gstreamer qtmultimedia backend, which is not documented anywhere.

Where would be a place to document this where you would find it during packaging?
Checking for the backend with cmake is probably non-trivial unfortunately.

I can put it into the README, however that's probably also rarely read.
Comment 8 Antonio Rojas 2024-05-17 06:36:46 UTC
(In reply to Jonah Brüchert from comment #7)
> > Apparently audiotube only works with the gstreamer qtmultimedia backend, which is not documented anywhere.
> 
> Where would be a place to document this where you would find it during
> packaging?
> Checking for the backend with cmake is probably non-trivial unfortunately.
> 
> I can put it into the README, however that's probably also rarely read.

qtmultimedia backends provide cmake targets, so something like

if (NOT TARGET Qt6::QGstreamerMediaPlugin)
  message (FATAL_ERROR "QtMultimedia gstreamer backend not found")
endif ()
Comment 9 ZenithMonk 2024-09-23 03:45:01 UTC
Not sure if it is related to the same bug, as the package “qt6-multimedia-gstreamer” is installed on my machine, but the playback does not always work. In most cases, the player sits idle at “0:00” and does not progress.
Clearing the cache and reinstalling the audiotube package did not solve the issue.

Logs: 

Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
futuresql: Migrations finished
futuresql: Running "select distinct (search_query) from searches order by search_id desc limit 20"
futuresql: Running "select * from favourites natural join songs order by favourites.rowid desc"
futuresql: Running "select * from played_songs natural join songs"
futuresql: Running "select * from played_songs natural join songs order by plays desc limit 10"
futuresql: Running "select * from playlists"
qrc:/AlbumCoverItem.qml:19:12: Duplicate signal name: invalid override of property change signal or superclass signal
futuresql: Running "select * from playlists"
futuresql: Running "select * from playlists"
Running with untested version of ytmusicapi 1.8.1.
The currently tested and supported version is 1.8.0
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitWidth"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:401:33: QML Binding: Binding loop detected for property "value"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:401:33: QML Binding: Binding loop detected for property "value"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitWidth"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:401:33: QML Binding: Binding loop detected for property "value"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitWidth"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:344:18: QML ScrollView: Binding loop detected for property "calculatedImplicitHeight"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:401:33: QML Binding: Binding loop detected for property "value"
qrc:/qt/qml/org/kde/kirigami/dialogs/Dialog.qml:401:33: QML Binding: Binding loop detected for property "value"
Running with untested version of ytmusicapi 1.8.1. If you experience errors, please report them to your distribution.
futuresql: Running "select count(*) > 0 from favourites where video_id = ?"
[youtube] Extracting URL: C7KvlHNwIX0
[youtube] C7KvlHNwIX0: Downloading webpage
Naive thumbnail resolution failed, falling back to yt-dlp (slower)
[youtube] C7KvlHNwIX0: Downloading ios player API JSON
[youtube] C7KvlHNwIX0: Downloading web creator player API JSON
[youtube] C7KvlHNwIX0: Downloading m3u8 information
futuresql: Running "insert or replace into songs (video_id, title, artist, album) values (?, ?, ?, ?)"
Could not change state of "playerPipeline" to PAUSED ASYNC
qt.multimedia.player: Unable to set the pipeline to the paused state.
futuresql: Running "insert or ignore into played_songs (video_id, plays) values (?, ?)"
futuresql: Running "update played_songs set plays = plays + 1 where video_id = ? "
futuresql: Running "select * from played_songs natural join songs"
futuresql: Running "select * from played_songs natural join songs order by plays desc limit 10"
[youtube] Extracting URL: xti_6Bzpa8A
[youtube] xti_6Bzpa8A: Downloading webpage
[youtube] xti_6Bzpa8A: Downloading ios player API JSON
[youtube] xti_6Bzpa8A: Downloading web creator player API JSON
[youtube] xti_6Bzpa8A: Downloading m3u8 information

SOFTWARE/OS VERSIONS
OS: Arch x86_64
Kernel: 6.10.10-zen1-1-zen
KDE Plasma Version:  6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Graphics Platform: Wayland
Audiotube version : 24.08.1