Closed Arsalan66 closed 3 years ago
Presumably you need to read videos frame-by-frame and apply the functions? I think https://github.com/thorn-oss/perception/ has code based on imagehash that does this.
If it helps at all to have another example, I've got one here: https://github.com/joshcoales/gif_pipeline/blob/master/helpers/duplicate_helper.py#L52
But again, not pulled out into it's own library (yet), sorry.
It's just running
ffmpeg -i video.mp4 -vf fps=5 -vsync 0 decompose/out%d.png
to break the video into frames, then looping through them and hashing them
Thanks for sharing sir, I will implement and let you know
If it helps at all to have another example, I've got one here: https://github.com/joshcoales/gif_pipeline/blob/master/helpers/duplicate_helper.py#L52
But again, not pulled out into it's own library (yet), sorry. It's just running
ffmpeg -i video.mp4 -vf fps=5 -vsync 0 decompose/out%d.png
to break the video into frames, then looping through them and hashing them
so basically each frame is hashed according to theory right sir?
Yes, there is nothing fancy going on there.
Respected authors it is a pleasure to work and apply image hashing however I want to do this for videos as well, can you kindly guide the way to do this.
Thanks