RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!

    Scheduled Pinned Locked Moved General Discussion and Gaming
    musicbgmsynackguide
    165 Posts 59 Posters 114.2k 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.
    • WarC0zesW
      WarC0zes
      last edited by

      @Naprosnia Really cool the version 2.0, great job. Thanks.

      RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

      1 Reply Last reply Reply Quote 0
      • S
        Sibby
        last edited by

        @Naprosnia 2.0 is awesome! I don't know how it all works but somehow this should be considered for an optional RP package. Oh, enjoy your burger too :)

        1 Reply Last reply Reply Quote 0
        • G
          gumpy123
          last edited by

          Here's an interesting one, I changed the ES boot logo just fine, I removed the ES boot logo with the --no-splash tag but you cant have background music and not have the ES boot screen, it only works if I've got both. It does however work if i go into the setup.sh file and move the emulationstation --no-splash to the top and move the omx bgm music player to the bottom. I get no ES splash but music dont work. Unless it's the other way around then it works

          N 1 Reply Last reply Reply Quote 0
          • N
            Naprosnia @gumpy123
            last edited by

            @gumpy123 hello, You use my version of bgm player? Can you post here autostart.sh content? I use omx splashscreen and the --no-splash for ES and everything works.

            1 Reply Last reply Reply Quote 0
            • B
              bloodykean
              last edited by

              @Naprosnia is there an option to implement this to the Ubuntu scenario. I have installed RetroPie to Ubuntu and the script works... but autostart on boot and start stop doesn't... any help?

              1 Reply Last reply Reply Quote 0
              • RetroMartyR
                RetroMarty
                last edited by

                I followed the original tutorial, all was fine, I started up a game, the music faded out perfectly, but then there was no audio for the game. I am running the latest version of retropie on a raspberry 2.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @RetroMarty
                  last edited by mitu

                  @RetroMarty Is your sound working if you don't install the music scripts ? What emulator is started when you have no sound ?

                  RetroMartyR 1 Reply Last reply Reply Quote 0
                  • RetroMartyR
                    RetroMarty @mitu
                    last edited by

                    @mitu Sorry, I was working with a different tutorial, I got this one in and just need help with how to access the file to put in th mp3s

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @RetroMarty
                      last edited by mitu

                      @RetroMarty You'll need to copy the *.mp3 files into the /home/pi/bgm folder and they'll be played from there.

                      RetroMartyR 1 Reply Last reply Reply Quote 0
                      • RetroMartyR
                        RetroMarty @mitu
                        last edited by

                        @mitu thank you so much, it works perfectly!

                        1 Reply Last reply Reply Quote 0
                        • L
                          liveforeva @MapleStory
                          last edited by

                          @MapleStory I'm having a problem. I've got my mp3s to work but only when I f4 out of emulation station. When i go back into emulation station the music continues but if I shut down or reset my music will not play untill I f4 out of emulation station. Any help would be appreciated thanks.

                          cyperghostC 1 Reply Last reply Reply Quote 0
                          • cyperghostC
                            cyperghost @liveforeva
                            last edited by cyperghost

                            @liveforeva You likely setted. autostart.sh wrong ... real deal is this setup

                            (sleep 10; mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null) &
                            emulationstation #auto
                            

                            Check also if your path, where the music tracks are residing is /home/pi/bgm
                            I think this will help you in some kind of making bgm for your images work again

                            1 Reply Last reply Reply Quote 0
                            • ArkzA
                              Arkz
                              last edited by Arkz

                              Didn't work at first but it turns out the filename is case sensitive. Once I changed that it worked fine. Only issue is when I return to emulationstation I want the music to start from the beginning, not resume from where it was. Is there something I can change to make it do this?

                              1 Reply Last reply Reply Quote 0
                              • cyperghostC
                                cyperghost
                                last edited by cyperghost

                                @Arkz Instead of -STOP and -CONT use just
                                pkill mpg123 in runcommand-onstart.sh and
                                mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null & in runcommand-onend.sh

                                EDITED!

                                ArkzA 2 Replies Last reply Reply Quote 1
                                • ArkzA
                                  Arkz @cyperghost
                                  last edited by

                                  @cyperghost Thanks my dood.

                                  1 Reply Last reply Reply Quote 0
                                  • ArkzA
                                    Arkz @cyperghost
                                    last edited by

                                    @cyperghost Hmm. I've entered exactly that (except for the proper filename), it starts fine but when returning to the menu it doesn't start. Just stays quiet. Is there something else I need to change?

                                    1 Reply Last reply Reply Quote 0
                                    • cyperghostC
                                      cyperghost
                                      last edited by

                                      @cyperghost said in Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!:

                                      mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null)

                                      Command is wrong..

                                      it's mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null &

                                      ArkzA 1 Reply Last reply Reply Quote 1
                                      • ArkzA
                                        Arkz @cyperghost
                                        last edited by

                                        @cyperghost Ah, I thought it might be the parenthesis since there was only one, but I'm not familiar with this language, suppose I should've just tried it. Thanks again bro

                                        1 Reply Last reply Reply Quote 0
                                        • Soryn79S
                                          Soryn79
                                          last edited by

                                          I know this is an old topic but since it's still relevant, I figured I would post this.

                                          I went with the original method listed here as I saw that before I found out about the v2.0... I had a video splash screen and I noticed that the autostart.sh files addressed this wrong. Using the way it was posted originally, after the video, it kicks back to the pi boot screen for 1 second (sleep 1) and then starts ES. This stops people who want the video to pass the ES loading screen as it forces ES to wait until after the 1 second sleep after the video ends to start ES.

                                          I recommend changing:

                                          while pgrep omxplayer >/dev/null; do sleep 1; done
                                          (sleep 10; mpg123 -Z /home/pi/bgm/*.mp3 >/dev/null 2>&1) &
                                          emulationstation #auto
                                          

                                          to this: (the --no-splash is optional)

                                          emulationstation --no-splash &
                                          while pgrep omxplayer >/dev/null; do sleep 1; done
                                          (mpg123 -Z /home/pi/bgm/*.mp3 >/dev/null 2>&1) #auto
                                          

                                          Changing it so that it starts after ES loads just makes more sense to me. This makes sure that the music will always start 1 second after the video ends regardless of video length.

                                          L 2 Replies Last reply Reply Quote 0
                                          • J
                                            jose__macedo
                                            last edited by

                                            I turn on my retropie and no music are played. Once I enter the command line with F4, the music starts and even I exit back to ES, it continues playing. Why it's not initializing automatically when I boot the system? Any help?

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