Media Data Offset tag in MOV file

Started by athos, April 20, 2024, 01:48:45 PM

Previous topic - Next topic

athos

Hello,

I'm cleaning up my photo library and I've got multiple very similar copies of .mov files. They seem to only differ in the tag "Media Data Offset":

Quote======== _DSC0095_0.MOV
Media Data Offset               : 32
======== _DSC0095_1.MOV
======== _DSC0095_2.MOV
Media Data Offset               : 269635
======== _DSC0095_3.MOV
Media Data Offset               : 272499
======== _DSC0095_4.MOV
Media Data Offset               : 32
======== _DSC0095.MOV
Media Data Offset               : 32
    6 image files read

I didn't know anything about the Quicktime format this morning but it seems that this offset is supposed to define the offset of the video data within the file. The Media Data Size is the same for all files however so that seems good.

Using a hex editor I can see that the files that have a higher offset contain other metadata before, for example "moov" is before "mdat" in some of the files and after in others. I used this page to look up some of the metadata I see: https://exiftool.org/TagNames/QuickTime.html.

My goal is to automatically deduplicate 2000 files which only seem to differ by their metadata.

Would you know:
* if it's common for metadata to be reorganized like that?
* if there's a "correct" order?
* if I could reorder the metadata automatically in all files so that they'd bee the same for all of them, making the files identical?

Thank you :)

Also, thanks a lot for this great tool I've been using often!

StarGeek

Quote from: athos on April 20, 2024, 01:48:45 PMWould you know:
* if this value is important?

Any offset tag is important as it points to the location of other data in the file.

Quote* if I could find out which value is correct and rewrite the tag automatically?

If you check on the Quicktime tags page, you will see that it is not writable. Offset tags usually aren't, and to change them would require re-writing the entire file to move data around.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

When ExifTool writes a MOV/MP4 video it puts the media data at the end of the file.  I believe that some metadata readers prefer it that way, but I don't think it is worth changing all your files to have this structure.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).