Beasto commited on
Commit
8bcf6d3
·
1 Parent(s): 57a40bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -11,7 +11,8 @@ video_file = st.file_uploader("Choose a video file", type=["mp4"])
11
  if video_file is not None:
12
  # Read the video file from the file-like object
13
  video_path = video_file.name
14
- cap = cv2.VideoCapture(video_path)
 
15
 
16
  # Get the frames per second (fps) of the video
17
  fps = (cap.get(cv2.CAP_PROP_FPS))
 
11
  if video_file is not None:
12
  # Read the video file from the file-like object
13
  video_path = video_file.name
14
+ video_np = np.frombuffer(video_path,np.uint8)
15
+ cap = cv2.imdecode(video_np, cv2.IMREAD_UNCHANGED)
16
 
17
  # Get the frames per second (fps) of the video
18
  fps = (cap.get(cv2.CAP_PROP_FPS))