Author Topic: mlv invalid header size repair? forgot to exfat  (Read 3237 times)

dxotic

  • New to the forum
  • *
  • Posts: 12
mlv invalid header size repair? forgot to exfat
« on: July 07, 2016, 07:39:21 AM »
Hi,
Firstly
 Thanks to the team for magic lantern, for providing an invaluable resource for film making.

I have an error I'd like to fix, In my rush out the door to shoot some shots. I forgot to exfat my cf flash card having set everything up Inside magic lantern. Any way I shot a few shots that were under 4.29 GB and there was no issue. But some shots were longer than what the format FAT 32 can handle it gave me " invalid head size error with hex offset" and kept adding files of  .M0x 52 bytes after.
 I have read a few answers but they were old and am just ok at using hex but would like to know if these files are recoverable? And if possible what best I can do to rescue them.  I am using El Capitan OSX with the latest build of magic lantern June 16 . thanks

dxotic

  • New to the forum
  • *
  • Posts: 12
Re: mlv invalid header size repair? forgot to exfat
« Reply #1 on: July 11, 2016, 04:52:17 PM »
So I found the answer and answering this just in case someone else has the same issue. I kept reading about corruption of the file not writing the header to the card and found a post by Shield: http://www.magiclantern.fm/forum/index.php?topic=5732.0

I simply downloaded a hex editor for OSX 0xED and pasted this hex in for the 4.29gb file:

80 04 = 1152 frames; should be exact number for corrupt 4GB files.

Footer

52 41 57 4D 80 07 38 04 00 5F 37 00 80 04 00 00 01 00 00 00 A8 5D 00 00 18 02 98 19 18 02 98 19 01 00 00 00 00 20 15 0B 26 05 00 00 20 08 00 00 38 0E 00 00 50 34 49 00 0E 00 00 00 07 08 00 00 BB 35 00 00 00 00 00 00 00 00 00 00 88 07 00 00 08 05 00 00 1E 00 00 00 92 00 00 00 26 05 00 00 1A 08 00 00 00 00 00 00 00 00 00 00 00 01 01 02 01 00 00 00 42 1A 00 00 10 27 00 00 85 FD FF FF 10 27 00 00 3D FC FF FF 10 27 00 00 41 EF FF FF 10 27 00 00 AC 30 00 00 10 27 00 00 EC 07 00 00 10 27 00 00 74 FC FF FF 10 27 00 00 72 08 00 00 10 27 00 00 24 16 00 00 10 27 00 00 B2 03 00 00


and saved it and was able to use the file!

allemyr

  • Senior
  • ****
  • Posts: 315
Re: mlv invalid header size repair? forgot to exfat
« Reply #2 on: July 11, 2016, 08:45:47 PM »
Great that you solved it! Hope there is a solution if something like that happens to myself! But I'am windows 7 mostly. Once I had many corrupted and pink lines when I didn't format my CF card in exfat.

dxotic

  • New to the forum
  • *
  • Posts: 12
Re: mlv invalid header size repair? forgot to exfat
« Reply #3 on: July 12, 2016, 12:09:08 AM »
As I'm on Mac, I used 0xED but there will be a PC equivalent like HxD or similar. But the hex to paste on the end would be the same. Refer to the link above for different hex for different card use corruption. Not sure about the pink frames issues however haven't seen that in my files.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: mlv invalid header size repair? forgot to exfat
« Reply #4 on: July 12, 2016, 12:42:55 AM »
Are you sure the files were MLV? These instructions are for RAW format and won't work to fix MLV files.

dxotic

  • New to the forum
  • *
  • Posts: 12
Re: mlv invalid header size repair? forgot to exfat
« Reply #5 on: July 12, 2016, 07:01:54 AM »
Yes they are .mlv , no one answered and in desperation I read about other possible solutions and  after duplicating the file and adding the footer on the end it worked...

It would not play in the camera and would not play on mlvrawviewer and they were good takes so i took a chance and glad i did.

Im not sure what was going on but now I have two takes that i can extract with mlrawviewer as well as MLVFS :)

So what would you recommend when this happens again? I'd rather know the correct way instead.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: mlv invalid header size repair? forgot to exfat
« Reply #6 on: July 12, 2016, 01:07:42 PM »
Yes they are .mlv , ... after duplicating the file and adding the footer on the end it worked...
That's impossible. The MLV format does not have a footer, and there's no way that adding one would fix a corrupted MLV file.

My guess is that there was nothing or very little wrong with the files in the first place. Does MLVFS open the original file?

dxotic

  • New to the forum
  • *
  • Posts: 12
Re: mlv invalid header size repair? forgot to exfat
« Reply #7 on: July 13, 2016, 04:49:23 AM »
I took the file I changed and indeed took off the footer and MLVFS does read it.

However when I use mlrawviewer to quickly look at the shots (as it is convenient and quick ) with the error it does not open and when after it loads it freezes on the first frame. Hence my wrong conclusion that it wasn't working. Next time if I have this issue ill just use MLVFS first.

It doesn't explain why it can't be played in mlvrawviewer initially but does after.