Skip to content
Akash Mahanty edited this page Oct 17, 2021 · 14 revisions

VideoHash class

Only one parameter out of path and url must have an argument, passing both will raise ValueError. And if none of them has an argument the instance will raise videohash.exceptions.DidNotSupplyPathOrUrl.

videohash.VideoHash(path=None, url=None, storage_path=None, download_worst=True)

  • creates a VideoHash object that can be used to calculate the video hash value for a video

  • Parameters:

  • path - Absolute path of the video file.
  • url - URL of the video file. Every URL that is supported by the youtube-dl or yt-dlp package can be used.
  • storage_path - If you want to provide a storage path for the files created/downloaded by the instance, pass the absolute path to that directory.
  • download_worst - The default argument is True and the instance downloads the worst quality video possible to save bandwidth. If set to False, download the default quality of youtube-dl/yt-dlp downloader. These two downloaders default to the best quality video.
Clone this wiki locally