PDA

View Full Version : Joined MP4 videos not identical


SuperDuperDave
5th October 2007, 22:47
I used YAMB to merge some MP4 videos together into one big one. I then did it again and compared it against the first one, just to check that they joined correctly. To my surprise I find that every time I join the files, I get a different MD5 value for the resulting file! What is causing me to get different output every time, and can I change this behavior? Or is this supposed to happen?

bond
6th October 2007, 14:26
mp4 files carry creation times inside, which will obviously change every time you remux

SuperDuperDave
6th October 2007, 23:22
Well, that explains it. Is there a way to generate a checksum of just the video data, then? I don't trust MP4Box to do it right every time, because every other time I join some files it comes up a few megabytes short.

foxyshadis
7th October 2007, 01:00
Count frames, maybe? You can do it with ffmpeg:

-i <video> -f rawvideo -an -vcodec copy -y NUL

Unfortunately, mediainfo doesn't report a reliable framecount for mp4.

bond
7th October 2007, 09:47
mp4 files are normally smaller than the input raw streams as it is more efficient in storing the headers

you can extract the raw streams with mp4box and try to compare the checksums for those?