Broken mp4s

gravy664

n3wb
Joined
Feb 7, 2022
Messages
7
Reaction score
0
Location
UK
I currently have a IP4M-1051 (V2.620.00AC000.3.R, Build Date: 2019-09-19) which writes 1520p/20fps motion event videos to a Pi running NFS. For the most part, this works fine and I'm delighted with it. However, a small number of videos (about 5%) are corrupted, either obviously truncated (a few hundred K in size), or more frequently a reasonable length but just unplayable (MPC-HC, VLC).

For the sensibly-sized files, https:// mediaarea.net/en/MediaInfo can't detect either a video or audio stream, ffprobe reports a missing moov atom, https:// github.com/ponchio/untrunc reports a missing mvhd atom (I haven't yet tried https:// github.com/anthwlock/untrunc , but I suspect a similar result), and https:// codecpack.co/download/recover-mp4.html recovers an effectively null file. Eyeballing with HxD shows the presence of both 'moov' and 'mvhd' tags.

I have a hunch that the data is there, but some/most/all of the necessary headers haven't been written correctly. I guess this is just a quirk of the camera and I should just live with it, but has anyone else experienced this and resolved it? Is there a program that can comprehensively rummage through an mp4 file and find and fix errors?

I would prefer to avoid updating the firmware if possible, as I make extensive use of both features and API, and many things would break.

Ta!
 
Top