Spaces:
Runtime error
Runtime error
Commit
·
058d3f3
1
Parent(s):
70da591
Update app.py
Browse files
app.py
CHANGED
@@ -57,11 +57,11 @@ def bk_fn(cur):
|
|
57 |
next = 0
|
58 |
return next
|
59 |
def pl_fn(cap,cur,last,fps,pl_tog):
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
if pl_tog ==1:
|
66 |
cur+=1
|
67 |
else:
|
|
|
57 |
next = 0
|
58 |
return next
|
59 |
def pl_fn(cap,cur,last,fps,pl_tog):
|
60 |
+
player = cv2.VideoCapture(cap)
|
61 |
+
#assert player.isOpened() # Make sure that their is a stream.
|
62 |
+
player.set(cv2.CAP_PROP_POS_FRAMES, cur)
|
63 |
+
ret, frame_bgr = player.read(int(cur))
|
64 |
+
frame = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2RGB)
|
65 |
if pl_tog ==1:
|
66 |
cur+=1
|
67 |
else:
|