[SCRIPT] Batch convert YUV 4:4:4 videos to YUV 4:2:0 in Retropie/Linux
-
@colombia20102018 Sorry, I forgot to mention: You can exit nano with
Ctrl+X
,y
andEnter
.What do you mean by "nothing happened"? Was there any output?
-
@clyde do I need to do steps 5 and 6 inside nano? How do I run the script? What do I type before the 444?
Thank you for explaining how to exit nano -
@clyde so I exited nano with control X, Y, enter and brought me back to this screen (attached). Typed the commands and got a permission denied message. What am I doing wrong? Thanks![alt text]![0_1609095494357_C42C9958-F56C-45D4-A6E7-234319F75DDC.jpeg](Uploading 100%)
-
@clyde when do I exit nano? After step 4? Could please go into more detail? Where do I run the script and how do I run it? Sorry for so many questions and posts but I just donβt know.
-
@colombia20102018 The steps are sequential, so you exit nano as the conclusion of step three. And you shouldn't enter the command of step 4 until you leave nano.
Just to be sure: You'll have to enter or copy & paste the text of my script into the file in nano.
As for the permission error, I guess the
chmod
command didn't work (maybe because you entered it in nano), and thus, the file isn't executable yet. Try to enter it after leaving nano.If that doesn't fix the problem, please tell me every step you took and every command you entered. Also, please show me the output of this command:
ls -l /home/pi/bin/444p-to-420p.sh
Besides, you don't have to use the full path to invoke the script if it is located in
/home/pi/bin
, as this directory is one of the directories the system is looking for entered commands and scripts. A simple444p-to-420p.sh
from any directory should suffice. But that also doesn't explain the permission error.Thanks for pointing out the missing details in my instructions. I elaborated step 3 + 4 in my post above accordingly:
- Create the script file with
nano ~/bin/444p-to-420p.sh
, enter or paste the script's text, and exit nano by pressingCtrl+x
,y
, andEnter
one after another. - Back in the command line, make the script executable with
chmod u+x ~/bin/444p-to-420p.sh
- Create the script file with
-
@clyde no luck.
I got a command not found message
What am I doing wrong? Maybe am I missing other steps not listed? Thanks and sorry for so many questions -
@clyde this is the script
-
@clyde not working. I checked that ffmpeg is installed. In step 3 I typed the following:
Then I typed the following:
I checked the file manager and the bin folder and the 444 file are there but there is no converted folder.
Am I doing something wrong?
Thanks again -
@colombia20102018 said in [SCRIPT] Batch convert YUV 4:4:4 videos to YUV 4:2:0 in Retropie/Linux:
Am I doing something wrong?
Is
/home/pi/bin
in your$PATH
? If not, then run the script using the full path:/home/pi/bin/444p-to-420p.sh <other_arguments_here>
-
@mitu Good point. On my RetroPie 4.7 that I originally installed from the 4.6 image this spring,
~/bin
is added to the path by the user's~/.profile
at every login if the directory exists, so I automatically expected that it will do so in every RetroPie installation. Do you know if this is still part of the current RetroPie image?@Colombia20102018 As implied above, you may have to either relogin or enter the command
source ~/.profile
to let~/bin
be included in the system's $PATH variable with the list of directories to look at for entered commands. If it still doesn't work with just the name of the script, just follow @mitu's advice and invoke it with its path:/home/pi/bin/444p-to-420p.sh
or
~/bin/444p-to-420p.sh
or even
$HOME/bin/444p-to-420p.sh
as $HOME is another system variable. It contains the path to the current user's home directory. You see, there are many ways to get home in Linux. π
-
-
-
@clyde @mitu hello. I am having an issue with this. Everything seems to work for a few days but after the image folder inside the rom folder dissapears. This is the second time it happens. Now it is affecting the MAME files. I found a copy of the data on home/pi/.emulationstation/downloaded_media/mame-libretro/. I created a new image folder inside the mame-libretro roms folder and pasted the data. Then I rebooted but nothing happened. While on emulation station, I went and manually typed the path for a game using the emulationstation/downloaded_media/mame-libretro/.... I did nothing. Then I tried the same but this time using the /home/pi/RetroPie/roms/mame-libretro/images/gamename.mp4 and it worked for that specific game.
Is there a way to tell the pi to pull the data from these folders for all games without having to do one at a time? Thanks
-
@colombia20102018 said in [SCRIPT] Batch convert YUV 4:4:4 videos to YUV 4:2:0 in Retropie/Linux:
Everything seems to work for a few days but after the image folder inside the rom folder disappears...
How are you scraping the videos ? The path to the video/images is created and maintained by the scraper. Did you change the options for the scraper where and changed where the files are stored ?
-
@mitu I use Skyscrapper to scrape. I have not touched any settings to my knowledge. I added a few roms today. I did the same with other systems and had no issues. For MAME though all the video paths were gone. Today (after the video snaps were gone) I tried screenscraper from the emulationstation and it showed only images. Then after exiting the emulationstation I tried Skyscrapper again. It seemed to go over the games but did not scrape them again. How can I fix it? Thanks
-
@colombia20102018 Skyscraper can use the roms folder to store the artwork download for a system. The location can be changed from the options - see this page. I'm not aware of Skyscraper removing any folders - are you sure you haven't removed the folder yourself ?
For the scraping issues - please open a new topic and post the details.
-
@mitu hello. Thanks for the page. I understand it better now. Based on this how do I change where Skyscraper is pulling the information from? Where do I go and how do I apply this to all roms? The page does not go over this. Thank you
-
@mitu I see now that you would like me to open a new topic. As I said it this is only affecting the folders where this script was used. It is not affecting any other folders. I will make a new post for scrapping issues.
-
My script doesn't remove anything. On the contrary, it does use the subfolder
converted
to keep the original videos unchanged. The user has to replace the originals with the converted ones after the process.Frankly, since you had some problems to follow and understand the instructions given by me and mitu before, I guess that you did somehow remove the images directory by yourself. But this is difficult to determine retrospectively.
One possibility is that you used the
mv
(move) command I provided before wrongly, and moved your images directory somewhere else. You could try to find it using this command:find -name images
-
@clyde For troubleshooting I want to add following:
history | grep images
history
are all commands you have used in the near past.grep
is a command to filter out and find all commands with the word "images" in it. This way you can see if you have used any command associated with "images".
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.