RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    [SCRIPT] RetroPie Convert Videos

    Scheduled Pinned Locked Moved Projects and Themes
    conversionomxscriptvideoyuv
    133 Posts 29 Posters 38.0k 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.
    • mituM
      mitu Global Moderator
      last edited by

      Great progress. Btw, you commented the actual conversion line in the convert_video function (the one that runs avconv), so I'm not sure that conversion would work.

      hiulitH 1 Reply Last reply Reply Quote 1
      • hiulitH
        hiulit @mitu
        last edited by hiulit

        @mitu Thanks! Yeah, now it's in utils/progress-bar.sh ;)

        My little contributions to the RetroPie project:

        • Shell-Script-Boilerplate
        • Fun-Facts-Splashscreens
        • Limit-Last-Played-Games
        1 Reply Last reply Reply Quote 0
        • M
          Menion
          last edited by

          Hi all
          first thank you for all the effort put in the script. I have a question: the script is still targetting Retropie host? Because I think that a lot of users have ROMs on a dedicated NAS, so it would be perfect if the script can run on a generic host.
          In the end it needs to know only the ROMs root folder and little else
          Bye

          hiulitH 1 Reply Last reply Reply Quote 1
          • hiulitH
            hiulit @Menion
            last edited by hiulit

            @Menion Yes, right now it still targets only RetroPie in a Raspberry Pi, but I have in mind adding a parameter to set the path to the ROMS directory.
            About running on a host machine, once this new parameter is added, it should just be a matter of where do you launch the script from, right? As long as it's a Linux machine.

            Also, I'm not an expert on video conversion, bitrates, etc. so I don't know if the actual ffmpeg/avconv command is the best one. That could be improved I guess.

            I looked at your code and there quite a few changes that I can't test because I don't have a VAAPI compatible GPU. So maybe the right think would be for you to wait until I add this new "add your own ROMS path" parameter, then merge your code with mine (or take mine, because there are many changes and recode it with your VAAPI changes), see if it works and if it does, then we can talk more about adding your changes to the my repository :)

            My little contributions to the RetroPie project:

            • Shell-Script-Boilerplate
            • Fun-Facts-Splashscreens
            • Limit-Last-Played-Games
            1 Reply Last reply Reply Quote 0
            • hiulitH
              hiulit
              last edited by

              Already a new version! RetroPie Convert Videos v2.1.0.

              [2.1.0] - 2019-04-17

              Added

              • New option --path to set the path to the ROMs folder. By default it's /home/pi/RetroPie/roms.
              • Warning dialog when using the --convert-all option saying that it can take a lot of time to convert all the videos.
              • Better detection of dependencies.
              • Better error outputs.

              I've updated the first post with the new documentation :)

              My little contributions to the RetroPie project:

              • Shell-Script-Boilerplate
              • Fun-Facts-Splashscreens
              • Limit-Last-Played-Games
              1 Reply Last reply Reply Quote 0
              • O
                ObscureUsername
                last edited by ObscureUsername

                Hi,
                I'm having trouble getting this to work, any idea what I'm doing wrong? I'm trying to convert videos I've downloaded via sksyscraper that don't play due to using yuv444p.

                If I run

                ./retropie-convert-videos.sh --convert-systems "fba"

                ... it says ...

                "Starting video conversion ..."
                *.mp4 --> Can't convert! Doesn't use the Color Encoding System (C.E.S set in 'from_ces': 'yuv444p'.
                1 video was unsuccessful

                ...it only takes a few seconds for this to run so I don't think it could've checked every video in that time (there are thousands of them, which is why I only want it to convert yuv444p videos).

                In the config files the following options are set:
                from_ces = "yuv444p"
                to_ces = "yuv420p"
                scraper = "skyscraper"
                roms_path = "" (I've left the roms path blank as I'm using the default folder).

                Any ideas?
                Thanks!

                hiulitH 1 Reply Last reply Reply Quote 0
                • hiulitH
                  hiulit @ObscureUsername
                  last edited by hiulit

                  @ObscureUsername Hi there! From the looks of your log file it seems like it's not getting any video file at all.

                  Are you using ROM folder for gamelists & media option? Here you can see where your downloaded videos should be (expected by the script) when using that option https://retropie.org.uk/docs/Scraper/#where-are-my-scraped-media-and-metadata-saved

                  Also, are the downloaded videos .mp4?

                  My little contributions to the RetroPie project:

                  • Shell-Script-Boilerplate
                  • Fun-Facts-Splashscreens
                  • Limit-Last-Played-Games
                  1 Reply Last reply Reply Quote 0
                  • RionR
                    Rion
                    last edited by

                    @hiulit

                    ./retropie-convert-videos.sh --convert-systems "fba"

                    CLI mode
                    --------
                    
                    Inputted systems: 'fba'.
                    Systems found: 'fba'.
                    
                    Starting video conversion ...
                    
                    fba
                    ---
                    Converting "*.mp4" ... (1/1)
                    (standard_in) 1: syntax error
                    ERROR: '*.mp4' has 0 frames!
                    
                    
                    fba
                    ---
                    > "*.mp4" --> FAILED!
                    
                    
                    1 video failed.
                    
                    

                    I am using skyscraper and i have configured everything correctly i think.

                    FBNeo rom filtering
                    Mame2003 Arcade Bezels
                    Fba Arcade Bezels
                    Fba NeoGeo Bezels

                    hiulitH 1 Reply Last reply Reply Quote 1
                    • hiulitH
                      hiulit @Rion
                      last edited by

                      @Rion Hmmm I'll take a look. It seems it has something to do with the videos path..

                      Did you you Use the ROM folder for gamelists & media option in Lars Muldjord's Skyscraper?
                      Did you set the scraper using the --scraper option? Or via the config file?

                      My little contributions to the RetroPie project:

                      • Shell-Script-Boilerplate
                      • Fun-Facts-Splashscreens
                      • Limit-Last-Played-Games
                      RionR 1 Reply Last reply Reply Quote 0
                      • RionR
                        Rion @hiulit
                        last edited by Rion

                        @hiulit said in [SCRIPT] RetroPie Convert Videos:

                        @Rion Hmmm I'll take a look. It seems it has something to do with the videos path..

                        Did you you Use the ROM folder for gamelists & media option in Lars Muldjord's Skyscraper?
                        Did you set the scraper using the --scraper option? Or via the config file?

                        @hiulit Hi again and sorry for the late reply.

                        I used Use the ROM folder for gamelists & media with Skyscraper and also set the scraper option to skyscraper
                        inside retropie-convert-videos-settings.cfg. But i did get it to work if a moved all my video files from

                        /home/pi/RetroPie/roms/fba/media/videos
                        

                        to

                        /home/pi/RetroPie/roms/fba/media
                        

                        FBNeo rom filtering
                        Mame2003 Arcade Bezels
                        Fba Arcade Bezels
                        Fba NeoGeo Bezels

                        V 1 Reply Last reply Reply Quote 1
                        • D
                          davidonabus
                          last edited by

                          I'm not having much success. It seems like everything is setup correctly, but once it detects a video that is encoded in 444p it still decides not to convert it. Any idea what i might be doing incorrectly?


                          root@retropie:/home/pi/RetroPie-Convert-Videos# ./retropie-convert-videos.sh --convert-systems "arcade"
                          CLI mode

                          Inputted systems: 'arcade'.
                          Systems found: 'arcade'.

                          Starting video conversion ...

                          arcade

                          3in1semi.mp4 --> Can't convert! Doesn't use the Color Encoding System (C.E.S set in 'from_ces': 'yuv444p'.
                          "numanath.mp4" --> Don't convert! Has the same Color Encoding System (C.E.S) as 'from_ces': 'yuv444p'.

                          2 videos were unsuccessful.

                          WeirdHW hiulitH 2 Replies Last reply Reply Quote 1
                          • WeirdHW
                            WeirdH @davidonabus
                            last edited by

                            @davidonabus said in [SCRIPT] RetroPie Convert Videos:

                            3in1semi.mp4 --> Can't convert! Doesn't use the Color Encoding System (C.E.S set in 'from_ces': 'yuv444p'.
                            "numanath.mp4" --> Don't convert! Has the same Color Encoding System (C.E.S) as 'from_ces': 'yuv444p'.

                            2 videos were unsuccessful.

                            That output states those two videos aren't 444. That is why it decides not to process them.

                            T 1 Reply Last reply Reply Quote 1
                            • V
                              Vman41 @Rion
                              last edited by

                              @hiulit I was having this same exact error too and this solution worked for me. Maybe the path you have coded for skyscraper needs to be updated in your script?

                              1 Reply Last reply Reply Quote 1
                              • hiulitH
                                hiulit
                                last edited by

                                Hey y'all! I've followed this little guide https://github.com/RetroPie/RetroPie-Setup/wiki/Scraper#where-are-my-scraped-media-and-metadata-saved to set up the paths to the images and videos for each scraper. In principle the script should work fine. Have those paths changed?

                                My little contributions to the RetroPie project:

                                • Shell-Script-Boilerplate
                                • Fun-Facts-Splashscreens
                                • Limit-Last-Played-Games
                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  memodellocos @hiulit
                                  last edited by

                                  @hiulit For Skyscraper - I got this to work by copying the video files from /home/pi/roms/arcade/media/video to /home/pi/roms/arcade/media.

                                  It wouldn't run otherwise with a few roms_path values I tried.

                                  hiulitH 1 Reply Last reply Reply Quote 1
                                  • hiulitH
                                    hiulit @memodellocos
                                    last edited by

                                    @memodellocos Where does Skyscrapper store the videos?
                                    /home/pi/RetroPie/roms/<system>/media/video or /home/pi/RetroPie/roms/<system>/media
                                    Because I followed this guide https://github.com/RetroPie/RetroPie-Setup/wiki/Scraper#where-are-my-scraped-media-and-metadata-saved to get the paths for the scrapers, and here it says that Skyscraper, when setting the option ROM folder for gamelists & media, should store the videos in /home/pi/RetroPie/roms/<system>/media.
                                    And that's the path I have in my script (I think). Maybe Skyscraper changed the path?

                                    My little contributions to the RetroPie project:

                                    • Shell-Script-Boilerplate
                                    • Fun-Facts-Splashscreens
                                    • Limit-Last-Played-Games
                                    ClydeC 1 Reply Last reply Reply Quote 0
                                    • ClydeC
                                      Clyde @hiulit
                                      last edited by

                                      @hiulit Currently, SS uses subdirectories inside /home/pi/RetroPie/roms/<system>/media/ for the different kinds of content. Videos go into /home/pi/RetroPie/roms/<system>/media/videos/ by default.

                                      hiulitH 1 Reply Last reply Reply Quote 1
                                      • hiulitH
                                        hiulit @Clyde
                                        last edited by

                                        @Clyde Thanks! Then I'll add it to the script. I'll let you know when I update it :)

                                        My little contributions to the RetroPie project:

                                        • Shell-Script-Boilerplate
                                        • Fun-Facts-Splashscreens
                                        • Limit-Last-Played-Games
                                        1 Reply Last reply Reply Quote 2
                                        • M
                                          memodellocos
                                          last edited by

                                          @Clyde explained it perfectly! Thanks for this script too @hiulit !

                                          hiulitH 1 Reply Last reply Reply Quote 1
                                          • T
                                            toimas @WeirdH
                                            last edited by

                                            @WeirdH No, it actually states that one video matches the 'from'-criteria but does not convert it anyway: "> "centiped-video.mp4" --> Don't convert! Has the same Color Encoding System (C.E.S) as 'from_ces': 'yuv444p'.

                                            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.