Perceptual video hashing library
MIT License
Vidhash is a perceptual video hashing and checking library, to detect similar videos, or videos containing similar scenes.
Basically, this video hashing works by scaling the video down a bit, and taking 5 frames a second as images, and performing image hashes on those frames. Then it can do checks by checking how many image hashes from one video match up with image hashes from another.
This documentation is a little sparse at the moment, but the basic summary is that to hash a video, use video_hash = hash_video(video_path)
.
This returns a VideoHash
object.
You can also provide a HashSettings
object. HashSettings need to match for two video hashes to be compared.
Currently HashSettings allow specifying the
When checking video hashes against each-other, use video_hash.check_match(other_hash)
.
You can optionally provide a MatchOptions
object as a second argument, or use a MatchOptions object and call the MatchOptions.check_match(hash1, hash2)
method on it.
There are 3 supported types of MatchSettings:
FrameCountMatch
PercentageMatch
DurationMatch