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

    Modified Background Music Script with added overlays!

    Scheduled Pinned Locked Moved Ideas and Development
    bgmoverlaymusicsongscript
    114 Posts 22 Posters 42.8k 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.
    • Z
      zerojay @darknior
      last edited by

      @darknior said in Modified Background Music Script with added overlays!:

      @madmodder123 Hi
      Today i have try to test your script but i have a problem.

      apt-get install imagemagick
      
      git clone https://github.com/AndrewFromMelbourne/raspidmx.git
      cd pngview/
      make
      
      pi@retropie:~/src/raspidmx/pngview $ make
      cc -Wall -g -O3 -I../common -I/usr/include/libpng12 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -g -c pngview.c -o pngview.o -Wno-deprecated-declarations
      cc -o pngview -Wl,--whole-archive pngview.o -L/opt/vc/lib/ -lbcm_host -lm -lpng12 -L../lib -lraspidmx -Wl,--no-whole-archive -rdynamic
      /usr/bin/ld: ne peut trouver -lraspidmx
      collect2: error: ld returned 1 exit status
      Makefile:16: recipe for target 'pngview' failed
      make: *** [pngview] Error 1
      

      Must we install all the package ?
      Thanks

      Here's how I handled it, starting inside the git clone of that repo:

      cd lib
      make
      cp libraspidmx.so* /usr/local/bin
      nano /etc/ld.so.conf
      (type /usr/local/lib into a new line alone, save and quit nano
      ldconfig
      cd ../pngview
      make
      cp pngview /usr/local/bin/
      ldd /usr/local/bin/pngview (if you did everything right here, you should see all required libraries are present and accounted for)

      1 Reply Last reply Reply Quote 0
      • Z
        zerojay
        last edited by

        @madmodder123 It's probably a better idea to actually have the song_title.png be output to somewhere like /dev/shm which is a tmpfs kept in RAM so that you don't keep writing this file to the SD card.

        madmodder123M 1 Reply Last reply Reply Quote 1
        • madmodder123M
          madmodder123 @zerojay
          last edited by

          @zerojay Great idea! Thanks for letting me know i'll adjust the code! I'm glad you told me about that folder, you learn something new with linux every day :)

          1 Reply Last reply Reply Quote 1
          • R
            RichyMX
            last edited by RichyMX

            Hey @madmodder123 thanks for working on such a nice addition to my retropie build, however, I would like to pick your brain a bit since I'm having. Issues with it.

            I followed adding your script to the PyScripts folder and switched the previous music script I had with your updated one, despite this fact, there's no song_title.png being created ever and I can't seem to find out what the problem is, would you mind help me figuring it out?

            Music plays fine so I'm sure I did THAT right at least.

            Best regards

            EDIT: Found out why it wasn't working, the script point to /usr/bin/pngview where as @zerojay mentioned at a previous comment the following:
            Here's how I handled it, starting inside the git clone of that repo:

            cd lib
            make
            cp libraspidmx.so* /usr/local/bin
            nano /etc/ld.so.conf
            (type /usr/local/lib into a new line alone, save and quit nano
            ldconfig
            cd ../pngview
            make
            cp pngview /usr/local/bin/
            ldd /usr/local/bin/pngview (if you did everything right here, you should see all required libraries are present and accounted for)

            As you can see within these instructions pngview points at /usr/local/bin

            1 Reply Last reply Reply Quote 0
            • W
              war3zlod3r
              last edited by

              I'm having a similar problem, I get the background music but I never get the overlay or images created, I double checked and pngview is in /usr/local/bin and the command is executable with out error from the terminal. How can I troubleshoot this script?

              madmodder123M 1 Reply Last reply Reply Quote 0
              • madmodder123M
                madmodder123 @war3zlod3r
                last edited by madmodder123

                @war3zlod3r
                I wrote a script that gets everything all set up for ya!
                https://github.com/madmodder123/retropie_music_overlay/blob/master/BGM_Install.sh
                Just download that, make it executable and then run it and it should work just fine, I just tested it on a fresh install :)

                1 Reply Last reply Reply Quote 2
                • madmodder123M
                  madmodder123
                  last edited by

                  I updated the main post with the script and more instructions :)

                  1 Reply Last reply Reply Quote 2
                  • madmodder123M
                    madmodder123
                    last edited by

                    I updated the script so it makes a menu item that lets you instantly enable/disable the BGM :)

                    1 Reply Last reply Reply Quote 3
                    • darkniorD
                      darknior
                      last edited by

                      Thanks a lot, all is perfect for me now :D

                      Life is game, just play it !

                      1 Reply Last reply Reply Quote 0
                      • L
                        lokize
                        last edited by

                        any way to music change in selection of plataforms?

                        madmodder123M 1 Reply Last reply Reply Quote 0
                        • madmodder123M
                          madmodder123 @lokize
                          last edited by

                          @lokize What do you mean?

                          L 1 Reply Last reply Reply Quote 1
                          • L
                            lokize @madmodder123
                            last edited by lokize

                            @madmodder123 for example: when i select snes in main menu of plataforms play a super mario sound...

                            madmodder123M 1 Reply Last reply Reply Quote 0
                            • madmodder123M
                              madmodder123 @lokize
                              last edited by

                              @lokize I don't think you can do that in EmulationStation, I think it is a feature in Attract Mode though

                              L L 2 Replies Last reply Reply Quote 1
                              • L
                                lokize @madmodder123
                                last edited by

                                @madmodder123 in recalbox i using this feature with emulation Station, but i prefer Retropie

                                mituM 1 Reply Last reply Reply Quote 0
                                • L
                                  legacy @madmodder123
                                  last edited by

                                  @madmodder123 please can share an install guide as I've not been able to install the script. When I tried the run command it failed for me.

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

                                    @lokize Out of curiosity, why do you prefer RetroPie over Recalbox ?

                                    L 1 Reply Last reply Reply Quote 0
                                    • L
                                      lokize @mitu
                                      last edited by

                                      @mitu Recalbox consume ALL memory of my Rpi3 B And left only 10% of ram, i try fresh install but not solve, Retropie consume 20% of ram running games...

                                      1 Reply Last reply Reply Quote 0
                                      • L
                                        lokize @gleam2003
                                        last edited by

                                        @gleam2003 You can Share this script?

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

                                          problem i have is the: /usr/local/bin/pngview procces issue and

                                          (sudo python /home/pi/BGM.py) & is not working for me on reboot.

                                          help would be appreciated, before i sack this off.

                                          madmodder123M 1 Reply Last reply Reply Quote 0
                                          • madmodder123M
                                            madmodder123 @legacy
                                            last edited by

                                            @legacy said in Modified Background Music Script with added overlays!:

                                            sudo python /home/pi/BGM.py

                                            try "sudo python /home/pi/BGM.py" in the command line and tell me if it works.
                                            if not try running "sudo bash BGM_Install.sh" when installing the script.
                                            Please post the console output of any failures/issues, it makes things much easier :)

                                            1 Reply Last reply Reply Quote 1
                                            • 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.