Tool for processing corrupt Quicktime files at DVinfo.net
DV Info Net

Go Back   DV Info Net > Canon EOS / MXF / AVCHD / HDV / DV Camera Systems > Canon EOS Full Frame for HD

Canon EOS Full Frame for HD
All about using the Canon 1D X, 6D, 5D Mk. IV / Mk. III / Mk. II D-SLR for 4K and HD video recording.

Reply
 
Thread Tools Search this Thread
Old July 19th, 2009, 02:36 PM   #1
Wizard Status
 
Join Date: Jun 2005
Location: New York, NY
Posts: 239
Tool for processing corrupt Quicktime files

I have a Quicktime from my 5D that was corrupted by my code trying to adjust timing parameters while recording. It won't open in the camera, nor in any of the usual tools, including the very forgiving VLC. Does anyone have any suggestions for tools that will allow recovery of the frames near the end of the file to verify the fps?

Sample corrupt file, featuring a watch face with a second hand to verify correct timing.
Tramm Hudson is offline   Reply With Quote
Old July 19th, 2009, 03:42 PM   #2
Regular Crew
 
Join Date: Jun 2009
Location: Las Vegas, NV
Posts: 170
AE No Go

Tramm, I tried opening it with After Effects CS3 which is my go to swiss army knife for problematic files (and way cool effects). No go. It said the file was unrecognizable. Same for FCP and Quictime.
(Dont forget about 29.97 ;-) )
Tom Daigon is offline   Reply With Quote
Old July 19th, 2009, 05:52 PM   #3
Major Player
 
Join Date: Apr 2008
Location: Beijing
Posts: 665
Tramm,

Will the file play in the camera?

Dan
Dan Chung is offline   Reply With Quote
Old July 19th, 2009, 06:31 PM   #4
Regular Crew
 
Join Date: Jun 2009
Location: Las Vegas, NV
Posts: 170
"It won't open in the camera, nor in any of the usual tools..."

A quote from Tramm.

Last edited by Tom Daigon; July 19th, 2009 at 09:27 PM.
Tom Daigon is offline   Reply With Quote
Old July 19th, 2009, 06:32 PM   #5
Wizard Status
 
Join Date: Jun 2005
Location: New York, NY
Posts: 239
Quote:
Originally Posted by Dan Chung View Post
Will the file play in the camera?
No, unfortunately not.

I'm trying to figure out if anything has actually changed in the recording or if my code only messed up the Quicktime header, before I spend too much time chasing down the code that uses those parameters in the mvr_struct.
Tramm Hudson is offline   Reply With Quote
Old July 19th, 2009, 06:53 PM   #6
Inner Circle
 
Join Date: Nov 2005
Location: Elk Grove CA
Posts: 6,838
Can't seem to download the file, to check it out, but the title it is showing is getting me fired up.... !! I didn't think you were trying to go there yet..... Is there a limit to download activity on that site ? Wonder if Youtube or Vimeo could convert it. I would try a cineform coversion if I could down load it.
__________________
Chris J. Barcellos
Chris Barcellos is offline   Reply With Quote
Old July 19th, 2009, 09:13 PM   #7
Regular Crew
 
Join Date: Jun 2009
Location: Las Vegas, NV
Posts: 170
It downloaded just fine for me, but as I said the tools I use for troublesome video could
not open it and gave an error of unknown file type.
Tom Daigon is offline   Reply With Quote
Old July 20th, 2009, 05:17 AM   #8
Regular Crew
 
Join Date: Nov 2004
Posts: 1,414
There may be some info in this thread that might help...

http://www.dvinfo.net/conf/cineform-...ge-please.html
Ray Bell is offline   Reply With Quote
Old July 20th, 2009, 06:17 AM   #9
Regular Crew
 
Join Date: Nov 2006
Location: Dublin, Ireland
Posts: 51
Tramm,

don't want to overburden you with links but found this and thought it might help.

web3null: how to fix a broken quicktime mov file
Robert Esmonde is offline   Reply With Quote
Old July 20th, 2009, 09:06 AM   #10
Major Player
 
Join Date: Feb 2008
Location: Voorheesville, NY
Posts: 433
I'd start with looking over the QT file format specification:

http://developer.apple.com/documenta.../qtff/qtff.pdf

and then downloading one of the freeware QT metadata editors/viewers. Since there are a number of them for both PCs and Macs, you best bet is to use Google to suit your OS. The next step would be to examine all the various atoms and entries for the video track and see if you see any problems. It also may be possible to change key entries in the trak atom, such that the corrupted frames are not read.

Have you tried QT Player Pro? Sometimes that will read MOV files with corrupted entries. VLC and most other players usually just give up and show no video window.
Jay Bloomfield is offline   Reply With Quote
Old July 20th, 2009, 05:32 PM   #11
Regular Crew
 
Join Date: Apr 2005
Location: Frankfurt, Germany
Posts: 181
Robert and Jay,
thank you very much for your input. I used it to modify the file in a Hex editor (fix atom length) and then copy and paste the media data (so called moov box or moov Atom) into the file.

It opens fine now!!! The disappointment was that it showed blank (dark green screen in Quicktime, white in TMPEG Enc).

I don't have a 5D, so if anyone has, it would be great if someone could make a file with c.a. 40 mb available, then I could paste perfectly fitting media data (clip length wise). I had to use the media info from a much smaller file.

Tramm,

does that mean you are beginning to play with the framerates? I totally missed this thread based on it's comparatively low-key title.

If you intend to corrupt more files in future I may be able to code you a small fixing software ;)


If someone else is interested reproducing the fix: (WARNING - very geeky)
Correct the first unsigned Int32 specifying the length of the second Atom to match the file length minus the length of the first Atom (first Atom has a length of 24 bytes). So from the 25th byte it should read 00 00 00 08 and changed to 02 AF 01 87.
Then paste the media data (moov Atom) of another 5D file at the end. Try to get one that is close in size or slightly smaller.

So when you are done, the file should have three atoms: FTYP, MDAT and MOOV


Will post the file tomorrow (it's very late here in Europe now).

Thomas
Thomas Richter is offline   Reply With Quote
Old July 20th, 2009, 06:11 PM   #12
Wizard Status
 
Join Date: Jun 2005
Location: New York, NY
Posts: 239
Quote:
Originally Posted by Thomas Richter View Post
does that mean you are beginning to play with the framerates? I totally missed this thread based on it's comparatively low-key title.
It was deliberately low-key to avoid getting everyone's hopes up. While looking for something related to bracketing I saw code in the mvrRecStart() function that used a value in the mvr_struct to write values into the Quicktime header (and maybe the DIGIC engine). The tantalizing bits were that the computed values were 3000/100 == 30.00, 30000/1001 = 29.97 and 5994/100 = 59.94.

So I added some code that wrote new values into the structure when movie recording started to see if it would do the right thing. It still isn't clear if it did it or not, or if this is even the route to go down for adjusting the frame rate. There are lots of places where fps==30 seem to be hardcoded (like in mvrRecstart() and SetVideoInformation()).
Tramm Hudson is offline   Reply With Quote
Old July 20th, 2009, 08:10 PM   #13
Inner Circle
 
Join Date: Nov 2005
Location: Elk Grove CA
Posts: 6,838
Finally downloaded.

Corrupt in Cineform, won't convert.

Corrupt in Virtual dub

Currupt in Vegas.
__________________
Chris J. Barcellos
Chris Barcellos is offline   Reply With Quote
Old July 20th, 2009, 08:23 PM   #14
Major Player
 
Join Date: Feb 2008
Location: Voorheesville, NY
Posts: 433
I just checked the file with QT Atom Viewer and the mdat atom is corrupt. Everything beyond that in the file cannot be read properly, because the length of each atom entry is stored with each atom and if the length doesn't match the atom's actual data length, the entire atom is corrupt.

If the MOV file metadata is corrupt, you are stuck using a hex editor (I use HHD Neo). Else, Apple's own Dumpster is the best way to edit MOV files, on a PC, except for Vista x64.
Jay Bloomfield is offline   Reply With Quote
Old July 20th, 2009, 08:30 PM   #15
Regular Crew
 
Join Date: Jun 2009
Location: Las Vegas, NV
Posts: 170
It sounds like Thomas & Jay maybe on to something that addresses things more at a software level rather then the variety of apps we have all tried with no success.
Tom Daigon is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK


DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Canon EOS / MXF / AVCHD / HDV / DV Camera Systems > Canon EOS Full Frame for HD

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 



All times are GMT -6. The time now is 06:20 AM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network