Canon R6 CR3 format

A place to discuss pretty much anything related to storage, computers, data recovery or technology.
fzabkar
Lurker
Posts: 113
Joined: Sun Jun 30, 2019 2:12 am

Re: Canon R6 CR3 format

Post by fzabkar »

@davey, if you are in a hurry, or just for testing purposes, add a 0x00 byte to your carved files. That should make Lightroom happy.

This command appends 00.bin (a file consisting of a single zero byte) to each .CR3 file in the \recovered directory and writes it to the \fixed directory.

Code: Select all

for %i in (\recovered\*.CR3) do copy /b %i + 00.bin \fixed\%i
Joep
Official Product Rep
Posts: 171
Joined: Tue Feb 07, 2017 2:18 pm
Location: Netherlands
Contact:

Re: Canon R6 CR3 format

Post by Joep »

fzabkar wrote: Fri Feb 10, 2023 7:33 pm Therefore ISTM that the .ini file should be tweaked to correctly calculate the size of the mdat atom, assuming that is even possible.
You can not, this is the problem. It's really sad, the state of affairs but it seems most carving in our top ranking tools is limited to header -- header -- header. DMDE does a tad better, header -- footer or header -- header. Also you can include AND/NOT conditions.
Otherwise you could carve an additional sector, and then write a tool to truncate the carved .CR3 file to its correct size (is that in fact what you are doing?).
This was the v1 signature, it captured some additional data. v2 does less but that seemed to work for RawDigger.

If there wasn't a time constraint I could make a carver that can use the file structure in the same way I do for JPEG in JpegDigger. In fact I intend to but it will not be available this week. There's some more filetypes that suffer from this same type of issue, such as .braw files. You need to get exact size but there's no clear and universal end signature.
http://www.disktuna.com - video & photo repair & recovery service
davey
Lurker
Posts: 15
Joined: Tue Apr 20, 2021 10:15 am

Re: Canon R6 CR3 format

Post by davey »

fzabkar wrote: Fri Feb 10, 2023 7:56 pm @davey, if you are in a hurry, or just for testing purposes, add a 0x00 byte to your carved files. That should make Lightroom happy.

This command appends 00.bin (a file consisting of a single zero byte) to each .CR3 file in the \recovered directory and writes it to the \fixed directory.

Code: Select all

for %i in (\recovered\*.CR3) do copy /b %i + 00.bin \fixed\%i
@fzabkar good one ! It worked in most cases, rest of it needs 00 00 at the eof so it can be normally opened in LR.

edit for future reference:
if CR3 ends with 01 it needs 00 at eof
if CR3 ends with 02 it needs 00 00 at eof
Only then it`s readable in Lightroom, i`m not an expert in this matter so don`t know the reason.

Best Regards,
Davey
lcoughey
Site Admin
Posts: 980
Joined: Thu Jan 08, 2015 7:23 pm
Location: Ontario, Canada
Contact:

Re: Canon R6 CR3 format

Post by lcoughey »

davey wrote: Tue Feb 14, 2023 10:06 am edit for future reference:
if CR3 ends with 01 it needs 00 at eof
if CR3 ends with 02 it needs 00 00 at eof
Only then it`s readable in Lightroom, i`m not an expert in this matter so don`t know the reason.
Maybe the 01 and 02 mean the number of bytes of 0x00 to follow?
fzabkar
Lurker
Posts: 113
Joined: Sun Jun 30, 2019 2:12 am

Re: Canon R6 CR3 format

Post by fzabkar »

I think that one-liner would have failed.

This should work:

Code: Select all

cd \recovered
for %i in (*.CR3) do copy /b %i + 00.bin \fixed\%i
davey
Lurker
Posts: 15
Joined: Tue Apr 20, 2021 10:15 am

Re: Canon R6 CR3 format

Post by davey »

fzabkar wrote: Wed Feb 15, 2023 7:53 pm I think that one-liner would have failed.

This should work:

Code: Select all

cd \recovered
for %i in (*.CR3) do copy /b %i + 00.bin \fixed\%i
already fixed that, thank You once again!
Joep
Official Product Rep
Posts: 171
Joined: Tue Feb 07, 2017 2:18 pm
Location: Netherlands
Contact:

Re: Canon R6 CR3 format

Post by Joep »

No, CR3 = MP4 container. Last few bytes don't matter, CR3 is picky when it comes to atom sizes. This doesn't add or remove arbitrary bytes, it makes file size match atom sizes:
http://www.disktuna.com - video & photo repair & recovery service
Post Reply