miojizzy commited on
Commit
6fbdfed
·
1 Parent(s): 3266f06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -6,11 +6,12 @@ import gradio as gr
6
 
7
 
8
  def get_video_info(v):
9
- with cv.VideoCapture(v) as vc:
10
- fps = vc.get(cv.CAP_PROP_FPS)
11
- frames = vc.get(cv.CAP_PROP_FRAME_COUNT)
12
- width = vc.get(cv.CAP_PROP_FRAME_WIDTH)
13
- height = vc.get(cv.CAP_PROP_FRAME_HEIGHT)
 
14
  return "\n".join([
15
  "fps: " + fps,
16
  "frame count: " + frames,
 
6
 
7
 
8
  def get_video_info(v):
9
+ vc = cv.VideoCapture(v)
10
+ fps = vc.get(cv.CAP_PROP_FPS)
11
+ frames = vc.get(cv.CAP_PROP_FRAME_COUNT)
12
+ width = vc.get(cv.CAP_PROP_FRAME_WIDTH)
13
+ height = vc.get(cv.CAP_PROP_FRAME_HEIGHT)
14
+ vc.release()
15
  return "\n".join([
16
  "fps: " + fps,
17
  "frame count: " + frames,