- AMRT -
Another Media Recovery Tool
AMRT is another media recovery tool, developed to recover videos deleted or lost from a GoPro camera.
I first developed this tool because, like many others, I have faced a bug with my GoPro camera which deleted all my files from the SD Card, telling me that there was no videos or images anymore. That's why I had to find a solution to recover my AWESOME videos taken in Whistler (near Vancouver, Canada) while skiing. Like many others, I tried few applications (like PhotoRec) found on the net and tried to follow the procedures. But the only result was some black videos with no sound...
From this point I tried to understand how the GoPro camera save data on the SD Card. So, after doing a backup of my SD Card, I used the "ALL/format" builtin function to clean the card and did some tests with a new recorded video that helped me to understand the whole process. And then, after few hours and tests, figured out that it basically save the video data first, followed by the video header. This is why, many recovery tools get some videos, but mismatch the video header and the video from the next/previous video, leading to a blank video.
- Usual way to save a video:
- [... VIDEO HEADER ...][... VIDEO AND AUDIO DATA ...]
- With the GoPro camera (and maybe many others video recording cameras):
- [... VIDEO AND AUDIO DATA ...][... UNUSED ALIGNEMENT DATA on 0x8000 bytes ...][... VIDEO HEADER ...]
Recovery process explanation :
- find the occurences of the MP4 signature that can be found by looking for the "ftypmp42"/"ftypavc1" patterns
- get the video header size from the 4 bytes at position 0x20
- get the video data size from the 4 bytes at position (HEADER_SIZE-8)
- depending on your SD Card size, the data are stored/aligned using a 32KB (0x8000 - 32GB cards) or 131KB (0x20000 - 64GB cards) cluster size
- copy the video header and data to the output file
Downloads :
History :
- v0.3 : adds a GUI, recovers JPEG files and fix few bugs
- v0.2 : now written in Java in order to be more flexible, easy to develop and still cross-platform. Tested on GoPro Hero 3 and 3+ cameras with Protune mode enabled/disabled.
- v0.1 : first release of AMRT (written in BASH), tested on a "GoPro Hero 3", with Protune mode enabled (no LRV/THM files)
Features :
- detect media files : MP4/THM/LRV/JPEG
- recover MP4/THM/LRV files from GoPro cameras
- recover JPEG files from GoPro cameras (since v0.3)
Prerequisites to run AMRT :
For all users :
- having at least twice the size of your SD Card (e.g: 32GB * 2) available on your hard disk
- create a directory on your hard disk where you will put AMRT and where you will launch ALL the below commands
For Windows users :
- install "Cygwin" (a collection of tools which provide a Linux look and feel environment for Windows - http://www.cygwin.org/) and add manually the "ddrescue" package, that is not installed by default
- run "cygwin.bat" script from the directory where you installed Cygwin, which will launch a GUI console
- then, go to the directory where you want to recover your media files, by typing "cd " and drag&dropping the directory you have created from Windows Explorer.
For Linux users :
- install "ddrescue" tool from your package manager
- go to the directory where will be stored all the data
You are now ready to start the recovery procedure !
Steps to follow :
Make a full copy of your SD Card :
This step will fully backup the content of your SD Card and allow you to use your camera again, without to fear for your data to be erased. Thanks to this step, you will be sure to keep all the chances on your side to recover your media files with this tool or any others in the future.
Detect where is your SD Card :
Unplug your GoPro camera (or SD Card from your sd reader)
Run the following command under Cygwin :
$ ls -1 /dev/sd*
/dev/sda
/dev/sda1
/dev/sda2
Plug your GoPro camera, wait a few second so that it is detected by the OS, and run again the same command. You should see a new device detected.
$ ls -1 /dev/sd*
/dev/sda
/dev/sda1
/dev/sda2
/dev/sdb
/dev/sdb1 # <--- Your GoPro SD Card
Recover the SD Card on your hard disk, using "ddrescue" tool and the device that you identified in the previous step. This step will take quite a long time because it will copy the whole content of your SD Card on your hard disk.
If the command below gives you some warnings/errors related to some issues to read your SD Card, you can re-run the tool with some commandline options to try again to recover some damaged sectors.
# Don't forget to replace the '/dev/sdb1' string by the one you found in the previous step !!!
$ ddrescue -n /dev/sdb1 sdcard_backup.bin log.txt
- From this step, you can unplug and use your camera again, because its content is saved !!
-
By running AMRT with the below command, it will detect the videos that are on your SD Card and restore them with the "GOPRO_**creation_time**.MP4" (e.g: 'GOPRO_2013_12_27__17_17_31.MP4') filename syntax.
$ java -jar AMRT.jar > amrt_log.txt
Then, just follow the 3 below steps through the GUI :
If you didn't recover all the videos, feel free to try another tool and/or to send me an email to ask for help (by including the "amrt_log.txt" file) :-)