All,
I have an SD card with 40 mp4 files on it. After file 20, all the video is corrupted. I've used numerous tools to try and "recover" the video but to no avail. I strongly believe the video is still on the SD card, but somehow pointers to the files are messed up. I decided to use a hex editor and when I do a search for some common strings and sure enough, I did bump into them. In my ignorance, I decided I'd just plop a known good header from a working file on top of what appears to be a corrupted header. Problem is, it didn't work.
Below is the header of a good file. I am thinking that maybe things fail because there's filesizes and addresses that are different for each video file. When I paste this known good header on top of a different file, it won't work.
Any thoughts on this technique. It seems to me it should work, but I don't know file formats well enough to decipher what this is precisely telling me.
00000000 | 00 00 00 20 66 74 79 70 | ... ftyp | . 瑦灹
00000008 | 61 76 63 31 00 00 00 00 | avc1.... | 癡ㅣ..
00000010 | 61 76 63 31 69 73 6F 6D | avc1isom | 癡ㅣ獩浯
00000018 | 00 00 00 00 00 00 00 00 | ........ | ....
00000020 | 00 00 39 8A 6D 6F 6F 76 | ..9moov | .訹潭癯
00000028 | 00 00 00 6C 6D 76 68 64 | ...lmvhd | .氀癭摨
00000030 | 00 00 00 00 D1 F3 70 CE | ....p | ..칰
00000038 | D1 F3 70 CE 00 01 5F 90 | p.._ | 칰Ā遟
00000040 | 00 13 85 2E 00 01 00 00 | ....... | ጀ⺅Ā.
00000048 | 01 00 00 00 00 00 00 00 | ........ | ....
00000050 | 00 00 00 00 00 01 00 00 | ........ | ..Ā.
00000058 | 00 00 00 00 00 00 00 00 | ........ | ....
00000060 | 00 00 00 00 00 01 00 00 | ........ | ..Ā.
00000068 | 00 00 00 00 00 00 00 00 | ........ | ....
00000070 | 00 00 00 00 40 00 00 00 | ....@... | ..@.
00000078 | 00 00 00 00 00 00 00 00 | ........ | ....
00000080 | 00 00 00 00 00 00 00 00 | ........ | ....
00000088 | 00 00 00 00 00 00 00 00 | ........ | ....
00000090 | 00 00 00 04 00 00 01 80 | ....... | .Ѐ.老
00000098 | 75 64 74 61 00 00 00 14 | udta.... | 摵慴.᐀
000000A0 | 46 49 52 4D 48 44 33 2E | FIRMHD3. | 䥆䵒䑈⸳
000000A8 | 31 31 2E 30 33 2E 30 30 | 11.03.00 | ㄱ〮⸳〰
+ Reply to Thread
Results 1 to 25 of 25
-
-
Why don't you post a couple of the bad files to the forum and one good file from the same device.
Somebody will take a look -
Thank you. I will do that. I know I can't use the actual files themselves (the corrupt ones) because when I use the hex editor and open the files, they are typically all FFs... once again I'm assuming some pointers are messed up somewhere. However, I can look at a good file and since they all start the same way, I can then find the same reference on "bad files". At this time, I don't quite know how much of a bad file to grab so here is what I did. Each video file, I believe, begins with ftypavc1. I did a search for that string on the SD card and came up with around 40 matches. That makes sense to me because there are 40 videos. The good file (gopro512.mp4) is a copy of the exact file off the SD card. The bad file file10.mp4 is a copy of the data between matches of the string ftypavc1 off the SD card. I can 'play" this file, but no video is available. I do note some significant difference between the good file and this bad file.
I've done this test several times and it seems to be consistent. The bad file plays, but is black. If someone wants to take a look at it, please do. It is video from a motorcycle trip down highway 1 in CA and then through vegas and then Colorado. Bucket list stuff. I lost all my vegas videos as well as Colorado.
Thank you very much! -
if all the data is meaningless ff's there is nothing to recover. you can't repair it if there's nothing there to work with.
--
"a lot of people are better dead" - prisoner KSC2-303 -
-
Or it just reserved the record filespace but never actually recorded any data.
Haveto ask: did you use the GoPro itself to format the card? (You should ALWAYS)
Scott -
file header data will contain a file ID (name, file number etc what ever the devices uses), the file size, an identifier for the file type, and typically the last (2) bytes in the header point to the location address of the next memory block address of the file, something the hex editor or other software will use when displaying the file
i haven't done any HEX editing since i quit hacking files on 'dumb' aka 'feature' cell phones, to add custom backgrounds and other features, like laptop usb tethering, custom ringtones etc..
thats about 8 years or moreLast edited by theewizard; 21st Apr 2018 at 22:25.
-
I'm working in the Hex editor. Can you post one more bad file, I want to compare with the other one
-
Yep it was a brand new card and I did format it with the go pro. One thing I didn't mention is how the corruption occurred. There were 41 videos on the card. I could see them all. There was one video that was basically me messing around with the camera... Maybe 20 seconds. I just deleted that file and in the process of deleting the camera battery died. When I put the other battery in, I now had 40 files and every file after the one I deleted would not play.anymore. this is why I feel the video is still on the card. The GoPro recorded it and
I saw them. My theory is that in the process of deleting that one file the index pointers to all the files after the deleted ones got corrupted. -
-
Have you tried ?
https://www.videohelp.com/software/recover-mp4-to-h264
Relies on that the bad files are exactly the same parameters as a good one. Noted that the bad file in your sample was not identical, parameter wise, as a good one.
But there is data. I do not see all zero or 'ff' bytes and they may be reason for some hope. Not tested in the samples provided since the bad one may not be a representative of the full file. -
-
-
-
-
@Snooger
If you still want the file 10.mp4 recovered, you can download the result at https://files.secureserver.net/0szuptDbtjfitz. It's still a little damaged in the middle but most of it is there.
You may be able to clean it up a bit with re-encoding or cutting the bad parts. I used the Recover_MP4 program from this site, on the 10.MP4 file and the GoPro.MP4 you supplied as a good file.
Thanks
Budman1 -
Hi snooger, did you solve your problem and fix the vid?
I'm facing the same problem with a very important video. I can't post it because I dont own all the copyrights (video from a research project) and also for privacy concerns.
I'm looking for any tutorial to recover this file using Hex editor. I am ready to spend as much time as necessary to recover at list a part of it but I do not know where to start...
thanks in advence for help or any advice. -
Each video file, I believe, begins with ftypavc1. I did a search for that string on the SD card and came up with around 40 matches. That makes sense to me because there are 40 videos.Got to my computer this morning and the hex editor was closed down. Looks like windows rebooted. Ugh! It took about two days to search the whole SD cards for strings. I'll try a few different ways to see if I can get it to work faster.
Or with WinHex, you can run a string search with the list search hits box enabled, that way you don't have to run the same command 40 times, you can do other things in the mean time, and at the end you can save the result so you don't have to start all over again in case there's any kind of SNAFU.
Below is the header of a good file.
Repairing the volume with CHKDSK could correct wrong pointers, but do a full image of the card before attempting that. In some cases, after a CHKDSK /F scan, a wrongly allocated file will disappear and be moved to a (hidden) found.000 directory in the volume's root, containing files named file0000.chk, file0001.chk... Renaming those files with the correct name / extension makes them readable, if the header is correct and there's no missing index.
To repair MP4 files with a missing index and/or incomplete header, I've had success with Grau Video Repair. The free version only allows to recover 50% of the recoverable portion of the file, but there's a trick allowing to get the complete recoverable portion (by appending three copies of the same files with the Windows shell command copy /B, or with a hexadecimal editor).
I have an SD card with 40 mp4 files on it. After file 20, all the video is corrupted.
(Sorry, I hadn't noticed that the original question was asked in April...)
@Dr.Zack :
Do you know how this file ended up corrupted ? If you open it with a hexadecimal editor, what does the header look like ?
And if you don't own the copyrights, can't you, well, obtain it again the same way you obtained it the first time around ? -
@abolibibelot
The header is identical to that of another file (from the same cam, with a same profile)... ftypavc1.... etc., but the editor showed a huge part of zero blocks (maybe more than 99% of the file)... at the end there are only 14 lines of blocks. Otherwise, I can't find "mdat" which should contain data intimations...
For copyrights I mean I'm not only the one on this research project. The video also contains testimonies of persons and we've signed a privacy charter to use those testimonials only for research purposes so I avoid to broadcast them on the web. -
Mostly 00h bytes and no mdat atom means you probably have no video in the file.
-
For copyrights I mean I'm not only the one on this research project. The video also contains testimonies of persons and we've signed a privacy charter to use those testimonials only for research purposes so I avoid to broadcast them on the web.
Because otherwise, as has been said above, no amount of magic can recreate a working video file out of "more than 99%" of 00s. Something must have gone wrong when it was created, or transfered, or stored, or re-transfered, whatever, either someone screwed up at some point or there was some kind of hardware failure, in any case, nothing can be done with the file as it is. There could be a small possibility of recovery if it was copied from another storage device and said storage device hasn't been used at all ever since, which is unlikely, and if that hypothetical other storage device was defective especially if it was a counterfeit memory card, see previous post it's unlikely that the whole file could be recovered anyway. Donc a semble bel et bien foutu, dsolay... -
edit: I found mdat atom but with 1% of bytes ...
I have accidentally deleted the file (shift del) on my SD card and recover it. I take it myself ... so no duplicate...
thank you for all your advices. -
I have accidentally deleted the file (shift del) on my SD card and recover it. I take it myself ... so no duplicate...
thank you for all your advices.
Be sure to never export the recovered files to the same volume from which you're trying to recover from ! (A few months ago I tried to help someone remotely using TeamViewer in a case like this : a woman who was working on a documentary, had made interviews, had copied all files from the memory card to her computer except one which was somehow unselected, then deleted them all on the memory card... when she realized it she hadn't used the card since so at that point the file should have been recoverable she posted a request for help on a classified ads website, which I found, but before I could reach her, she had handed over the memory card to a friend working in computer networking, who should have known better, yet he made that very mistake : he extracted all the deleted files from the memory card... to the memory card !And of course, Murphy's Law was in full force and effect, the one file she needed was overwritten with another one among those she had already copied, at least I could show her that using WinHex... I spent more than an hour on it with zero result, whereas, if dat dumb dude hadn't messed wid it, it would have been solved in a few minutes !)
If the files were fragmented (which can happen on a memory card if some files are deleted but other are kept, leaving "holes" on the volume, and when a file larger than such a hole is recorded afterward it will be stored in different places, with those other files in between), it makes such a method less efficient (without the file allocation information there's no way of knowing where the different portions are scattered, although some tools try to make educated guesses Photorec at a very rudimentary level, CnW is supposed to be much more sophisticated but I haven't tried it), especially with MP4 files which often have their index located at the end, if the last clusters are missing then the whole file is unreadable. But since you see large portions completely empty, it would seem unlikely.
On SSDs, there's a Trim feature which automatically wipes deleted files to optimize performance, but as far as I know there's no such thing on memory cards, so if you did not full-format that card or use some wipe feature (CCleaner has such a feature for instance, but it's a crap cleaner just like Saul Goodman is a criminal lawyer), and (again) haven't recorded anything on that card since that accidental deletion, the file should still be there somewhere.
I was puzzled recently when I did the following :
copied JPG pictures and MP4 files from a 32GB SD card to a HDD ;
deleted (most of) those files ;
copied MTS / AVCHD files to a HDD using a dedicated software ;
imaged the SD card with WinHex, for future reference (some files are not extracted in the AVCHD directory when using a dedicated software like HDWriter or PhotoFunStudio, and on specialized forums it's often recommanded to copy the whole directory so as to preserve the native AVCHD structure, which some softwares require) ;
wiped the MTS files with the Wipe securely function in WinHex (they were already copied, and strictly identical, I always verify MD5 or CRC before deleting, the idea is to compress the image as much as possible by wiping the large files which I already transferred) ;
then I wanted to also wipe the deleted JPG and MP4 files, but, when pointing at them in WinHex, I realized that most of them appeared empty or with invalid contents, although I hadn't touched those files yet...
I found out that the allocation information was wrong, the actual files were located way further on the partition (most of them with a constant offset of 30064771072 bytes which is exactly 28GB, I haven't yet figured out what that means). I mounted the image, analyzed it with Recuva : same result. But somehow R-Studio managed to get the correct location for almost all the deleted files. (This is using the file allocation table, which ideally recovers files with all their metadata ; in raw mode all the tools mentioned would have found them at least the non-fragmented ones albeit with a random name / date.)
I don't know if that's relevant to your situation, since you say that at least the header looks correct (in the situation described above the whole files appeared completely invalid, the whole contents were shifted by the same offset value), but it could be a hint in the right direction.
Good day to you.Last edited by abolibibelot; 16th Nov 2018 at 00:24.
-
@abolibibelot
Thank you for all those precious information.
First I would like to apologize for not being word-perfect in English
So basically, I know there is a very poor chance that I repair this file, but it is very interesting to me to learn more about that ... Maybe it will be useful in the future for me or for someone else arround me. I've tried many of tools you listed above but in fact the story is a little bit more complicated. I recorded the video with my GoPro and copied it to my secondary internal drive (SSD 500gb) then I formated the SD card as usual :/ a few days later, I deleted several files to put my SSD in order. When I looked for the recording I didn't find if. So I remembered that I deleted it accidentally Then I downloaded several softwares to try to recover it ( recuva recuva pro onetrack, easeus, Hetman, Remo and many others. Oddly I found the video only on the formated SD card ( 1.8 gb, 20m25s, the exact featuresr of the deleted one) but nothing in the SSD. I dont have used SSD since that day. I unfortunataly formated the SD card but never wrote on it an never save anything in the sdd drive too. So the only software which gave me something quite correct is recuva. Onetrack and others softs sometimes find raw data but size, duration and extension didn't match even when the files are stored in MP4 folders or mp4 filter when I perform the scan. For eg. Easeus gives me huge mp3 files (20gb 10 times the size of the deleted video) I recovered them, in the header there is a ftypavc1 atom, but when I try to repair them ... nothing. I also tried to repair the file (recovered from formated SD card) with onetrack and mp4 recorery ... No results. I also tried a new Chinese software (MDG I think) and always got the same result ... Just the first frame of the video during 2-3 seconds and nothing after. Since that, I formated the ssd and install Ubuntu on it so no more chance with the SSD. On the other hand, the recovered file and the sd card still intact... maybe I will attempt later. I will check out your message slowly and deeply. I think there are many things to learn. Thank you so much -
First I would like to apologize for not being word-perfect in English
(Toulouse here)
then I formated the SD card as usual :/ [...] I unfortunataly formated the SD card but never wrote on it
Oddly I found the video only on the formated SD card ( 1.8 gb, 20m25s, the exact featuresr of the deleted one) but nothing in the SSD. I dont have used SSD since that day.
So the only software which gave me something quite correct is recuva. Onetrack and others softs sometimes find raw data but size, duration and extension didn't match even when the files are stored in MP4 folders or mp4 filter when I perform the scan. For eg. Easeus gives me huge mp3 files (20gb 10 times the size of the deleted video) I recovered them, in the header there is a ftypavc1 atom, but when I try to repair them ... nothing. I also tried to repair the file (recovered from formated SD card) with onetrack and mp4 recorery ... No results.
For the Easus software, you mean MP4 files I presume ? (MP3 wouldn't have the "ftyp" signature.)
Have you tried Photorec yet ? A disadvantage with this tool is that it extracts *everything* it finds, so even if only one file is needed, it requires a large amount of free space on the destination volume. The list of file types it detects can be changed before the scan, in file options ; if you're only looking for a MP4 file, you should check MP4 and uncheck everything else, to avoid recovering unwanted files, and prevent false positives, which can sometimes truncate a valid file in raw recovery mode (for instance : sometimes inside a valid MP4 video file, there can be a random string of characters which happens to be a typical file signature, for instance "" which is the begining of a JPG picture ; in such a case most recovery softwares will stop extracting the MP4 video at this point and start extracting what appears to be a JPG file, but is in fact still a part of the video data ; if the detection of JPG files is disabled, the extraction of the MP4 file continues and can be complete if all the original data is still there).
Similar Threads
-
Repairing damaged DVD files with hex language
By dvdmaster1 in forum Newbie / General discussionsReplies: 25Last Post: 9th Oct 2017, 11:06 -
GoPro knockoff corrupted files?
By foolery in forum Video ConversionReplies: 9Last Post: 1st May 2017, 01:04 -
Made Newbie Mistake - please help recover GoPro Files mp4's
By Whale Lady in forum Newbie / General discussionsReplies: 2Last Post: 1st Apr 2017, 08:43 -
GoPro Hero 4 Broken files
By lasselarsson in forum RestorationReplies: 3Last Post: 8th May 2016, 06:57 -
Using Hex Editor to Alter Displayed Name ?
By Seeker47 in forum EditingReplies: 8Last Post: 8th Oct 2015, 22:40