I have a camera that usually records AVI videos in 10 minute segments. Lately, however, its videos have been unplayable when I upload them to my computer (especially when I move the camera around a lot while it is recording, which I think is the cause of the corruption). Using a hex code viewer, I can see that while the first video in a sequence of segments usually has a RIFF header and is then followed by MJPEG frames enclosed in FF D8 / FF D9 tags, at some point in the video (under my hypothesis, when the camera gets moved around too much) the files begin instead to be filled with random-seeming data, with no clear frame markers (there are some FF D8s and FF D9s scattered throughout but they don’t seem to be wrapping anything at a consistent size). That random data continues to be written (and takes up the same amount of space as normal video/audio footage) until the video is stopped (and no index is created at the end of the file) or ten minutes elapses, at which point the next file is created, consisting solely of the random data as well.
I’ve had luck extracting the intact MJPEG part of the initial videos using ffmpeg, but I have no idea what kind of data is being produced afterwards. Is it most likely just garbage that the camera is spewing for some reason after being shaken up? If not, it doesn’t seem to be consistently sized enough to be raw YUVJ420 data at 1920×1080 resolution (the specs of the camera’s working MJPEG videos), and there seem to be too many bites in between each FF D9 and the next FF D8 (plus the irregular, too small size of the data between FF D8s and FF D9s) to be JPEG frames. Thanks for any help or ideas that anyone can give me as far as what the random-seeming data might be or how I might extract anything of value from it!
Sample first video, with a RIFF header and ~20 odd seconds of MJPEG frames before random data: https://drive.google.com/file/d/1ziiA2uFfqnivSZ4itCKHybHbtOzQnnjG/view?usp=drive_link
Sample second video, created after ten minutes elapsed, with only the raw random data: https://drive.google.com/file/d/1EbIiKV8itEb_p8yY7EagKN0CuYc-JW4M/view?usp=drive_link