This utility can recover video and audio streams from unfinalized MP4/MOV/3GP files without (or empty) header.
You may got the unfinalized file in case of damaging camcorder during recording or such.

Even if the last recovered file does not contain an accident moment (the last 5-10 seconds), I can still help!
The DVR simply did not flush the FAT cache to SD card.
I can recover all the videos from SD card ignoring the file system.
You just need to watch all, and to find the right moment.
You need to create the sector-by-sector copy of the SD card (the disk image).
File format must be .img (not .iso).
This can be done by programs such as the Restorer2000, WinHex and others.
If the size of the SD card is 16GB, you get 16GB file.
The file can be split into pieces for convenience by WinRar (pack without compression with split by 2GB for example).
Then upload it to Google Drive, DropBox, Yandex.Disk, MEGA or such and send me links.
Don't forget donation (see bottom of this page).

Supported video formats: AVC/H.264, HEVC/H.265

Supported audio formats: AAC, ADPCM (Intel), MP3, PCM (LE, BE, float), RAW

Note, if your files are not recovered or recovered with artifacts, I can analyze your files and update this tool for your DVR/camcorder/smartphone/encoder very quickly.

A short story (July 2016):
The representative of the Italian professional studio contacted me and asked to recover files created by BlackMagic prorecorder (a live concert).
I have updated my utility within 1 day and recovered 1 file for free.
They were happy. But they had a lot of corrupted files, and they asked the updated utility to recover everything their own. They also promised a donation.
I have sent them the updated utility. And silence!
I recalled a week later. They have not responded.
I recalled after 2 weeks and asked about karma.
They promised again a donation within a week.
And nothing!
They have equipment worth thousands of $.
I have no idea about their loss if I had not helped them.
I hope someone else will donate for support BlackMagic. Maybe BlackMagic itself :-)
But now, if you want to get the updated tool for your DVR/camcorder/encoder, start with donation.
Thank you for understanding.

recover_mp4 in_good_similar.mp4 --analyze
recover_mp4 in_corrupted.mp4 {out_video.h264 | out_video.hevc | --novideo}
[out_audio.aac | out_audio.wav | out_audio.mp3 | out_audio.raw | --noaudio] [options]
--start <hex> read from position (ignore mdat atom)
--end <hex> end position (ignore mdat atom). Specify 0 for EOF
--avcidrmax <hex> ignore AVC NAL units (IDR) with the size above than <hex> bytes
--avcxmax <hex> ignore AVC NAL units (non IDR) with the size above than <hex> bytes
--aacmin <hex>
--pcmmin <hex>
--pcmfix <hex>

--gopro4 use Ambarella templates and detect GoPro4 specific data (default for MP4 files)
--ambarella use Ambarella templates (ignore GoPro4 specific data).
--lav use Lav/ffmpeg templates
--mainconcept use Mainconcept templates
--novatek use car DVR templates based on Novatek (DV turnkey, Street Guardian, etc.)
--qt use QuickTime templates (default for MOV files)
--iphone4 use iPhone 4 templates
--eos use Canon EOS 5D Mark II, 7D, 550D templates
--eos3 use Canon EOS 5D Mark III, 7D Mark II, 100D templates
--eos4 use Canon EOS 5D Mark IV templates
--canon use Canon SX, EOS 80D templates
--vmix use vMix templates
--wowza use Wowza templates
--blackmagic use BlackMagic templates
--avermedia use AVerMedia Live Gamer Portable C875 templates
--lumia use Lumia templates
--panasonic use Panasonic DMC-G7, DMC-GX80, DMC-G85, DMC-GH4, DC-GH5, HC-X1000 templates
--sony use SONY A7S [Mark II], AX1E, NX5R, A6000, HDR-CX405, HDR-CX625 templates
--drim use DRIMeIII templates (Samsung NX1000 camcorder)
--drim5 use DRIMeV HEVC/H.265 templates (Samsung NX1/NX500 camcorder)
--tomtom use TomTom Bandit Action Camera templates
--icat use iCatch templates
--cgo3 use cgo3 templates
--dji.avc use DJI.AVC Phantom (H.264) templates
--dji.hvc use DJI.HVC Phantom (H.265) templates
--hevc use generic HEVC/H.265 templates
--ext use generic templates for any other camcorder or smartphone, Open Broadcaster Software, etc.
Step 1: Use any good previous file with the same resolution and bitrate to generate the header files, for example

>recover_mp4.exe good.mp4 --analyze

It will create files 'video.hdr' and 'audio.hdr' in the current directory and print instructions (ffmpeg options, etc.).

Step 2: Recover streams from the corrupted file, for example

>recover_mp4.exe bad.mp4 recovered.h264 recovered.aac

Note: Files 'video.hdr' and 'audio.hdr' must be exist.
Probably you need to add a specific option (look at instructions from step 1).

Step 3: Use any other utility (Yamb or ffmpeg for example)
to recreate the MP4/MOV file from the streams (recovered.h264 and recovered.aac).

>ffmpeg.exe -r 30 -i recovered.h264 -i recovered.aac -bsf:a aac_adtstoasc -c:v copy -c:a copy recovered.mp4

Note MP4 does not support PCM sound, you must create MOV in this case:

>ffmpeg.exe -r 30 -i recovered.h264 -i recovered.wav -c:v copy -c:a copy

In case of ADPCM audio:

>ffmpeg -r 30 -i recovered.h264 -i recovered.wav -c:v copy -c:a adpcm_ima_wav

Note: 30 is FPS in these examples. Specify your correct value.
In case of 29.97 I suggest to specify 30000/1001 instead.

Description Link #1 Link #2 Version Date
recover_mp4 (190KB) (190KB) 1.92 06/18/2017