Recovering lost footage from the ACT20 action camera

The ACT20 action camera is a nice and cheap chinese camera. I own one and use it to record my bicycle journeys. However the software included into the camera is a bit unstable, and it happens often that the recording stops, leaving only a TMP file behind, containing the raw data only, unplayable by any media player. I needed the footage badly, so I found a way to recover the video. I took an intact AVI file from the camera and loaded it into wxHexEditor. After some reading about the structure of an AVI file, I found that I could transfer the header onto the TMP file resulting in a broken but maybe still usable AVI file. So I searched for the “movi” tag in the AVI file and remembered the position of the next plus four bytes after the tag:

0x00002280: 00 00 00 00 00 00 00 00 00 00 4c 49 53 54 7c 39 ..........LIST|9 
0x00002290: 28 33 6d 6f 76 69 30 31 77 62 a1 01 00 00 ff fb (3movi01wb......

In my case the result was 8858. So I extracted the header from the AVI file, and concatenated it with the TMP file:

head -c8858 140624-090652.AVI > headerdata
cat headerdata 1F203D26.TMP > 1F203D26.TMP.avi

The resulting AVI file was playable by MPV only, Mplayer or VLC was unable to cope with it. Obviously all length and index data was wrong in the header. I searched for “recover broken avi” and found this:

I applied the mencoder command to my broken AVI file:

mencoder -forceidx -oac copy -ovc copy 1F203D26.TMP.avi -o repaired.avi

That’s it!





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: