Skip to main content


If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: Video compare utility? (Read 13787 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Video compare utility?

Is there any utility that can compare two files and check if they contain the same stream(s)? Kinda like foo_bitcompare, but for video?

Say, an mp4 and an mkv (I did some remuxing and argh, now I have a lot of duplicates ...)
High Voltage socket-nose-avatar

Re: Video compare utility?

Reply #1
I have this for audio:
Code: [Select]
ffmpeg -i "input" -map 0:a -f md5 - 2>/dev/null
With "0:v" will probably work for video too.

Re: Video compare utility?

Reply #2
Then it seems to me that ffmpeg remuxing adds delay or something like that, which obviously alters hashes ...
High Voltage socket-nose-avatar

Re: Video compare utility?

Reply #3
Not to insult the nice smart people the guy mentions, but this Bob person and the other dummies he's shilling for remind me of this

Re: Video compare utility?

Reply #4
Sounds like wrong thread, @andy o.
High Voltage socket-nose-avatar

Re: Video compare utility?

Reply #6
The naïve approach would be to extract the video stream of the two files you want to compare with ffmpeg and -vcodec copy and compare those. If the codec in question is H.264 for instance, ffmpeg supports the format "h264", which is a raw H.264 stream.

Raw HEVC (H.265), and raw MPEG-4 video is also supported. For VP8 or VPx/VP9, I'm not so sure, ffmpeg --formats doesn't list any raw formats for that. You could probably use the format "rawvideo" or "data" for raw formats that aren't otherwise supported by ffmpeg.

So, something like:
Code: [Select]
ffmpeg -i file1.mp4 -c:v copy -an file1.h264
ffmpeg -i file2.mkv -c:v copy -an file2.h264
diff file1.h264 file2.h264
diff will tell you if the two binary files differ or not. However, I'm not sure what sort of header if any ffmpeg puts at the top of a .h264 file.

SimplePortal 1.0.0 RC1 © 2008-2021