• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 34.1k 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.
  • A
    AbbaTheHorse @hiulit
    last edited by 30 Jul 2020, 05:20

    @hiulit Wow, thank you! I’ll give that a try ASAP (might be the weekend, as work has gone a bit silly 😔)

    Thank you again!

    1 Reply Last reply Reply Quote 0
    • A
      AbbaTheHorse
      last edited by 2 Aug 2020, 15:34

      @hiulit Hey, just tried the new version and it worked great! Thanks so much again 👍👍

      H 1 Reply Last reply 2 Aug 2020, 16:37 Reply Quote 1
      • H
        hiulit @AbbaTheHorse
        last edited by 2 Aug 2020, 16:37

        @AbbaTheHorse Yay! I'm glad it's working! Everyone can benefit from spaces in folder names now :)

        My little contributions to the RetroPie project:

        • Shell-Script-Boilerplate
        • Fun-Facts-Splashscreens
        • Limit-Last-Played-Games
        C 1 Reply Last reply 2 Aug 2020, 20:02 Reply Quote 0
        • C
          Clyde @hiulit
          last edited by 2 Aug 2020, 20:02

          @hiulit Some hardcore *nix users like a friend of mine like to express the opinion that spaces don't belong into filenames because they are ticking time bombs waiting for the next application that can't process them properly. 😉

          H 1 Reply Last reply 2 Aug 2020, 21:15 Reply Quote 2
          • H
            hiulit @Clyde
            last edited by 2 Aug 2020, 21:15

            @Clyde I'm with you. I don't like them either. But hey, if some user needs something and I can make it work without that much of a hassle, I'll do it :)

            My little contributions to the RetroPie project:

            • Shell-Script-Boilerplate
            • Fun-Facts-Splashscreens
            • Limit-Last-Played-Games
            1 Reply Last reply Reply Quote 4
            • L
              lemonlimefx
              last edited by lemonlimefx 29 Nov 2020, 20:13

              Thanks @hiulit very nice script! However I'm still having some trouble with videos playing. As per the usual it is only with the arcade video previews. I had gone through my list of arcade games scraped with skyscraper that didn't play back and wrote them all down to try and fix. I eventually came across this script online. I used your excellent documentation and setup as follows.

              --from -ces set to "yuv444p"
              --to -ces set to "yuv420p"
              --scraper set to "skyscraper"

              Then I ran the script. Sure enough! it found all the ones I had written down and proceeded to convert them. I thought for sure it would fix the playback problem but, they still don't play :( I've tried playing them back with omx hardware acceleration and without, and neither work.

              Any ideas? I can try to provide more information from the video files, but don't know what to provide. Thanks!

              I'm running a raspberry pi 4, 4GB, on Retropie 4.7.1, with official raspberry pi power supply.

              L 1 Reply Last reply 29 Nov 2020, 20:28 Reply Quote 0
              • L
                lemonlimefx @lemonlimefx
                last edited by 29 Nov 2020, 20:28

                As is so often the case with not reading documentation fully, I had missed the part where the converted files would be in a new folder and have to be manually copied to the original folder and replace the old files. As soon as I did this it worked like a charm. Wow excellent script, much thanks!

                H 1 Reply Last reply 1 Dec 2020, 09:28 Reply Quote 2
                • H
                  hiulit @lemonlimefx
                  last edited by 1 Dec 2020, 09:28

                  @lemonlimefx Thanks! I'm glad you find it useful! :)

                  It's not the first time that someone has had this confusion. I think I'll have to tweak the script to add an option or something to let the user overwrite the old video files, at their own risk.

                  My little contributions to the RetroPie project:

                  • Shell-Script-Boilerplate
                  • Fun-Facts-Splashscreens
                  • Limit-Last-Played-Games
                  C 1 Reply Last reply 28 Dec 2020, 02:11 Reply Quote 1
                  • C
                    Colombia20102018 @hiulit
                    last edited by 28 Dec 2020, 02:11

                    @hiulit hello, is there a step by step video on how to do this? I am new to this and really eager to learn. Thanks

                    H 1 Reply Last reply 28 Dec 2020, 19:33 Reply Quote 1
                    • H
                      hiulit @Colombia20102018
                      last edited by 28 Dec 2020, 19:33

                      @colombia20102018 No, there is not at the moment but I'll try to make one when I have the time :) What are you struggling with? Have you read the documentation? I think is clear enough for a "noobie"

                      My little contributions to the RetroPie project:

                      • Shell-Script-Boilerplate
                      • Fun-Facts-Splashscreens
                      • Limit-Last-Played-Games
                      W 1 Reply Last reply 20 Feb 2021, 21:10 Reply Quote 2
                      • W
                        Wasakawaka @hiulit
                        last edited by 20 Feb 2021, 21:10

                        Hey @hiulit I just wanted to thank you for your handy script.

                        I had a slight issue with the step listed as "--to-ces [OPTIONS]` (mandatory)" where it said to run 'ffmpeg -pix_fmts' and I didn't know what to do here but then I rebooted and the previous command worked for some reason. Lastly I had to manually edit my gameslist.XML files to include the videos for each of the games in order for the videos to show but that's probably just down to me at some point doing something I probably shouldn't have or not doing something I should have :) Works great, thanks again!

                        H 1 Reply Last reply 23 Feb 2021, 19:14 Reply Quote 1
                        • H
                          hiulit @Wasakawaka
                          last edited by 23 Feb 2021, 19:14

                          @wasakawaka Hey, I'm glad you find it useful :)

                          My little contributions to the RetroPie project:

                          • Shell-Script-Boilerplate
                          • Fun-Facts-Splashscreens
                          • Limit-Last-Played-Games
                          1 Reply Last reply Reply Quote 0
                          • D
                            Duel
                            last edited by 1 Dec 2021, 14:32

                            1st of all great script. I converted all my videos with no problems. Question though, I'm getting an error when rebooting RetroPie. Illegal-Mpeg-Header . Here's a picture of the error code. https://www.dropbox.com/s/whgj075huoke8u6/img_20211201_075232.jpg?dl=0. Can you tell me what this means and how to fix it?

                            D 1 Reply Last reply 1 Dec 2021, 16:24 Reply Quote 0
                            • D
                              Duel @Duel
                              last edited by 1 Dec 2021, 16:24

                              @duel said in [SCRIPT] RetroPie Convert Videos:

                              1st of all great script. I converted all my videos with no problems. Question though, I'm getting an error when rebooting RetroPie. Illegal-Mpeg-Header . Here's a picture of the error code. https://www.dropbox.com/s/whgj075huoke8u6/img_20211201_075232.jpg?dl=0. Can you tell me what this means and how to fix it?

                              Nevermind on this error. I've rebooted instead of restarting emulation station and the error went away. Thank you for this script. I've looked everywhere to find a fix for video snaps for MAME to play properly and this was it. Major props.

                              H 1 Reply Last reply 5 Dec 2021, 22:02 Reply Quote 1
                              • H
                                hiulit @Duel
                                last edited by 5 Dec 2021, 22:02

                                @duel Hey, I'm glad you find it useful :)

                                My little contributions to the RetroPie project:

                                • Shell-Script-Boilerplate
                                • Fun-Facts-Splashscreens
                                • Limit-Last-Played-Games
                                P 1 Reply Last reply 2 Jun 2023, 16:25 Reply Quote 0
                                • P
                                  pianoman72 @hiulit
                                  last edited by 2 Jun 2023, 16:25

                                  @hiulit Is there a way to force the script to look in a specific video directory? Mine are in /opt/retropie/configs/all/emulationstation/downloaded_images/arcade/

                                  S H 2 Replies Last reply 2 Jun 2023, 16:57 Reply Quote 0
                                  • S
                                    sleve_mcdichael @pianoman72
                                    last edited by sleve_mcdichael 6 Feb 2023, 17:58 2 Jun 2023, 16:57

                                    @pianoman72 said in [SCRIPT] RetroPie Convert Videos:

                                    Is there a way to force the script to look in a specific video directory?

                                    No, it's listed in the prerequisites that you have to use the ROM folder:

                                    Use the ROM folder for gamelists & images option in Steven Selph's Scraper.

                                    Use the ROM folder for gamelists & media option in Lars Muldjord's Skyscraper.

                                    You could use Clyde's original script that this was based off of though; that one operates on a single directory at a time.

                                    P 1 Reply Last reply 5 Jun 2023, 14:12 Reply Quote 1
                                    • P
                                      pianoman72 @sleve_mcdichael
                                      last edited by pianoman72 6 May 2023, 15:13 5 Jun 2023, 14:12

                                      @sleve_mcdichael Thanks
                                      Here is the old script updated to use ffprobe and FFmpeg if it helps anyone

                                      mkdir -p converted                         # create the folder "converted" if it doesn't exist
                                      for f in *-video.mp4                       # process all videos
                                        do
                                          c=$(ffprobe -show_streams $f 2>&1 | grep -c yuv444p) # (-c)ount no. of "444p"
                                      
                                          if [ "$c" -gt 0 ]                      # if 444p is present,
                                            then				   # convert into 420p
                                              ffmpeg -i $f  -y -pix_fmt yuv410p -strict experimental converted/$f
                                          fi
                                      done
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        hiulit @pianoman72
                                        last edited by 13 Jun 2023, 16:44

                                        @pianoman72 I'll take a look to see if it's easy to implement :)

                                        My little contributions to the RetroPie project:

                                        • Shell-Script-Boilerplate
                                        • Fun-Facts-Splashscreens
                                        • Limit-Last-Played-Games
                                        1 Reply Last reply Reply Quote 0
                                        • LolonoisL Lolonois referenced this topic on 22 Aug 2023, 19:42
                                        • LolonoisL
                                          Lolonois
                                          last edited by 1 Dec 2023, 14:57

                                          @hiulit Can you update the links in the OP as they changed over time?

                                          • Steven Selph's Scraper: https://retropie.org.uk/docs/Scraper/#steven-selphs-scraper
                                          • Lars Muldjord's Skyscraper: https://retropie.org.uk/docs/Scraper/#skyscraper

                                          Thanks

                                          H 1 Reply Last reply 19 Dec 2023, 10:08 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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received