Skip to content

Commit

Permalink
Move ffmpeg import within caption is valid func
Browse files Browse the repository at this point in the history
  • Loading branch information
evamaxfield committed Oct 1, 2022
1 parent 4b2007b commit e883508
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cdp_backend/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from typing import Optional, Tuple, Union
from uuid import uuid4

import ffmpeg
import fireo
import fsspec
import requests
Expand Down Expand Up @@ -658,6 +657,8 @@ def caption_is_valid(video_uri: str, caption_uri: str) -> bool:
and the duration of the caption file are compared.
The caption file is accepted if the durations differ by no more than 20%.
"""
import ffmpeg

try:
ffprobe = ffmpeg.probe(video_uri)
except ffmpeg.Error as e:
Expand Down

0 comments on commit e883508

Please sign in to comment.