Iskaj commited on
Commit
4ab4ddc
1 Parent(s): 6bbc3de

minor documentation fixes

Browse files
Files changed (1) hide show
  1. videohash.py +3 -3
videohash.py CHANGED
@@ -70,7 +70,7 @@ def change_ffmpeg_fps(clip, fps=FPS):
70
  fps (int): The desired frame rate for the clip.
71
 
72
  Returns:
73
- clip (moviepy.editor.VideoFileClip): New clip with the desired.
74
  """
75
  # Hacking the ffmpeg call based on
76
  # https://github.com/Zulko/moviepy/blob/master/moviepy/video/io/ffmpeg_reader.py#L126
@@ -113,7 +113,7 @@ def compute_hash(frame, hash_size=16):
113
  hash_size (int): Size of the required hash.
114
 
115
  Returns:
116
- (ndarray): Perceptual hash of the frame of size (hash_size, hash_size)
117
  """
118
  image = Image.fromarray(np.array(frame))
119
 
@@ -142,7 +142,7 @@ def compute_hashes(url: str, fps=FPS):
142
  url (str): Url of the input video.
143
 
144
  Yields:
145
- ({str: int, str: ndarray}): Dict with the frame number and the corresponding hash.
146
  """
147
 
148
  # Try downloading the video from url. If that fails, load it directly from the url instead
 
70
  fps (int): The desired frame rate for the clip.
71
 
72
  Returns:
73
+ clip (moviepy.editor.VideoFileClip): New clip with the desired frames per seconds.
74
  """
75
  # Hacking the ffmpeg call based on
76
  # https://github.com/Zulko/moviepy/blob/master/moviepy/video/io/ffmpeg_reader.py#L126
 
113
  hash_size (int): Size of the required hash.
114
 
115
  Returns:
116
+ (numpy.ndarray): Perceptual hash of the frame of size (hash_size, hash_size)
117
  """
118
  image = Image.fromarray(np.array(frame))
119
 
 
142
  url (str): Url of the input video.
143
 
144
  Yields:
145
+ ({str: int, str: numpy.ndarray}): Dict with the frame number and the corresponding hash.
146
  """
147
 
148
  # Try downloading the video from url. If that fails, load it directly from the url instead