• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Background Music Compatible with Video Preview Audio?

Scheduled Pinned Locked Moved Help and Support
video previewsbackgroundmusic
24 Posts 6 Posters 4.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    westleigh77
    last edited by 24 Mar 2018, 03:05

    Is there a way to add background music when scrolling through the game system names in Emulation Station, but have that music stop when entering a system's menu? I'd like background music at the top level of emulation station (with the system name scroll), but to maintain my video previews (with audio turned on) when actually scrolling through the game list within a system's menu.

    M 1 Reply Last reply 24 Mar 2018, 06:31 Reply Quote 0
    • M
      mitu Global Moderator @westleigh77
      last edited by 24 Mar 2018, 06:31

      @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.

      1 Reply Last reply Reply Quote 0
      • M
        madmodder123
        last edited by 24 Mar 2018, 07:19

        @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"]
        
        1 Reply Last reply Reply Quote 0
        • H
          Highfoot
          last edited by 16 Jun 2020, 20:59

          @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!

          J M 3 Replies Last reply 16 Jun 2020, 22:03 Reply Quote 0
          • J
            jurassicplayer @Highfoot
            last edited by 16 Jun 2020, 22:03

            @Highfoot
            I got you covered. It works similarly to livewire's script since that's where I got my inspiration from, though I've never tried the vlc video previews.

            1 Reply Last reply Reply Quote 0
            • J
              jurassicplayer @Highfoot
              last edited by 17 Jun 2020, 00:47

              @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.

              H 1 Reply Last reply 17 Jun 2020, 08:23 Reply Quote 0
              • M
                mitu Global Moderator @Highfoot
                last edited by 17 Jun 2020, 02:35

                @Highfoot You can disable the sound for the video previews in EmulationStation settings, that will work.

                H 1 Reply Last reply 17 Jun 2020, 07:36 Reply Quote 0
                • H
                  Highfoot @mitu
                  last edited by 17 Jun 2020, 07:36

                  @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?

                  1 Reply Last reply Reply Quote 0
                  • H
                    Highfoot @jurassicplayer
                    last edited by 17 Jun 2020, 08:23

                    @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?

                    J 1 Reply Last reply 17 Jun 2020, 10:16 Reply Quote 0
                    • H
                      Highfoot
                      last edited by Highfoot 17 Jun 2020, 08:52

                      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.

                      M 1 Reply Last reply 17 Jun 2020, 09:56 Reply Quote 0
                      • M
                        mitu Global Moderator @Highfoot
                        last edited by 17 Jun 2020, 09:56

                        @Highfoot If you have the latest version of EmulationStation, you should be able to select alsa as the output device for omxplayer. See the 1st post stickied at the top of the category.

                        H 1 Reply Last reply 17 Jun 2020, 10:46 Reply Quote 0
                        • J
                          jurassicplayer @Highfoot
                          last edited by 17 Jun 2020, 10:16

                          @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.

                          H 1 Reply Last reply 17 Jun 2020, 10:48 Reply Quote 0
                          • H
                            Highfoot @mitu
                            last edited by 17 Jun 2020, 10:46

                            @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

                            omx1.jpg omx2.jpg

                            1 Reply Last reply Reply Quote 0
                            • H
                              Highfoot @jurassicplayer
                              last edited by 17 Jun 2020, 10:48

                              @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. :)

                              M 1 Reply Last reply 17 Jun 2020, 11:09 Reply Quote 0
                              • M
                                mitu Global Moderator @Highfoot
                                last edited by 17 Jun 2020, 11:09

                                @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.

                                H 1 Reply Last reply 17 Jun 2020, 11:16 Reply Quote 0
                                • H
                                  Highfoot @mitu
                                  last edited by 17 Jun 2020, 11:16

                                  @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. :)

                                  1 Reply Last reply Reply Quote 0
                                  • H
                                    Highfoot
                                    last edited by Highfoot 17 Jun 2020, 12:10

                                    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...

                                    M 1 Reply Last reply 17 Jun 2020, 12:22 Reply Quote 0
                                    • M
                                      mitu Global Moderator @Highfoot
                                      last edited by 17 Jun 2020, 12:22

                                      @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.

                                      H 1 Reply Last reply 17 Jun 2020, 14:01 Reply Quote 0
                                      • H
                                        Highfoot @mitu
                                        last edited by 17 Jun 2020, 14:01

                                        @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.

                                        M 1 Reply Last reply 17 Jun 2020, 14:45 Reply Quote 0
                                        • M
                                          mitu Global Moderator @Highfoot
                                          last edited by 17 Jun 2020, 14:45

                                          @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).

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received