renatotn7 commited on
Commit
a3cc716
·
1 Parent(s): 91bc9c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -31,11 +31,11 @@ if uploaded_file is not None:
31
  height=0
32
  if vcap.isOpened():
33
  # get vcap property
34
- width = vcap.get(cv2.CV_CAP_PROP_FRAME_WIDTH) # float `width`
35
- height = vcap.get(cv2.CV_CAP_PROP_FRAME_HEIGHT) # float `height`
36
 
37
  st.write(str(width)+"x"+str(height))
38
- fps = vcap.get(cv2.CAP_PROP_FPS)
39
  st.write(str(fps)+" fps")
40
  @st.experimental_memo(suppress_st_warning=True)
41
  def chamada():
@@ -52,9 +52,9 @@ def chamada():
52
  height=0
53
  if vcap.isOpened():
54
  # get vcap property
55
- width = vcap.get(cv2.CV_CAP_PROP_FRAME_WIDTH) # float `width`
56
- height = vcap.get(cv2.CV_CAP_PROP_FRAME_HEIGHT) # float `height`
57
- fps = vcap.get(cv2.CAP_PROP_FPS)
58
  os.system("ffmpeg -i inputvideo -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags +accurate_rnd+full_chroma_int -s "+str(width)+"x"+str(height)+" -r "+fps+" ./_input/imagem-%4d.png")
59
  percent_complete= percent_complete+ 30
60
  with col1:
 
31
  height=0
32
  if vcap.isOpened():
33
  # get vcap property
34
+ width = vcap.get(3) # float `width`
35
+ height = vcap.get(4) # float `height`
36
 
37
  st.write(str(width)+"x"+str(height))
38
+ fps = vcap.get(5)
39
  st.write(str(fps)+" fps")
40
  @st.experimental_memo(suppress_st_warning=True)
41
  def chamada():
 
52
  height=0
53
  if vcap.isOpened():
54
  # get vcap property
55
+ width = vcap.get(3) # float `width`
56
+ height = vcap.get(4) # float `height`
57
+ fps = vcap.get(5)
58
  os.system("ffmpeg -i inputvideo -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags +accurate_rnd+full_chroma_int -s "+str(width)+"x"+str(height)+" -r "+fps+" ./_input/imagem-%4d.png")
59
  percent_complete= percent_complete+ 30
60
  with col1: