Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Video compare utility? (Read 18676 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