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

    [SCRIPT] Batch convert YUV 4:4:4 videos to YUV 4:2:0 in Retropie/Linux

    Scheduled Pinned Locked Moved Help and Support
    omxscriptvideoyuv
    66 Posts 15 Posters 16.7k 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.
    • C
      Colombia20102018
      last edited by

      @clyde no luck.
      I got a command not found message
      34B48344-F66E-48F5-AA86-867467E56B3B.jpeg
      What am I doing wrong? Maybe am I missing other steps not listed? Thanks and sorry for so many questions

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

        @clyde this is the script 625802E3-4F67-4053-87F9-DFF7FFD699C1.jpeg

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

          @clyde not working. I checked that ffmpeg is installed. In step 3 I typed the following:
          5B575CFA-9091-4169-BB0F-827A9EA4D9EC.jpeg
          Then I typed the following:
          6BD18AE3-9BC0-4C80-8826-FF9F4D5BA1CA.jpeg
          I checked the file manager and the bin folder and the 444 file are there but there is no converted folder.FF5F02A0-666A-44B4-AF2E-D2A8DA7472E6.jpeg 002BE462-10A5-4F15-8325-B4384488B096.jpeg
          Am I doing something wrong?
          Thanks again

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

            @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>
            
            ClydeC 1 Reply Last reply Reply Quote 2
            • ClydeC
              Clyde @mitu
              last edited by Clyde

              @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. 😉

              C 3 Replies Last reply Reply Quote 1
              • C
                Colombia20102018 @Clyde
                last edited by

                @clyde @mitu after trying what mitu suggested the script ran. 😊 Now this is the message that I am getting when trying to move the files to the original. How can I fix it? Thank youBF424580-947A-4DAB-84BB-A7BBD9CDAB7B.jpeg

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

                  @clyde @mitu after entering the complete path /home/pi/RetroPie/... it worked. Awesome. You are fantastic and I owe you big time. Thank you very much 🙏🏻

                  1 Reply Last reply Reply Quote 1
                  • C
                    Colombia20102018 @Clyde
                    last edited by

                    @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

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

                      @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 ?

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

                        @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

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

                          @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.

                          C 2 Replies Last reply Reply Quote 0
                          • C
                            Colombia20102018 @mitu
                            last edited by

                            @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

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

                              @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.

                              1 Reply Last reply Reply Quote 0
                              • ClydeC
                                Clyde
                                last edited by

                                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
                                
                                thelostsoulT C 2 Replies Last reply Reply Quote 0
                                • thelostsoulT
                                  thelostsoul @Clyde
                                  last edited by

                                  @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".

                                  📜 RE/SET: 100 SNES Games for your RetroPie, 🎁 Share your hidden gems and insider tips

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

                                    @clyde hello, let me start by saying that your script is awesome. You are probably right and I might have changed something accidentally. I used the mv correctly and everything was working fine for several days. Both the image and the converted files folders just disappeared and most likely it is totally unrelated to the script. I am just pointing out that this only happened to the system I used the script for. It could just be a coincide. My theory is that after added a few new roms via USB something crashed.

                                    I have a copy all the images in the downloaded_media folders. The question that I have is if there is a way to paste all the video paths all at once?

                                    Thank you

                                    ClydeC 1 Reply Last reply Reply Quote 0
                                    • ClydeC
                                      Clyde @Colombia20102018
                                      last edited by

                                      @colombia20102018 said in [SCRIPT] Batch convert YUV 4:4:4 videos to YUV 4:2:0 in Retropie/Linux:

                                      The question that I have is if there is a way to paste all the video paths all at once?

                                      Sorry, I somehow missed your question back then. If it's still valid, please elaborate a bit more what you want to do exactly.

                                      1 Reply Last reply Reply Quote 0
                                      • LolonoisL Lolonois referenced this topic on
                                      • hiulitH hiulit referenced this topic on
                                      • mrmadcatzM
                                        mrmadcatz
                                        last edited by

                                        Hey! I just wanted to say thank you so much for this. Super helpful and worked right away compared to a few other scripts that supposedly should do the same thing. This fixed all my issues. You rock!

                                        1 Reply Last reply Reply Quote 0
                                        • C CARRisma referenced this topic on
                                        • C
                                          CARRisma
                                          last edited by CARRisma

                                          I've created post on how to convert these vids in Windows:

                                          https://retropie.org.uk/forum/topic/35722/video-preview-fix-conversion-yuv444p-to-yuv420p

                                          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.