• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Different process with video screensaver

Scheduled Pinned Locked Moved Help and Support
video screensavomx player
18 Posts 2 Posters 2.4k 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.
  • R
    rasp_renegade
    last edited by 3 Nov 2021, 03:11

    Ive used this video with success on older builds of retropie v3, but this link seems to be outdated ->

    Is there a new process needed on the v4?

    1 Reply Last reply Reply Quote 0
    • S
      sleve_mcdichael
      last edited by sleve_mcdichael 11 Mar 2021, 03:38 3 Nov 2021, 03:37

      Go to the ui settings > screensaver settings menu and select screensaver behavior > random video? Yeah that's still how you do it.

      Why do you think it's outdated? You have to have the videos before it'll work, of course. I use Skyscraper which can be installed from the optional packages section in RetroPie-Setup.

      R 1 Reply Last reply 8 Dec 2021, 22:28 Reply Quote 0
      • R
        rasp_renegade @sleve_mcdichael
        last edited by 8 Dec 2021, 22:28

        @sleve_mcdichael

        I took the same steps as with others build I got this to work on, including that setting. I do recall something special needed with OMX player, does that ring any bells?

        S 1 Reply Last reply 9 Dec 2021, 00:44 Reply Quote 0
        • S
          sleve_mcdichael @rasp_renegade
          last edited by sleve_mcdichael 12 Sept 2021, 00:45 9 Dec 2021, 00:44

          @rasp_renegade if it's not working with OMX (or without,) it's worth toggling it on or off to see if that helps.

          Also it's in two places, one in ui settings > screensaver settings > video screensaver settings and one just in other settings. The one in "screensaver" is, of course, for the video screensaver. The "other" one is for in the gamelists. They can either or both use OMX separately.

          I think it is generally recommended to have it ON in gamelists, unless that causes any issues that are fixed by turning it off. In the screensaver, if you want captions enabled (displays the game and system name under the video) then that only works if OMX is OFF in the screensaver settings menu.

          R 1 Reply Last reply 9 Dec 2021, 20:59 Reply Quote 0
          • R
            rasp_renegade @sleve_mcdichael
            last edited by 9 Dec 2021, 20:59

            @sleve_mcdichael
            It was the setting in the Other Settings section I was thinking of, but that made no difference. I tried on and off using every combination. I also verified the .MP4s were in the correct directory as well as the videos played outside of emulationstation. .MP4 is selected in the file types. I have two Pis I cannot get this to work on (3 and 4).

            S 1 Reply Last reply 9 Dec 2021, 23:05 Reply Quote 0
            • S
              sleve_mcdichael @rasp_renegade
              last edited by sleve_mcdichael 12 Sept 2021, 23:08 9 Dec 2021, 23:05

              @rasp_renegade said in Different process with video screensaver:

              @sleve_mcdichael
              I also verified the .MP4s were in the correct directory as well as the videos played outside of emulationstation. .MP4 is selected in the file types. I have two Pis I cannot get this to work on (3 and 4).

              I bet your videos are in yuv444p format, which will not work in EmulationStation for...reasons. I don't actually know what the problem is, but I might know how to fix it.

              First, install ffmpeg with:

              sudo apt update && sudo apt install -y ffmpeg
              

              Probe one of the non-working videos with ffprobe:

              ffprobe "<path/to>/file.mp4" 2>&1 | grep yuv
              

              (Replace " <path/to>/file.mp4" with the actual path to your video file, i.e. ffprobe "~/.emulationstation/downloaded_media/arcade/videos/1941.mp4" 2>&1 | grep yuv)

              Output will look like:

              Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 360x480 [SAR 1:1 DAR 3:4], 824 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

              See where it says yuv420p. If yours says 444p instead of 420, that's bad.

              Copy this text into a script and make it executable. Put it in your system path (/usr/local/bin) so it can be called globally. Call it from your media folder(s):

              #! /bin/bash
              # Script provided by Clyde
              
              mkdir -p converted    # create the folder "converted" if it doesn't exist
              for f in *.mp4        # process all videos in the current directory
                do
                  echo "$(pwd)/$f"  # show the processed file's name
                  c=$(ffprobe "$f" 2>&1 | grep -c yuv444p)  # (-c)ount no. of "444p"
              
                  if [ "$c" -gt 0 ]                         # if 444p is present,
                    then                                    # convert to 420p
                      ffmpeg -i "$f" -y -pix_fmt yuv420p -strict experimental converted/"$f"
                  fi
              done
              

              Converted videos will be saved to a converted subfolder. Move them up one level into the original folder, to use them.

              Repeat for each system's video folder.

              R 1 Reply Last reply 10 Dec 2021, 06:57 Reply Quote 0
              • R
                rasp_renegade @sleve_mcdichael
                last edited by rasp_renegade 12 Oct 2021, 06:58 10 Dec 2021, 06:57

                @sleve_mcdichael

                Right you are! It was 444. I get access denied trying to put the .SH file in /usr/local/bin (WinSCP). How do I go around that?

                Secondly, I am not sure what you meant by, call it from your media folders.

                S 1 Reply Last reply 10 Dec 2021, 20:24 Reply Quote 0
                • S
                  sleve_mcdichael @rasp_renegade
                  last edited by sleve_mcdichael 12 Oct 2021, 22:22 10 Dec 2021, 20:24

                  @rasp_renegade said in Different process with video screensaver:

                  @sleve_mcdichael

                  Right you are! It was 444. I get access denied trying to put the .SH file in /usr/local/bin (WinSCP). How do I go around that?

                  That's a root ("administrator") folder so you need root access. I'm not familiar with WinSCP, but if you can't figure out root access there, then I would just drop it in /home/pi and finish up with SSH (or if you have a spare USB keyboard, you can plug it into the Pi and press F4 to exit EmulationStation and access the terminal.)

                  Win10 has an SSH client built-in. Just use the search bar and type:

                  ssh pi@retropie.local
                  

                  (The password is "raspberry" if you haven't changed it.)

                  If this is your first time connecting over SSH (from/to this particular pair) then you may be presented with a "certificate." Accept the certificate.

                  At the command prompt (it will look like "pi@retropie: ~ $"), you should first set the executable flag on the file:

                  chmod +x "/home/pi/ScriptName.sh"
                  

                  (Replace "ScriptName.sh" with whatever filename you chose. It's dirty practice to put spaces in filenames, but I wrapped the path in quotes just to be safe.)

                  Then, you can try to move the file with the mv command:

                  mv "/home/pi/ScriptName.sh" /usr/local/bin
                  

                  ...but you'll get the same "permission denied" error. So instead, preface that with sudo ("Super User DO"):

                  sudo mv "/home/pi/ScriptName.sh" /usr/local/bin
                  

                  You wont receive any confirmation if it's successful; you will receive an error message if it fails.

                  Secondly, I am not sure what you meant by, call it from your media folders.

                  Just cd into the media folder and then type "ScriptName.sh":

                  cd /home/pi/.emulationstation/downloaded_media/snes/videos
                  "ScriptName.sh"
                  

                  Since the script file exists in the system path and is executable and starts with #! /bin/bash, just typing its name from anywhere in the filesystem is enough to run the commands contained within it.

                  These commands will test every MP4 file in the current folder, and convert only the ones that are necessary.

                  The existing files aren't overwritten, new converted files are saved to a converted folder. To use the new files (overwriting the old ones; back them up first if you want), cd into the converted folder and move them one level up:

                  cd converted
                  mv *.mp4 ..
                  

                  This only converted your SNES videos. You'll need to repeat this for NES, Megadrive, Arcade, etc:

                  cd /home/pi/.emulationstation/downloaded_media/nes/videos
                  "ScriptName.sh"
                  cd converted
                  mv *.mp4 ..
                  cd /home/pi/.emulationstation/downloaded_media/megadrive/videos
                  "ScriptName.sh"
                  cd converted
                  mv *.mp4 ..
                  cd /home/pi/.emulationstation/downloaded_media/arcade/videos
                  "ScriptName.sh"
                  cd converted
                  mv *.mp4 ..
                  

                  ...etc.

                  Don't forget to install the ffmpeg package, or the script won't do much when you do run it:

                  sudo apt update && sudo apt -y install ffmpeg
                  
                  R 1 Reply Last reply 11 Dec 2021, 23:45 Reply Quote 0
                  • R
                    rasp_renegade @sleve_mcdichael
                    last edited by rasp_renegade 12 Dec 2021, 00:46 11 Dec 2021, 23:45

                    @sleve_mcdichael

                    Pretty cool how easy that makes it. Something is not right though. I followed all the steps above.

                    -I have all media in a single directory /home/pi/.emulationstation/slideshow
                    -When I run the script in that directory, I see the shell output scrolling through every game
                    -A folder named "converted" can be found in the shell, but there is no content there running "ls". (Folder is not showing in WinSCP at all)

                    1 Reply Last reply Reply Quote 0
                    • S
                      sleve_mcdichael
                      last edited by 12 Dec 2021, 05:39

                      @rasp_renegade said in Different process with video screensaver:

                      -I have all media in a single directory /home/pi/.emulationstation/slideshow
                      -When I run the script in that directory, I see the shell output scrolling through every game
                      -A folder named "converted" can be found in the shell, but there is no content there running "ls". (Folder is not showing in WinSCP at all)

                      Test: does it work on this file? It's working on my end: https://www.progettosnaps.net/videosnaps/mp4/frogger.mp4

                      R 1 Reply Last reply 12 Dec 2021, 06:41 Reply Quote 0
                      • R
                        rasp_renegade @sleve_mcdichael
                        last edited by 12 Dec 2021, 06:41

                        @sleve_mcdichael

                        No that Frogger snap did not work, I do have one single video that works. I compared properties of the other files. See screenshot attached for comparison. World Games is the only one out of the many videos I have in the media directory that is working. Screenshot 2021-12-11 223334.png Frogger is the same copy you shared

                        I could backtrack to see where i got the world games video snap and look for others, but I found media packs at arcade punks and they include everything in the video selection! Id like to use this if possible.

                        S 1 Reply Last reply 12 Dec 2021, 07:14 Reply Quote 0
                        • S
                          sleve_mcdichael @rasp_renegade
                          last edited by sleve_mcdichael 12 Dec 2021, 07:15 12 Dec 2021, 07:14

                          @rasp_renegade clarification: you mean "works" as "plays in emulationstation" or as in "is converted by the script"?

                          That Frogger video won't play in ES, it's in the 444p format. I meant you should test it with the script, and see if it converts. Want to make sure you have that part right. I tested on my end, copy-pasting the text from my forum post into the script, placing it in my system path, and it did properly convert to the correct 420p format.

                          If it doesn't work on your end, something went wrong. If that video does convert, then we'll look at why the rest of yours aren't.

                          R 1 Reply Last reply 15 Dec 2021, 03:58 Reply Quote 0
                          • R
                            rasp_renegade @sleve_mcdichael
                            last edited by rasp_renegade 15 Dec 2021, 03:58

                            @sleve_mcdichael

                            The script is working, but I have no idea where the converted files are going. A folder named "converted" is created, but no content inside. How can I check?

                            I found a swell program called HandBrake that converts these to a supported format. I doubled the frame rate in the settings. This works great, but id much rather be able to bash this!

                            S 1 Reply Last reply 15 Dec 2021, 06:02 Reply Quote 0
                            • S
                              sleve_mcdichael @rasp_renegade
                              last edited by 15 Dec 2021, 06:02

                              @rasp_renegade

                              but I have no idea where the converted files are going. A folder named "converted" is created, but no content inside. How can I check?

                              You could try a find if they're still named right:

                              sudo find / -name frogger.mp4
                              

                              But I have a feeling the script didn't copy correctly; if it's not using the right folder, who knows if it's using the right name.
                              To rule out copy-paste errors, does your script file have a crc32 of 8a51563a?

                              R 1 Reply Last reply 16 Dec 2021, 07:55 Reply Quote 0
                              • R
                                rasp_renegade @sleve_mcdichael
                                last edited by rasp_renegade 16 Dec 2021, 07:55

                                @sleve_mcdichael

                                No files were found running that command.
                                See image for script content
                                vidconv.png

                                R S 2 Replies Last reply 19 Dec 2021, 00:26 Reply Quote 0
                                • R
                                  rasp_renegade @rasp_renegade
                                  last edited by 19 Dec 2021, 00:26

                                  @sleve_mcdichael
                                  Any ideas?

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    sleve_mcdichael @rasp_renegade
                                    last edited by 19 Dec 2021, 01:15

                                    @rasp_renegade said in Different process with video screensaver:

                                    @sleve_mcdichael

                                    No files were found running that command.

                                    Wait not even the original one you downloaded?

                                    Any ideas?

                                    Sorry, no. The above works for me on Pi 4, can't say why it's not for you. If you've:

                                    Installed ffmpeg, and

                                    Copied the script correctly, and

                                    Made the script executable, and

                                    Copied it to your system path, and

                                    Your video files are in the yuv444p format (like that frogger one is), and

                                    You run the script from the directory with the videos in it, and

                                    It creates a converted directory but does not create any converted videos in it, then I am stumped, because when I have:

                                    Installed ffmpeg, and copied that script, and made it executable, and put it in my system path, and ran it from the directory with that frogger.mp4 file in, then it creates a converted directory and puts a converted frogger.mp4 file in that directory.

                                    R 1 Reply Last reply 22 Dec 2021, 16:07 Reply Quote 0
                                    • R
                                      rasp_renegade @sleve_mcdichael
                                      last edited by 22 Dec 2021, 16:07

                                      @sleve_mcdichael

                                      Technology hates me so things such as this are my norm. =) Thanks for the help, you presented the actual problem and I will work on the script. I found a site that has all emu movies at the correct bitrate or whatever is off.

                                      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.

                                        [[user:consent.lead]]
                                        [[user:consent.not_received]]