Skip to content

Commit 44390ab

Browse files
committed
Video rot warning
1 parent 6503682 commit 44390ab

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
@@ -237,9 +237,12 @@ def upload_video_to_project(
237237
"Frame rotation of %s found. Output images will be rotated accordingly.",
238238
rot
239239
)
240-
except:
240+
except Exception as e:
241+
warning_str = ""
242+
if "ffprobe" in str(e):
243+
warning_str = "This could be because ffmpeg package is not installed. To install it, run: sudo apt install ffmpeg"
241244
logger.warning(
242-
"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"
245+
"Couldn't read video metadata to determine rotation. " + warning_str
243246
)
244247

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

0 commit comments

Comments
 (0)