community/plasma-videoplayer: can not play certain videos / missing codecs
Fairly simple problem: I am unable to play certain video files per default on plasma-videoplayer
.
Description
plasma-videoplayer
installs only a base set of gstreamer plugins (through its dependency qt5-qtmultimedia
). This doesn't cover many codecs regularly encountered in the wild.
The test video file was obtained via youtube-dl
from here.
Obtaining some information about it via ffmpeg -i
yields
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'God Save The Queen (Remastered 2011)-8_hOex6cSWc.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2020-01-22T03:55:16.000000Z Duration: 00:01:15.37, start: 0.000000, bitrate: 212 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 360x360 [SAR 1:1 DAR 1:1], 114 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: creation_time : 2020-01-22T03:55:16.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 01/21/2020. vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default) Metadata: creation_time : 2020-01-22T03:55:16.000000Z handler_name : ISO Media file produced by Google Inc. Created on: 01/21/2020. vendor_id : [0][0][0][0]
Logs gathered through executing vplayer
in the terminal:
- It first refuses to play it at all, producing
GStreamer; Unable to play - "file:///home/user/Videos/God Save The Queen (Remastered 2011)-8_hOex6cSWc.mp4" Warning: "No decoder available for type 'video/quicktime, variant=(string)iso'." Error: "Your GStreamer installation is missing a plug-in." Warning: "No decoder available for type 'video/quicktime, variant=(string)iso'." Error: "Your GStreamer installation is missing a plug-in." Warning: "No decoder available for type 'video/quicktime, variant=(string)iso'." Error: "Your GStreamer installation is missing a plug-in." file:///usr/lib/qt5/qml/org/kde/kirigami.2/private/ActionButton.qml:216:13: QML Timer: ToolTip must be attached to an Item Warning: "No decoder available for type 'video/quicktime, variant=(string)iso'." Error: "Your GStreamer installation is missing a plug-in."
- After installing
gst-plugins-good
it plays the audio but fails at the video showing
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)2.1, profile=(string)constrained-baseline, codec_ data=(buffer)0142c015ffe100196742c015da05c2fe597011000003000100000300320f162ea001000468ce3c80, width=(int)360, height=(int)360, framerate=(fraction)25/1, pixel-aspect- ratio=(fraction)1/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true'."
Latter thing can also be fixed through installing an additional package, gst-libav
(as mentioned in this StackOverflow post).
Resolution approach
Note: I'm still fairly unfamiliar with APKBUILDs so maybe there are better solutions to this.
-
Include all most commonly used gstreamer plugins in the
depends
.
I feel that this goes against the Alpine philosophy to only include a basic feature set and let the user decide - some users maybe only want to install certain codecs for use withplasma-videoplayer
. OTOH,plasma-videoplayer
seems like an application more designed for end users than someone dealing with very terse storage requirements. -
A subpackage
plasma-videoplayer-codecs
which includes most commonly used gstreamer plugins.
AFAIK, there doesn't exist an equivalent tooptdepends
from Arch's PKGBUILDs, right? -
Don't do anything since most Alpine (and for this matter, pmOS users) probably know how to install their required gstreamer plugins anyway.
Notes
Here is how some other similar Alpine packages handle this general issue:
-
lollypop
seems to follow the same approach asplasma-videoplayer
: it getsgst-plugins-base
through an external dependency (py3-gst
). -
parole
shipsgst-plugins-good
in addition togst-plugins-base
. -
rhythmbox
only installsgst-plugins-base
per default. -
gnome-sound-recorder
hasgst-plugins-bad
in itsdepends
. -
totem
(currently disabled) used to installgst-plugins-good
.