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

    Play music playlist on emulationstation (when idle)

    Scheduled Pinned Locked Moved Help and Support
    emulationstatonsoundplaylistmp3script
    19 Posts 5 Posters 1.9k 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.
    • cyperghostC
      cyperghost @zerojay
      last edited by

      @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

      1 Reply Last reply Reply Quote 0
      • N
        NightShadowPT
        last edited by

        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

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

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

          N 1 Reply Last reply Reply Quote 0
          • H
            Hyuma @zerojay
            last edited by

            @zerojay thanks for links, i will study that!

            cyperghostC 1 Reply Last reply Reply Quote 0
            • N
              NightShadowPT @mitu
              last edited by

              @mitu Thanks! I'll look into it...

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

                @hyuma @NightShadowPT

                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/bgm

                Now the magic of > means
                Send all messages from stderr = 2
                To stdout = 1
                Send stdout to nirvana

                At last the last &
                Means send the whole process to background

                1 Reply Last reply Reply Quote 1
                • N
                  NightShadowPT
                  last edited by

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

                  cyperghostC 1 Reply Last reply Reply Quote 0
                  • H
                    Hyuma
                    last edited by

                    @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: alt text

                    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?

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

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

                      1 Reply Last reply Reply Quote 0
                      • H
                        Hyuma
                        last edited by

                        Ok I've tested jslisten but only accept 4 button pressed at once and seems no button sequence working...

                        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.