ExifTool Forum

General => Metadata => Topic started by: athos on April 20, 2024, 01:48:45 PM

Title: Media Data Offset tag in MOV file
Post by: athos on April 20, 2024, 01:48:45 PM
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!
Title: Re: Media Data Offset tag in MOV file
Post by: StarGeek on April 20, 2024, 02:15:39 PM
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 (https://exiftool.org/TagNames/QuickTime.html), 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.
Title: Re: Media Data Offset tag in MOV file
Post by: Phil Harvey on April 20, 2024, 09:29:08 PM
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