Skip to content

Commit 51e833f

Browse files
committed
Video rot warning
1 parent b4a32eb commit 51e833f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

superannotate/db/projects.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,12 @@ def upload_video_to_project(
251251
"Frame rotation of %s found. Output images will be rotated accordingly.",
252252
rot
253253
)
254-
except:
254+
except Exception as e:
255+
warning_str = ""
256+
if "ffprobe" in str(e):
257+
warning_str = "This could be because ffmpeg package is not installed. To install it, run: sudo apt install ffmpeg"
255258
logger.warning(
256-
"Couldn't read video metadata to determine rotation. This could be because ffmpeg package is not installed. To install it, run: sudo apt install ffmpeg"
259+
"Couldn't read video metadata to determine rotation. " + warning_str
257260
)
258261

259262
video = cv2.VideoCapture(str(video_path), cv2.CAP_FFMPEG)

0 commit comments

Comments
 (0)