[FFmpeg-user] co64 atom in QT / Mp4, and compatibility with Premiere

Bouke bouke at editb.nl
Sun Jan 31 14:06:06 EET 2021


This is not an FFmpeg question perse, but I hope someone knows more about atoms than I do.

Similar to the previous thread, I am modifiying clips ‘in place / destructive’. (For .Mp4 / .mov files)

For that I re-write or re-order the moov atom to needs.
That all seems to work fine, if files are < 4 gig.
On larger files, when I want to change TC, I add an mdat atom with the TC converted to frame number.
In the TC track (That I rip from a dummy FFmpeg short transcode), I change the pointer in the TC tracks stco atom to the newly added mdat location.
So far so good.

Now, when the new mdat pos goes over 4 gig, I add an co64 atom so I have 8 bytes to set it, and I  change the whole shebang to reflect the new length of all atoms in the structure.
This also ‘sorta kinda’ works, as QT player displays the correct TC.

BUT, Adobe Premiere does NOT like this, it gives me another TC that I can’t place for the life of me…
If I omit the co64 atom and find ‘some’ spot (either inside an mdat atom or not), it works, but it seems Premiere totally ignores the co64 info.

Can anyone shed a light on this?


Thx,

Bouke


More information about the ffmpeg-user mailing list