Daniel's Weblog
Posts About
Tags Colophon

Tags / Gopro

GoPro Manual File Recovery I’ve never actually used any of the labs firmware but I found this tidbit interesting for repairing an improperly closed file. Reproduced here for posterity:

# Useful Tip - Manual File Recovery

So you have a corrupted/unclosed GoPro file. You crashed your drone, and the battery was disconnected before the file was closed, or you ran your car wheel over a recording GoPro, crushing it. If your SD Card survived, the file is likely recoverable using another GoPro.

0. You need any working GoPro camera, although the same model and firmware version is advised. If you’re using Labs Firmware and are using Altered file naming (this page’s Labs feature), reset the filenaming to the default.
1. Copy the file you want to repair to your PC
2. With a working GoPro, record for 10+ seconds then pull the power or battery, while still recording. You want an intentionally unclosed file. The camera will remember it needs to repair only this file
3. Add that SD Card to your PC directly (not via camera USB)
4. Copy the filename of the last MP4 captured. e.g. “GX010358.MP4”
5. Delete this dummy file from the SD Card
6. Add your previous corrupted (unclosed) file to the SD card, and rename it to the copied name. e.g. If your filename was “Drone03_GX010201.MP4”, or just “GH010330.MP4”, rename it to “GX010358.MP4” (your last MP4 filename)
7. Insert the SD Card with your corrupted file back into the working GoPro camera
8. Power on the camera, and the “last” file will be repaired
9. Once the camera completes the file repair process, you can eject the SD Card and backup and play the now repaired file

Compatibility: Labs enabled HERO8, HERO9, HERO10, HERO11, HERO12, HERO13, MAX and BONES

Lossless Cut. When I have an hour of video and I need to extract 5 minutes I reach for Lossless Cut instead of Final Cut. It’s a cross platform GUI built on top of ffmpeg. It can merge clips from the same camera in to a single file and extract pieces of a file, both without reencoding. It compliments the commands documented here. I like that I can watch through a video, mark multiple sections for export, and then export them all at once. Since it doesn’t reencode the video it’s much faster than using conventional video editing software.

A few caveats:

  • On MacOS it can read a file over SMB without issue but I’ve found trying to write to SMB causes issues. Someone else reported the same issue but it seems like its an SMB implmentation issue and they won’t be fixing that.
  • It often leaves a split second of black frame before and after each extracted clip. Be sure to trim that off before sharing!

My go to commands for processing GoPro footage (or really any video) with ffmpeg:

  1. Merge all mp4 files in to a single file without reencoding:

    This is very useful on computers without powerful GPUs (older computers or in my case my Synology NAS)!

ffmpeg -f concat -safe 0 -i <(for f in GX*.MP4; do echo "file '$PWD/$f'"; done) -c copy output.mp4
  1. Compress:
for i in GX*.MP4; do ffmpeg -i "$i" -c:a copy -c:v h264 -crf 22 "${i%.}_lowres.mp4"; done
  1. Extract audio from a video file:
ffmpeg -i $1 -vn -acodec copy "${1%.*}.aac"