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 43.1k 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.
    • madmodder123M
      madmodder123 @zaibatsu
      last edited by madmodder123

      @zaibatsu
      not sure why it says pngview-n, in the BGM.py script does it say: overlay_pngview_location = '/usr/local/bin/pngview' ?
      Ah I think I got it fixed, download the BGM.py file, replace your current one, and then try it.

      @cyperghost
      If you were in much pain as I was you would be swearing too.
      I'll think about buying that case.

      Z MarcoM 2 Replies Last reply Reply Quote 0
      • Z
        zaibatsu @madmodder123
        last edited by

        @madmodder123 Now I get this alt text Looks like it still has something to do with pngview-n or something. I checked that folder and its exactly 'pngview'.

        1 Reply Last reply Reply Quote 0
        • MarcoM
          Marco @madmodder123
          last edited by

          @madmodder123
          I created this account just to thank you for your work :) Hope you can recover fully and fast from your accident!
          I would like to report one thing that might be useful: in emulatorlist string array from BGM.py i noticed it missed the pcsx-rearmed emulator, which is different from the lr-pcsx-emulator one, if you want to add that in the name is "pcsx". It's probably 2-sec work for you but i had trouble finding the actual name of the emulator so i just wanted to help as i could.. I'm no programmer so sorry for non-technical language :/

          @zaibatsu
          I had your same problem.. Probably in these days pngview updated so that it no loger supports the -n command (however this is just an assumption). I solved by modifying madmodder123's BGM.py at line 179 by removing such command. So modifying the line from

          show_overlay = overlay_pngview_location + " -n -d 0 -b 0x0000 -l 15000 -y " + overlay_y_offset + " -x " + overlay_x_offset + " " + overlay_tmp_file + " &"

          to

          show_overlay = overlay_pngview_location + " -d 0 -b 0x0000 -l 15000 -y " + overlay_y_offset + " -x " + overlay_x_offset + " " + overlay_tmp_file + " &"

          And it starts working again. Hope i could help you :)

          Z madmodder123M 2 Replies Last reply Reply Quote 0
          • Z
            zaibatsu @Marco
            last edited by

            @Marco Thanks! It's working just fine now. I knew it was something simple but I wouldn't have known how to fix it. Thanks again

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

              @Marco
              Glad you enjoyed it :)
              I removed the "-n" in the code for now, I also added pcsx-rearmed to the emulator list (along with some other optional games/apps/emulators).
              If you run into any more that don't stop the music when launched all you have to do is connect via SSH and type in the "top" command which will show you a list of all the process names.
              Then all you do is add it to this line:

              emulatornames = ["retroarch","ags","uae4all2","uae4arm","capricerpi","linapple","hatari","stella","atari800","xroar","vice","daphne","reicast","pifba","osmose","gpsp","jzintv","basiliskll","mame","advmame","dgen","openmsx","mupen64plus","gngeo","dosbox","ppsspp","simcoupe","scummvm","snes9x","pisnes","frotz","fbzx","fuse","gemrb","cgenesis","zdoom","eduke32","lincity","love","kodi","alephone","micropolis","openbor","openttd","opentyrian","cannonball","tyrquake","ioquake3","residualvm","xrick","sdlpop","uqm","stratagus","wolf4sdl","solarus","drastic","coolcv","PPSSPPSDL","moonlight","Xorg","smw","omxplayer.bin","wolf4sdl-3dr-v14","wolf4sdl-gt-v14","wolf4sdl-spear","wolf4sdl-sw-v14","xvic","xvic cart","xplus4","xpet","x128","x64sc","x64","prince","fba2x","steamlink","pcsx-rearmed","limelight","sdltrs","ti99sm","dosbox-sdl2","minivmac","quasi88","xm7","yabause","abuse","cdogs-sdl","cgenius","digger","gemrb","hcl","love","love-0.10.2","openblok","openfodder","srb2","yquake2","amiberry","zesarux","dxx-rebirth","zesarux"]
              

              If anyone runs into some that aren't on the list, please let me know and i'll update the script!
              I might try to work on the script more this weekend if I have time.

              @cyperghost
              Oh and I ended up buying an OGST kit for ODROID, so I may work on that ;)

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

                Preview of OGST script
                alt text

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

                  @cyperghost
                  Added a custom pixel font and made the default colors look better:
                  alt text

                  cyperghostC 1 Reply Last reply Reply Quote 2
                  • cyperghostC
                    cyperghost @madmodder123
                    last edited by

                    @madmodder123 That looks really good ;) I think that is a good mod for the ODROID and OGST case owner

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

                      I think I got the OGST case code all finalized, i'll do some testing to make sure everything still works on the Pi and possibly release the code later this week.
                      Also i'm still having problems trying to write images to the framebuffer for the ODROID and other linux systems (basically what pngview does for the Pi). If anyone wants to help I would appreciate it :)

                      1 Reply Last reply Reply Quote 0
                      • C
                        Cascote
                        last edited by

                        Hi all, sorry to revive this old post. I currently using this beautiful py script but I'm having an issue, music speed is slowed down, some songs more than others. What could that be?

                        C 1 Reply Last reply Reply Quote 0
                        • C
                          Cascote @Cascote
                          last edited by

                          @Cascote
                          Solved: The issue lies on the Sample rate of the Mp3 file. It seems that Pygame is not able to correctly play anything that's not on 44100Hz Rate, so I Resampled the mp3s that were not on that rate using Audacity

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

                          I click a game, the video loading screen kicks in and the music fades out.
                          Black screen appears to load the game, but the music kicks in for 1 second and fades out, then the game loads.
                          is there a fix for this. Thank you

                          I know, I know, you have probably solved this or not interested on it anymore, but for whomever needs it, I had this issue too, I solved it by adding the following lines at the end of the runcommands scripts:
                          runcommand-onend.sh

                          pkill -CONT python
                          

                          runcommand-onstart.sh

                          sleep 1
                          pkill -STOP python
                          
                          
                          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.