image
Page 1 of 14 12311 ... LastLast
Results 1 to 10 of 140

Thread: How to repair corrupted MP4 files from a GoPro.....for free!

  1. #1
    FPV Browncoat prelator's Avatar
    Join Date
    Jul 2011
    Location
    Highlands Ranch, Colorado
    Posts
    2,399

    How to repair corrupted MP4 files from a GoPro.....for free!

    Updated 11-17-15: New Link for v1.8:

    Code:
    https://mega.nz/#!CIxBAQoa!ctEJUEd9jfFmyByLmiGO4kv1aYMnEMaFK-OGb47vdTw
    Updated 12/06/2014:
    Have you ever had your GoPro / other HD camera shut off in a crash or hard landing, corrupting your video file? A couple years ago I discovered the Grau GmbH Video Repair Utility, which seems to be the only program in existence which can actually fix corrupted MP4 files. I can personally verify this works on files from a GoPro and Sony Action Cam, and the repair utility's website lists a number of other cameras it should work with as well.

    The program is NOT FREE and they charge an outrageous 29 EURs for 5 repairs and 99 EURs for unlimited repairs. In free mode, the program will only repair 50% of your corrupted video file. Fortunately there are several possible workarounds to this that can trick the program into still repairing your complete video file without paying for the program.
    As of December 2014, I have verified that it is possible to repair 100% of your video file with the latest version of the Grau Video Repair Utility (v. 1.9.0.1). While that version blocks the exploits of using -save 100 in Custom Repair Parameters (see Alternate Method below) and simply doubling the file, I have discovered that TRIPLING the file will still cause the program to recover the full video, plus a little extra where the video loops back and starts over (which you will then have to manually edit out).

    METHOD 1: Increase the File Size

    WINDOWS INSTRUCTIONS

    1.Download the Grau Video Repair Utility: Unzip it to a folder on your PC (no installation required) and run the file gs.exe. There is no need to install the program to your computer.

    Note: The latest version of the utility may have been patched to prevent using this trick, though as of December 2014 I have verified it will work with v1.9.0.1, as long as you triple the video size rather than double it. If that doesn't work for you, both the doubling method and the -save 100 method will work with v1.8.0.0, which you can download here:
    Code:
    https://mega.nz/#!CIxBAQoa!ctEJUEd9jfFmyByLmiGO4kv1aYMnEMaFK-OGb47vdTw
    To get the old version of the program to run, you will have to run it with your computer disconnected from the internet, or else the program will show an error saying there is a new version available, close, and open the Grau website. Alternatively, you can just block the Grauonline website by adding "127.0.0.1 grauonline.de" to your hosts file.
    2. Normally the utility will only repair 50% of the file for free (you have to pay an outrageous 29 EUR for a mere 5 repairs, or 99 EUR for unlimited repairs--probably more than you want to spend just to repair a stinking video file). Fortunately, there is a way to trick the demo version into repairing the full video. It calculates how much it will repair by file size. So....double the file size of the source video, and it will repair the whole thing!

    To do this:
    a. Make a copy of your corrupted video file and put it in the same directory as the original. Rename the two files something simple like "video1.mp4" and "video2.mp4."

    b. Open the Windows command line (run>cmd) and navigate to the folder with the video files using the cd command.

    c. Type "copy/b video1.mp4+video2.mp4" (without the quotes) and hit enter. It will now merge video2 into video1, so video1 will have doubled in file size.

    d. If using version 1.9.0.1 or higher, run the command in step (c) a second time, which will triple the file size instead of doubling it (quadrupling may also work though I haven't tried that).This defeats the bugfix that patched the doubling exploit, since the file is no longer exactly twice the length of the original video. You will however have to manually edit out a portion at the end of the repaired file where the video will loop back and start over at the beginning.
    3. Go back to the repair utility and select the "repair" action. Click the "Choose movie" button and select your merged video file (video1.mp4 in my example). Then click the "Choose reference movie" button and select any other properly functioning raw video file from the same camera to serve as a reference file.

    4. Click the "Scan" button and wait for the utility to repair the file. You should then be able to find the full repaired video in a newly created sub-directory of the source folder called "repaired."

    5. Your video file should now be repaired and will play smoothly up to the moment when your camera quit recording (GoPros will typically lose the last 30 seconds before a crash).

    MAC INSTRUCTIONS

    1. First download the video repair utility here : http://www.grauonline.de/cmsimple2_6...ility#download (you may still need to use an old version just like for Windows)

    2. Unzip the downloaded file (which might be automatic) and double-click the "gs.app" or "gs" included file.

    3. The first time you launch it, you might have a warning message about the app coming from an unidentified developer. This is an OS X security for the first time you launch downloaded applications. To temporarily disable it, go to System Preferences (in the Apple menu), then Security and Confidentiality / General tab.

    Click the locker icon, enter your password, then set authorization for downloaded applications to "from anywhere" (I am actually using it in French, so the English wording might be a bit different).You should now be able to open the gs.app. Once you have done it, put the security setting back to its original setting.

    4. Then use the repair tool (you will need one working video with the same settings as the one you want to repair).

    5. Since the demo version only repairs 50% of the video, you need to double the file size. Here is how to double the file size on a Mac:

    - Open the Terminal app (time Terminal in Spotlight, upper right of your screen)
    - Type "cat " without the quotes. The space is important.
    - Then drag you video to the terminal window. This will input the path to the file plus a space in the Terminal window,
    - Drag the video file to the terminal window a second time.
    - Type "> " in the terminal
    - Drag the video file to the terminal window a third time.
    - Using the left arrow, go before the extension (.MP4 for my GoPro) and type "doubled". This just adds "doubled" to the name of the result file.

    The line in Terminal should look like that, where the actual path can be a lot longer:
    cat /PATH/GOPR0002.MP4 /PATH/GOPR0002.MP4 > /PATH/GOPR0002doubled.MP4

    Press the Return key. If you do not get an error message, you will just have the usual invite in the Terminal after the copy is complete ...and a double-sized file with "doubled" added to its name in the original location :-)

    Note: If using v1.9.0.1 or higher, do the previous step again copying the original video into the doubled file again. The final file should have tripled in size, which defeats bugfix that patched the original doubling exploit. The final file will have some extra footage at the end where the original video loops back and starts over, which you will need to manually edit out.

    ALTERNATE METHOD: Custom Repair Parameters (only works with v1.8.0.0)

    Both Mac and Windows


    1. Go to the Options tab
    2. Under Custom Repair Parameters, type this info:

    -save 100

    3. Now, go back to Repair tab, continue as usual and now you will get 100% repair length (instead of 50%, still in demo mode)

    TROUBLESHOOTING
    If you still have problems getting this to work, try fiddling with different options in the Grau video repair utility.

    I have verified the following settings work with videos from the Sony HDR AS-100v action camera:

    Code:
    Enable entropy scan - ON
    Detect new movie clips - OFF
    Enable AVC1 single mode - OFF
    No CTTS repair - ON
    Enable logging - ON
    Overwrite existing codec information by reference file - ON
    Enable PCM detection - ON
    Enable AAC detection - ON
    Save raw video+audio streams to files - OFF
    Delete existing files in output folder - ON
    Reencode repaired movie files - OFF
    If your final output file is super jittery and has a really low frame rate with the video freezing and hanging constantly, make sure you have the No CTTS Repair option turned on. That was happening to me using v1.8.0.0 with my Sony Action camera, but using the No CTTS Repair option in v1.9.0.1 fixed that.

    If repairing video from an iPhone or other cell phone camera, you may need to turn on the option Enable AVC1 single mode, though that does NOT work with a Sony Action Camera.
    Last edited by prelator; 17th November 2015 at 12:33 PM.
    ~Patrick M.

    YouTube Channel: youtube.com/user/SerithianFPV

    Colorado FPV Pilot and Flying Site Map: mapsengine.google.com/map/edit?mid=zjYlxx5w300I.kmgDGKOhrMAo

  2. #2
    GO HAWKS Hucker's Avatar
    Join Date
    Sep 2011
    Location
    Seattle, WA USA
    Posts
    3,046
    You're a lawyer right?

  3. #3
    Penguins Do Fly! paintz2007's Avatar
    Join Date
    Feb 2011
    Location
    Ohio
    Posts
    2,839
    "the best criminals are cops"

  4. #4
    FPV Browncoat prelator's Avatar
    Join Date
    Jul 2011
    Location
    Highlands Ranch, Colorado
    Posts
    2,399
    Hey, there's nothing illegal about this trick. It's still only decoding half the file. Nothing says you can't just make the file twice as big.
    ~Patrick M.

    YouTube Channel: youtube.com/user/SerithianFPV

    Colorado FPV Pilot and Flying Site Map: mapsengine.google.com/map/edit?mid=zjYlxx5w300I.kmgDGKOhrMAo

  5. #5
    Penguins Do Fly! paintz2007's Avatar
    Join Date
    Feb 2011
    Location
    Ohio
    Posts
    2,839
    remember he went to school to bend the rules and make himself right and you wrong... and does a good job of it too

  6. #6
    FPV Browncoat prelator's Avatar
    Join Date
    Jul 2011
    Location
    Highlands Ranch, Colorado
    Posts
    2,399
    BTW, undermining copyright law is actually my other hobby (actually I advocate for copyright reform, but to the other side it's all the same thing). Just check out my website about copyright issues on YouTube: http://fairusetube.org
    ~Patrick M.

    YouTube Channel: youtube.com/user/SerithianFPV

    Colorado FPV Pilot and Flying Site Map: mapsengine.google.com/map/edit?mid=zjYlxx5w300I.kmgDGKOhrMAo

  7. #7
    The World as We See It Twawsi's Avatar
    Join Date
    Mar 2011
    Location
    Veneto, Italy
    Posts
    898
    This would be great if I could even get any computer to acknowledge the SD card when inserted. Yes, that's how bad my crash was. The card came out intact but with a small dent in the center so I'm not sure if the data is recoverable. Any ideas?

  8. #8
    I Like Waffles... SENTRY's Avatar
    Join Date
    Feb 2011
    Location
    Atlanta, GA
    Posts
    10,837
    works as advertised.
    "I Like Waffles" : FPVLab on Facebook and FPVLab on Twitter

  9. #9
    Penguin flyerDisco buildr mike20sm's Avatar
    Join Date
    Mar 2011
    Location
    California
    Posts
    404
    Does this mean your rig had an unexpected meeting with the ground?

  10. #10
    FFMPEG - free and open, no copyright violations (aka theft) needed.

    e.g. ffmpeg -i 044626.avi -c:a copy -c:v copy 0446262_rescue.avi

    If you use a japan DVR keep a .cmd file handy as it lock up most of the time and corrupts the file.

Page 1 of 14 12311 ... LastLast

Similar Threads

  1. FeiyuTech OSD Log Files to KML!
    By MatCat in forum IFR - Video Link Discussion
    Replies: 1
    Last Post: 3rd June 2012, 08:31 PM
  2. 35Mbps data rate coming to GoPro 2 HD... for FREE !!
    By Ian Davidson in forum IFR - Video Link Discussion
    Replies: 0
    Last Post: 19th April 2012, 02:59 AM
  3. Free IMU (not actually free) But cool project
    By blackley12 in forum ROTORCRAFT
    Replies: 3
    Last Post: 17th April 2012, 12:18 PM
  4. Electronic repair?
    By Blizzard1287 in forum RC TECH
    Replies: 4
    Last Post: 20th August 2011, 10:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •