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

    mpd for bacground music

    Scheduled Pinned Locked Moved Ideas and Development
    mpd music
    9 Posts 2 Posters 563 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.
    • langestL
      langest
      last edited by

      Hello!
      I installed mpd to get bg music in ES.
      I added "mpc pause" to the runcommand-onstart.sh and "mpc play" to the runcommand-onend.sh and everything is working just as intended.
      Except one thing. I use splash videos and can't figure out how to start mpd when the video ends.
      I have tried to add it to rc.local, on this line https://github.com/RetroPie/RetroPie-Setup/blob/3a35c1b25ce051507981fd310bbd1a1573032f26/scriptmodules/supplementary/splashscreen/asplashscreen.sh#L35
      but it always starts during the splash video, not after.

      Is there a script that is called once the splash ends? Or any other way to call "mpc play" once the video has ended?

      Thanks!

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

        @langest said in mpd for bacground music:

        Is there a script that is called once the splash ends? Or any other way to call "mpc play" once the video has ended?

        Use the autostart script that launches Emulationstation and add your mpd start script just before ES starts.

        1 Reply Last reply Reply Quote 0
        • langestL
          langest
          last edited by

          @mitu said in mpd for bacground music:

          Use the autostart script that launches Emulationstation and add your mpd start script just before ES starts.

          Problem is that ES starts before the video ends so then the music still starts in the middle of the video. :/

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

            @langest said in mpd for bacground music:

            Is there a script that is called once the splash ends? Or any other way to call "mpc play" once the video has ended?

            The do it the other way around - start mpd in the splashscreen script, right after omxplayer finishes playing the video.

            1 Reply Last reply Reply Quote 0
            • langestL
              langest
              last edited by

              That is what I initially tried. But I probably got the wrong script, or the wrong place in the script. This is where I tried to add it. But it still starts too early. Maybe it is not the correct place.
              Which script is it that launches the splashscreen?

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

                @langest said in mpd for bacground music:

                This is where I tried to add it.

                That seems the right place to do it.

                1 Reply Last reply Reply Quote 0
                • langestL
                  langest
                  last edited by

                  I tried commenting out the omxplayer command and the video still plays so my guess is that it is run from somewhere else. But I have no clue where.
                  I ran silver searcher to try and find where it could be, without any luck.

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

                    @langest Please add the info requested in https://retropie.org.uk/forum/topic/3/read-this-first. What image did you use to install RetroPie ?

                    1 Reply Last reply Reply Quote 0
                    • langestL
                      langest
                      last edited by

                      Solved it.
                      The script was installed in /opt/retropie/supplementary/splashscreen/asplashscreen.sh not the one in RetroPie-Setup/scriptmodules/supplementary/splashscreen/asplashscreen.sh
                      Now it works. Thanks for the help.

                      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.