johann22 commited on
Commit
cda3da2
·
verified ·
1 Parent(s): b6afd40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -47,12 +47,13 @@ def dl(inp,img):
47
  #os.system(f'yt-dlp "{inp}" --trim-filenames 160 -o "{uid}/{inp_out}.mp4" -S res,mp4 --recode mp4')
48
  os.system(f'yt-dlp --skip-download --write-auto-subs --sub-lang en --convert-subs=srt "{inp}" -o "{uid}/{inp_out}"')
49
  f = open(f"{uid}/{inp_out}.en.srt")
50
- print(f.read())
 
51
  #out = f"{uid}/{inp_out}.mp4"
52
  #capture = cv2.VideoCapture(out)
53
  #fps = capture.get(cv2.CAP_PROP_FPS)
54
  #capture.release()
55
- out=f'{f.text()}'
56
  except Exception as e:
57
  print(e)
58
  out = None
 
47
  #os.system(f'yt-dlp "{inp}" --trim-filenames 160 -o "{uid}/{inp_out}.mp4" -S res,mp4 --recode mp4')
48
  os.system(f'yt-dlp --skip-download --write-auto-subs --sub-lang en --convert-subs=srt "{inp}" -o "{uid}/{inp_out}"')
49
  f = open(f"{uid}/{inp_out}.en.srt")
50
+ ft=f.read()
51
+ print(ft)
52
  #out = f"{uid}/{inp_out}.mp4"
53
  #capture = cv2.VideoCapture(out)
54
  #fps = capture.get(cv2.CAP_PROP_FPS)
55
  #capture.release()
56
+ out=f'{ft}'
57
  except Exception as e:
58
  print(e)
59
  out = None