Play music playlist on emulationstation (when idle)
-
@zerojay Yes but mpg123 gots a native shuffle command it is the -Z parameter. Disadvantage is that you do not see which track is played next. So use find command with shuffle and create a playlist to volatile path \dev\shm is an option to be considered
-
I have implemented it on my RetroPie, but when I'm at the command line and the music loops, it just messes up the display with all the data about the MP3 its playing.
Is there a way to just make it loop "silently" (i.e. not send any data to the console)?
Cheers
-
@nightshadowpt said in Play music playlist on emulationstation (when idle):
Is there a way to just make it loop "silently" (i.e. not send any data to the console)?
Yes, it's described in the original topic at https://retropie.org.uk/forum/topic/9133/quick-and-easy-guide-for-adding-music-to-emulatonstation-on-retropie-noob-friendly. Look at how
mpg123
is started and add the necessary arguments. -
@zerojay thanks for links, i will study that!
-
@mitu Thanks! I'll look into it...
-
The magic of silent working in background is here
mpg123 -Z /home/pi/bgm/*.mp3 >/dev/null 2>&1 &
Mpg123 is command
-Z is endless shuffle of dir /home/pu/bgmNow the magic of > means
Send all messages from stderr = 2
To stdout = 1
Send stdout to nirvanaAt last the last &
Means send the whole process to background -
Thanks for the in depth explanation... it's always good to understand what I am typing :)
Anyway, I found a mistake on my initial typing. Instead of this:
mpg123 -Z /home/pi/bgm/*.mp3 >/dev/null 2>&1 &I had this (note the missing > after the 2):
mpg123 -Z /home/pi/bgm/*.mp3 >/dev/null 2&1 &So that should be the culprit.
After fixing it, every time I exit to the console I get a message saying "/opt/retropie/configs/all/autostart.sh: line 2: 935 Terminated" and the music is turned off.
Not sure if this is the intended behavior, but it works for me. :)
-
@zerojay reading that reddit topic has to be interensting, but i have some question... how can I adapt a combination of jstest reading in a .sh script? As the hadoken is something similar to:
I have to read down, down right, right, punch, right? and after that the script must be running forever in emulationstation idle time.. so when i do that move the playlist start.. is this thinking correct?
-
@nightshadowpt the 2>&1 is mandatory to hide error messages from output, too
Your direction points standard output to nirvana but error messages are still displayed.
-
Ok I've tested jslisten but only accept 4 button pressed at once and seems no button sequence working...
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.