Background Music Compatible with Video Preview Audio?
-
@westleigh77 It depends on the script you're using. There's a version that stops/fades the music when it detects certain programs being run - https://retropie.org.uk/forum/topic/347/background-music-continued-from-help-support/.
Depending on the video player you're using, you can configure it to stop the music if it detects the video being played, but I don't think it can play the music just on the ES main screen since it cannot detect that. -
@mitu said in Background Music Compatible with Video Preview Audio?:
@westleigh77 It depends on the script you're using. There's a version that stops/fades the music when it detects certain programs being run - https://retropie.org.uk/forum/topic/347/background-music-continued-from-help-support/.
Depending on the video player you're using, you can configure it to stop the music if it detects the video being played, but I don't think it can play the music just on the ES main screen since it cannot detect that.mitu always being super helpful :)
Here is an updated list of emulators/background music apps (although for this specific case i think you only need to add "omplayer.bin"):
emulatornames = ["retroarch","ags","uae4all2","uae4arm","capricerpi","linapple","hatari","stella","atari800","xroar","vice","daphne","reicast","pifba","osmose","gpsp","jzintv","basiliskll","mame","advmame","dgen","openmsx","mupen64plus","gngeo","dosbox","ppsspp","simcoupe","scummvm","snes9x","pisnes","frotz","fbzx","fuse","gemrb","cgenesis","zdoom","eduke32","lincity","love","kodi","alephone","micropolis","openbor","openttd","opentyrian","cannonball","tyrquake","ioquake3","residualvm","xrick","sdlpop","uqm","stratagus","wolf4sdl","solarus","drastic","coolcv","PPSSPPSDL","moonlight","Xorg","smw","omxplayer.bin"]
-
@mitu and @madmodder123 your links and “emulatornames” are really helpful, but what to do if you do not use omxplayer for the video previews? Can i put in a line in my script that makes the BGM music stop when the previews are run by vlc? I tried to put in “vlc” but that did not do anything.
All form of help is appreciated! :)
Thanks!
-
-
@Highfoot
So I tried the vlc video previews. It's using libvlc rather than calling vlc, which means that there is no vlc process to look for (emulationstation just cranks up the cpu usage) so just adding "vlc" to the process names won't do anything.You could extend the script to monitor for the cpu usage of emulationstation and have a threshold that triggers the fade out.
-
@Highfoot You can disable the sound for the video previews in EmulationStation settings, that will work.
-
@mitu yeah, if I do not find any solution for this I guess that’s how it’s going to be. But I would prefer BGM music fading so you can hear the gameplay sound.
First I just thought that activating omxplayer would solve this, but I only get video with no sound. Do you have any idea of why this may be?
-
@jurassicplayer thanks for looking it up! :) It sounds to complicated for my current skills though, I’m pretty new to alls this.
I think i will try to make oxmplayer work instead. I have video working but with no sound. Have any direct thoughts on why that is?
-
About my problem with omxplayer that has video but no sound:
I went out to the terminal and played a video with “omxplayer -o alsa” and both the video and sound worked. Is there a place in a file somewhere that i can edit this in? I have played around with the options that do exist in the EmulationStation already, but with no luck. -
@Highfoot If you have the latest version of EmulationStation, you should be able to select
alsa
as the output device foromxplayer
. See the 1st post stickied at the top of the category. -
@Highfoot
Actually I added a cpu threshold for emulationstation into my script. Pretty much when ES goes over the cpu_threshold, it will assume that ES is playing a video and do the same fade out.The only downside is that it could still trigger if ES decides to spike up in CPU usage (shuffling through a list of games, etc.), but it's a customizable value so you can set it to whatever you see ES tend to hover at while playing a video. That and it's another package dependency.
I'd still say to see if mitu's suggestion works, and if all else fails, then there is always my script as a workable backup.
-
@mitu I suppose you mean this? These two options makes both the video and sound go away. I don’t really know what to make out of it. If the result of these options is the same as the command manually wrote in the terminal it is really weird, right?
This is my setup, if it is any use to you guys:
Model: Raspberry pi 3b+ built into an Picade cabinet.
Power Supply used: 5.1V 3A
RetroPie Version Used: 4.6 rpi2
Emultationstation 2.9.1RP
Built From: image from Retropie’s official site.
USB Devices connected: none
Controller used: Picade stick and buttons -
@jurassicplayer Wow, sound nice. Really appreciate that! But as you say, let’s see if we can get omxplayer to runt properly. It should not be impossible. :)
-
@Highfoot said in Background Music Compatible with Video Preview Audio?:
It should not be impossible. :)
As I said, take look at the 1st stickied topic in the Help section.
-
@mitu thanks! I first did not get where you meant i should look, but i get it now. I will read this and try this out and get back to you if it was a success. :)
-
Hello again @mitu ,
I followed the post and updated RetroPie-setup script (was that correct?) and Emulationstation. I know have the Alsa to choose from the sound options in ES. I also choose HDMI as Audio device but still no sound. I do notice that the volume slider indeed is stuck to 0% and seems to only work if i choose PCM as Audio device.
When i quit out to the terminal i also saw the “lvl0: VolumeControl::init() - Failed to find mixer elements“ as mentioned in the post.
Worth mentioning is that my audio goes through a speaker that is mounted inside the Picade cabinet. Is HDMI as audio device still correct is that case?
Did i do something wrong/missed something? Sorry for being such a noob...
-
@Highfoot said in Background Music Compatible with Video Preview Audio?:
Did i do something wrong/missed something? Sorry for being such a noob...
Did you read the whole post ? It specifies what settings apply in each audio output situation.
-
@mitu I think so, sorry. I tried both “audio output HDMI” and “Headphone” but none of them worked. I do not see any other options specified. I just noticed though that my screensaver that is set to use omxplayer do have sound, but still nothing on the video previews in the games selection area. Don’t know what to make of that...
I just realized that i mixed up that there is audio settings for both RetroPie and EmulationStation, but i only get “On-board audio disabled or not present” when i go into RetroPie setup.
-
@Highfoot said in Background Music Compatible with Video Preview Audio?:
but i only get “On-board audio disabled or not present” when i go into RetroPie setup.
This usually means you disabled the on-board audio and you have an exernal audio card (I2s/USB).
-
@mitu Yes, there is an HAT on the RP3b+ so i guess The onboard card disabled itself when i installed it with the script provided. On this HAT there is a two pin contact for the speaker that i use. What i now don’t understand is why the audio for the emulators and the screensaver (videos played with omxplayer) do work perfectly, but not the audio for the video previews when selecting games.
The screensaver working is a one step closer at least! :D
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.