Skip to content

Commit

Permalink
NOTE: this requires modification in videohash
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Oct 26, 2022
1 parent 976f742 commit e49885d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions processors/visualisation/video_hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
https://ffmpeg.org/
"""
import json
import os
import shutil
import zipfile

from videohash import VideoHash
from videohash.exceptions import FFmpegNotFound
Expand Down Expand Up @@ -128,17 +126,6 @@ def process(self):
self.dataset.update_status("FFmpeg software not found. Please contact 4CAT maintainers.", is_final=True)
self.dataset.finish(0)
return
except UnicodeDecodeError as e:
# This seems to occur randomly and can be resolved by retrying
error = 'Error with video %s (%s): Retrying...' % (str(path), str(e))
self.dataset.log(error)
try:
videohash = VideoHash(path=str(path), storage_path=str(staging_area), frame_interval=frame_interval, do_not_copy=True)
except UnicodeDecodeError as e:
error = 'Error repeated with video %s: %s' % (str(path), str(e))
self.dataset.log(error)
video_hashes[path.name] = {'error': error}
continue

video_hashes[path.name] = {'videohash': videohash}

Expand Down

0 comments on commit e49885d

Please sign in to comment.