Page 4 of 4

Re: Canon R6 CR3 format

Posted: Fri Feb 10, 2023 7:56 pm
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

Re: Canon R6 CR3 format

Posted: Fri Feb 10, 2023 8:27 pm
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.

Re: Canon R6 CR3 format

Posted: Tue Feb 14, 2023 10:06 am
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

Re: Canon R6 CR3 format

Posted: Tue Feb 14, 2023 5:33 pm
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?

Re: Canon R6 CR3 format

Posted: Wed Feb 15, 2023 7:53 pm
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

Re: Canon R6 CR3 format

Posted: Thu Feb 16, 2023 2:40 pm
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!

Re: Canon R6 CR3 format

Posted: Wed Nov 22, 2023 11:19 am
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: