Skip to content

Commit

Permalink
Further fix imports for "caption is valid" func
Browse files Browse the repository at this point in the history
  • Loading branch information
evamaxfield committed Oct 3, 2022
1 parent e883508 commit 889e01a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cdp_backend/utils/file_utils.py
Expand Up @@ -14,13 +14,7 @@
import fireo
import fsspec
import requests
import webvtt
from fsspec.core import url_to_fs
from webvtt.exceptions import (
InvalidCaptionsError,
MalformedCaptionError,
MalformedFileError,
)

from ..database import models as db_models

Expand Down Expand Up @@ -658,6 +652,12 @@ def caption_is_valid(video_uri: str, caption_uri: str) -> bool:
The caption file is accepted if the durations differ by no more than 20%.
"""
import ffmpeg
import webvtt
from webvtt.exceptions import (
InvalidCaptionsError,
MalformedCaptionError,
MalformedFileError,
)

try:
ffprobe = ffmpeg.probe(video_uri)
Expand Down

0 comments on commit 889e01a

Please sign in to comment.