Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!
RetroMarty last edited by
@mitu thank you so much, it works perfectly!
liveforeva 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.
cyperghost last edited by cyperghost
@liveforeva You likely setted.
autostart.shwrong ... 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
I think this will help you in some kind of making bgm for your images work again
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?
cyperghost last edited by cyperghost
@Arkz Instead of
mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null &in
@cyperghost Thanks my dood.
@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?
cyperghost last edited by
mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null)
Command is wrong..
mpg123 -q -Z /home/pi/bgm/*.mp3 < /dev/null &
@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
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.
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?
@jose__macedo How did you configure the music start-up ?
jh56666 last edited by
I hope this helps some of you out and if there's any questions, please feel free to ask! Also, if there's any suggestions in how to tidy this guide up, please let me know as well.
Looks great but how does one turn it off, you ask?
MeanJoeA last edited by
Configuration for playing .ogg files
@Naprosnia thanks for the great install script. Made my noob life easy.
I couldn't get my system to play ogg files in the music folder.
I edited bgm_system.sh and added ogg to the mp3file type list (line 77). Next I reloaded music and ... SUCCESS!
Does anyone else have issues playing .ogg files?
Is this the correct fix? (or just a workaround for something wonky in my system?)
agboju_logun last edited by
Another thumbs up for @Naprosnia's solution.
I've recently rebuilt my 3b+ from scratch and I had a bit of bother getting the fade in/out function working when launching/quitting games.
After a bit of trial and error, I got it working by amending the CHANNEL variable in bgm_system.sh from "PCM" to "HDMI":
#ALSA related vars
All working nicely now :)
Codafire last edited by
@maplestory i dont know why but this works perfect in my rasp3 but in the rasp4 i follow the same guide but always start with the same song. any way to make a random music selection at start?
ICYBAWSS last edited by
when i do
sudo nano /home/pi/.bashrc,
retropie_welcomedoes not show up. im using a pi 4 btw
Logiurser09 last edited by
i have no idea where to put my mp3 file