File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/superannotate/lib/core Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,10 @@ opencv-python-headless~=4.7
55packaging ~= 24.0
66plotly ~= 5.14
77pandas ~= 2.0
8- ffmpeg-python ~= 0.2
98pillow >= 9.5 ,~= 10.0
109tqdm ~= 4.66
1110requests == 2.*
1211aiofiles == 23.*
1312fire == 0.4.0
1413mixpanel == 4.8.3
15- superannotate-schemas == 1.0.49
14+ superannotate-schemas == 1.0.49
Original file line number Diff line number Diff line change 77from typing import Union
88
99import cv2
10- import ffmpeg
1110from lib .core .exceptions import ImageProcessingException
1211from PIL import Image
1312from PIL import ImageDraw
@@ -197,6 +196,7 @@ def get_video_rotate_code(video_path, log):
197196 270 : cv2 .ROTATE_90_COUNTERCLOCKWISE ,
198197 }
199198 try :
199+ import ffmpeg
200200 meta_dict = ffmpeg .probe (str (video_path ))
201201 rot = int (meta_dict ["streams" ][0 ]["tags" ]["rotate" ])
202202 if rot :
@@ -206,6 +206,8 @@ def get_video_rotate_code(video_path, log):
206206 rot ,
207207 )
208208 return cv2_rotations [rot ]
209+ except ImportError :
210+ raise Exception ("Install ffmpeg-python~=0.2 to use this function." )
209211 except Exception as e :
210212 warning_str = ""
211213 if "ffprobe" in str (e ):
You can’t perform that action at this time.
0 commit comments