akamhy / videohash

Near Duplicate Video Detection (Perceptual Video Hashing) - Get a 64-bit comparable hash-value for any video.
https://pypi.org/project/videohash
MIT License
281 stars 46 forks source link

pyhon subprocess inherits stdin by default and causes ffmpeg to fail #98

Open dale-wahl opened 1 year ago

dale-wahl commented 1 year ago

When running videohash as part of a program that has also used subprocess it seems to inherit the stdin and that can result in various failures for ffmpeg.

I have been documenting it here: https://github.com/digitalmethodsinitiative/4cat/pull/303#issue-1422452417 Essentially, I can use videohash alone, but not with additional subprocesses unless I edit it and provide it with stdin=subprocess.DEVNULL since the default stdin is in use.

Sending a PR shortly with needed edit.