Different process with video screensaver
-
@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.
-
@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). -
@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.
-
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.
-
@rasp_renegade said in Different process with video screensaver:
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 theconverted
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
-
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) -
@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
-
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. 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.
-
@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.
-
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!
-
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 acrc32
of8a51563a
? -
No files were found running that command.
See image for script content
-
@sleve_mcdichael
Any ideas? -
@rasp_renegade said in Different process with video screensaver:
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
, andCopied 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), andYou 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 thatfrogger.mp4
file in, then it creates aconverted
directory and puts a convertedfrogger.mp4
file in that directory. -
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.
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.