Missing audio in Video Screensaver
VerVon last edited by
I get sound everywhere except the video screensaver, if anyone has a work-around let me know. Sound is set to true, and omxplayer is not muted. When browsing roms the videos play fine and with audio.
I also tested outside with F4 on the command prompt with any mp4 file in the various roms/snaps dirs:
omxplayer -o alsa:default ./RetroPie/roms/atomiswave/snap/dolphin.mp4
The above command plays the video with sound correctly. Guess I should look into a PR but I haven't cracked the code open yet so it'll take awhile to get some footing.
VerVon last edited by VerVon
In case anyone googles and finds this ... I did get to the bottom of it by looking into the source code (by source code I mean the RetroPie ES version, stable branch)
You can see here in VideoPlayerComponent.cpp where it launches omxplayer with a bunch of args:
// Run the omxplayer binary execve("/usr/bin/omxplayer.bin", (char**)argv, (char**)env);
Now if you fire up ES, launch the screensaver, and take a look in the process list while its running (in ssh session, ps -ef) you'll actually see all those args, something like this in the process list:
pi 2143 1 7 01:16 ? 00:00:08 --layer 10010 --loop --no-osd --aspect-mode stretch --vol -3885 -o alsa --win 0,0,800,480 --orientation 0 /home/pi/RetroPie/roms/neogeo/media/videos/trally.mp4
What I noticed is the volume is set to -3885. Now if I run that on the command line to simulate the screensaver I can play with the volume. For omxplayer, volume 0 should be 100% as it's measured in millibels according to the omxplayer help.
So I quit es and ran this:
omxplayer.bin --layer 10010 --loop --no-osd --aspect-mode stretch -o alsa --vol -0 --win 0,0,800,480 --orientation 0 /home/pi/RetroPie/roms/neogeo/media/videos/trally.mp4
ok great I can hear it now! I researched %vol to db and the formula is db = 20*log(%vol) and that checks out because I had es at roughly 65% volume which equates to about -3742 millibels.
So I went back into es and set the volume to 100%, and now I can finally hear it on a default RetroPie install. The issue is the drop off is really steep (must be some bug in omxplayer on pi, that their millibels to volume curve is off) because if you set the volume level at say, 60% you won't hear much of anything from the speakers. I think this is also compounded by the fact that when you're playing around with the audio settings in es, many times it resets the volume back to zero because it's trying to sync up the level with alsa.
Anyway, hope this helps someone get their head around the screensaver audio.
p.s. also, in es audio settings, make sure you set the "omx player audio device" to alsa (or whatever works on your pi, or in your command line experiments), as that drives the argument sent into omxplayer above.