Search code examples
videoffmpeghexmp4hex-editors

How to determine which offsets changed in MP4 file after cutting a part of the MP4 file


This image displays each offset and the role of that offset in mp4 file.

enter image description here

And this is MP4 file viewed in Hex-Editor:

enter image description here

When cutting (as an example) first 60 seconds of that video or doing any cutting process, How can I know which offsets has been changed?


Solution

  • Many offsets will have changed. When cutting, ffmpeg does not copy over the source metadata and transform in-place, it copies the media payload and generates a new package. The sample tables with their chunk offsets will all be different. As will most of the metadata. The only metadata ffmpeg will try to copy over is the string metadata from the input, such as artist, title or timecode.