Comparing 2 video files
A general algorithm is to compute the SHA256 hash of each file, then sort the hashes and look for duplicates.  After sorting any duplicates that may exist will be consecutive.  For all practical purposes, you can assume that two files will be identical if and only if their SHA256 hash is the same.

If you're asking how to do this from the command line or looking for a product recommendation, take a look at this:


https://unix.stackexchange.com/q/71176/9812
https://superuser.com/q/8223/93541
https://superuser.com/q/46690/93541