RetroPie-Setup
RetroPie-Setup copied to clipboard
Switch to using VLC for splashscreen
Here is a possible solution for splashscreen support that works on bullseye.
omxiv / omxplayer only works on the Raspberry Pi legacy and fkms drivers.
This change switches to vlc for both utilities, as it supports mmal output on the Raspberry Pi legacy drivers, and drm output on KMS on Raspberry Pi OS (on bullseye).
This change includes stopping vlc before launching ES on kms as ES will fail to open the display otherwise. Maybe we should introduce an option to "wait" for vlc to finish before we start ES. May be useful for video splashes etc.
From my testing:
On Buster:
RPI3
Legacy Driver (default config)
- omxiv - ES displays over splashscreen
- vlc - ES displays over splashscreen
FKMS
- omxiv - ES displays under splashscreen
- vlc - ES displays under splashscreen (mmal_vout)
KMS
- omxiv - no output (no openmax)
- vlc - no output (version in Buster doesn't have drm support)
RPI4
FKMS (default config)
- omxiv - ES displays under splashscreen
- vlc - ES displays under splashscreen
KMS
- omxiv - no output
- vlc - no output
On Bullseye:
RPI3/RPI4
KMS
- omxiv - not available
- vlc - uses drm_vout - need to stop VLC before ES launches or it will fail
Isn‘t mpv the better player for the task? Console player. More lightweight, no GUI. Uses ffmpeg as well. Can use drm output as well.
mpv -vo gpu --gpu-context=drm
This seems to be triggered by some `gstreamer` plugin and couldn't find a `vlc` parameter to disable it. Seems to be similar to the issue noticed in the `audiosettings` module, when running `pulseaudio` commands via `sudo`. The fix can be similar (i.e. just set `XDG_RUNTIME_DIR`), though for the preview part, using `sudo -E` also quiesces the error.
- the effective splash time is like 2sec on my system. Basically
vlc
starts about the same time as the auto-login code runs, barely showing anything on the screen.
Yes - the short time isn't ideal. But at least it technically works.
Pi3, OMX, 'buster' (upgraded from current splashscreen).
- the splashscreen is obscured by ES's startup. Just like
omxplayer/omxiv
before, it requires an 'upper' layer ID to run. This can be fixed with the--mmal-layer 10000
parameter.
This didn't work when I tried but maybe I missed something. Will re-test.
- there may be some options for
vlc
to start-up faster that we may want to add:--disable-dbus
,--disable-config
,--no-media-library
(vlc
saves some info on exit to '$HOME/.local/share/vlc/without it),
--no-lua(no LUA scripts are searched in
$HOME/.local/share/vlc/lua` or in the install folders). There may not be so important, on my USB (Pi4) the start-up is fast enough.
I will try these thanks.
- the
omxiv
should not be installed ifvlc
takes over.
I thought I disabled the installation, but perhaps not. But will check all that.
Isn‘t mpv the better player for the task? Console player. More lightweight, no GUI. Uses ffmpeg as well. Can use drm output as well.
I don't know - I didn't try this. I can take a look and see if it's a better fit (Feel free to test / compare).
mpv -vo gpu --gpu-context=drm
Thanks for the feedback.
Pi3, OMX, 'buster' (upgraded from current splashscreen).
- the splashscreen is obscured by ES's startup. Just like
omxplayer/omxiv
before, it requires an 'upper' layer ID to run. This can be fixed with the--mmal-layer 10000
parameter.This didn't work when I tried but maybe I missed something. Will re-test.
It should work (tested it), but use a number over 10000
.
SDL RPI video driver runs at 10000
.
https://github.com/libsdl-org/SDL/blob/d5b5e524af010d51437470255d5ac848996eeabd/src/video/raspberry/SDL_rpivideo.h#L53-L55
omxplayer
in EmulationStation uses 10010
just to make sure it's overlayed properly:
https://github.com/cmitu/EmulationStation/blob/b99e8c21bab4d7bba564f6c7894566dfc60d000f/es-core/src/components/VideoPlayerComponent.cpp#L159-L162
@joolswills will the new splashscreen logic only be installed if there is no /opt/retropie/supplementary/splashscreen dir? https://github.com/RetroPie/RetroPie-Setup/blob/2a7279bab448633e43db6f365c04e4c972a790ac/scriptmodules/supplementary/splashscreen.sh#L270
I added mpv to asplashscreen.sh and was wondering why /opt/retropie/supplementary/splashscreen/asplashscreen was not updated.
Vlc works fine under bullseye with a pi4. Mpv works as well but it is not faster or slower. Mpv runs with „mpv —vo=gpu —gpu-context=drm —drm-connector=1.HDMI-A-1 —image-display-duration=6 —hwdec=v4l2m2m-copy“
@joolswills will the new splashscreen logic only be installed if there is no /opt/retropie/supplementary/splashscreen dir?
https://github.com/RetroPie/RetroPie-Setup/blob/2a7279bab448633e43db6f365c04e4c972a790ac/scriptmodules/supplementary/splashscreen.sh#L270
Actually that check can probably be removed - it dates back to before the splashscreen was an installable module (and the package update mechanisms). So it would install the splashscreen dependencies when the configuration was accessed. Now the configuration is only available when it's installed
I added mpv to asplashscreen.sh and was wondering why /opt/retropie/supplementary/splashscreen/asplashscreen was not updated.
Did you update the splashscreen module first ? eg. via sudo ./retropie_packages.sh splashscreen
or via retropie-setup.
@joolswills will the new splashscreen logic only be installed if there is no /opt/retropie/supplementary/splashscreen dir? https://github.com/RetroPie/RetroPie-Setup/blob/2a7279bab448633e43db6f365c04e4c972a790ac/scriptmodules/supplementary/splashscreen.sh#L270
Actually that check can probably be removed - it dates back to before the splashscreen was an installable module (and the package update mechanisms). So it would install the splashscreen dependencies when the configuration was accessed. Now the configuration is only available when it's installed
I added mpv to asplashscreen.sh and was wondering why /opt/retropie/supplementary/splashscreen/asplashscreen was not updated.
Did you update the splashscreen module first ? eg. via
sudo ./retropie_packages.sh splashscreen
or via retropie-setup.
Via retropie_setup.sh.
Via retropie_setup.sh.
Please can you be more specific - You went to "Manage Packages" -> Main Packages -> splashscreen and did update ? That should be enough but if you think something isn't working please provide a log or how to reproduce it and I will check.
Via retropie_setup.sh.
Please can you be more specific - You went to "Manage Packages" -> Main Packages -> splashscreen and did update ? That should be enough but if you think something isn't working please provide a log or how to reproduce it and I will check.
I went to „Configuration / tools“/„Splashscreen“ and selected and tested some splashscreens. No module update.
I went to „Configuration / tools“/„Splashscreen“ and selected and tested some splashscreens. No module update.
You need to update first. For end users this is handled automatically by the _update_hook if they just update RetroPie-Setup script. Easiest way when testing like this is to just update from the commandline.
https://github.com/RetroPie/RetroPie-Setup/blob/2a7279bab448633e43db6f365c04e4c972a790ac/scriptmodules/supplementary/splashscreen.sh#L18-L24
I will remove the following code block at the start of the gui_splashscreen function.
https://github.com/RetroPie/RetroPie-Setup/blob/2a7279bab448633e43db6f365c04e4c972a790ac/scriptmodules/supplementary/splashscreen.sh#L270-L273