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

    RetroPie - Convert Non-Functional videos to functional videos - Easy free batch method on Windows - also size reducer

    Scheduled Pinned Locked Moved Projects and Themes
    video convertvideo scraping
    10 Posts 2 Posters 2.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.
    • DTEAMD
      DTEAM
      last edited by DTEAM

      Here is a simple method to convert non-working videos on RetroPie to functional videos

      1 - Download ffmpeg

      2 - Follow the instructions from this link but use my command lines instead of his in the batch.bat file.

      for %%a in ("*.mp4") do ffmpeg -i "%%a" -pix_fmt yuv420p -crf 30 -vcodec libx264 -acodec aac "newfiles\%%~na.mp4"
      pause
      

      You can modulate the bit rate adding -crf xx (xx = 20 to 30 where 20 = better quality )

      You can also use it as a video file size reducer

      that's it !! Easy and fast

      DTEAMD 1 Reply Last reply Reply Quote 3
      • DTEAMD
        DTEAM @DTEAM
        last edited by DTEAM

        @dteam

        To convert your personal Pi .mkv recorded videos to .MP4 files, create a new .bat file (00 -mkv to mp4.bat) and use this command line:

        for %%a in ("*.mkv") do 01-ffmpeg -i "%%a" -pix_fmt yuv420p -crf 30 -vcodec libx264 -acodec aac "newfiles\%%~na.mp4"
        pause
        
        GreenHawk84G 1 Reply Last reply Reply Quote 1
        • GreenHawk84G
          GreenHawk84 @DTEAM
          last edited by

          @dteam it looks like there are a few options to download, source code, PGP signing key, packages and executable (which lead to more options).

          DTEAMD 1 Reply Last reply Reply Quote 0
          • DTEAMD
            DTEAM @GreenHawk84
            last edited by DTEAM

            @greenhawk84
            Your main folder should look like this
            Capture.PNG

            I created the 2 .bat files with the command lines above and the "newfiles" folder.

            You need the fullbuild . Mine is ffmpeg-2021-03-09-git-c35e456f54-full_build but take the last version.

            Go here : https://www.gyan.dev/ffmpeg/builds/

            release section ---> Version 4 , 4 (first link) . Copy ffmpeg.exe from your bin folder in your main folder.
            Doubleclick on desired .bat file with your videos in your main folder. Your new videos will be in your "newfiles" folder.

            GreenHawk84G 2 Replies Last reply Reply Quote 0
            • GreenHawk84G
              GreenHawk84 @DTEAM
              last edited by

              @dteam so I have the batch.bat file and I start it, it says "press any key" so I did and then it disappears.

              1 Reply Last reply Reply Quote 0
              • GreenHawk84G
                GreenHawk84 @DTEAM
                last edited by

                @dteam f800f141-5ed8-42e9-84dd-9a8af068ce76-image.png
                03ebc0f8-b79e-4576-97c1-2ad33861a3ca-image.png

                DTEAMD 1 Reply Last reply Reply Quote 0
                • DTEAMD
                  DTEAM @GreenHawk84
                  last edited by DTEAM

                  @greenhawk84
                  Go in your newfiles folder. Your new videos should be there

                  In your case, use batch.bat = mine (renamed) ---> 00 -batch264.bat

                  for %%a in ("*.mp4") do ffmpeg -i "%%a" -pix_fmt yuv420p -crf 30 -vcodec libx264 -acodec aac "newfiles\%%~na.mp4"
                  pause
                  

                  00 -mkv to mp4.bat is for your personnal videos on RetroPie
                  NEW EDIT
                  Don't forget to copy ffmpeg.exe from your bin folder to your main folder.

                  GreenHawk84G 1 Reply Last reply Reply Quote 0
                  • GreenHawk84G
                    GreenHawk84 @DTEAM
                    last edited by

                    @dteam okay great, this works now. Perfect, I can use this tool whenever there are bunk videosnaps out there. Very much appreciated!

                    DTEAMD 1 Reply Last reply Reply Quote 1
                    • DTEAMD
                      DTEAM @GreenHawk84
                      last edited by DTEAM

                      @greenhawk84
                      Try with the videos from the entire MAME romset. You will have a great surprise 😉

                      1 Reply Last reply Reply Quote 0
                      • DTEAMD
                        DTEAM
                        last edited by DTEAM

                        You can also shrink your Daphne .m2v video files with

                        for %%a in ("*.m2v") do 01-ffmpeg -i "%%a" -crf 30 -vcodec mpeg1video -acodec copy "newfiles\%%~na.m2v"
                        pause
                        

                        Before
                        abelt.m2v = 460 MB
                        After
                        abelt.m2v = 67.4 MB

                        I named It 00 -m2v to m2v .bat

                        1 Reply Last reply Reply Quote 0
                        • F Folly referenced this topic on
                        • DTEAMD DTEAM referenced this topic on
                        • K kidracer referenced this topic on
                        • 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.