Update app.py
Browse files
app.py
CHANGED
@@ -45,8 +45,8 @@ def dl(inp,img):
|
|
45 |
inp_out=inp_out.replace("/","_").replace(".","_").replace("=","_").replace("?","_")
|
46 |
|
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-subs --write-auto-subs --sub-lang en "{inp}" -o "{uid}/{inp_out}"')
|
49 |
-
with open(f"{uid}/{inp_out}.en.
|
50 |
print(f.read())
|
51 |
#out = f"{uid}/{inp_out}.mp4"
|
52 |
#capture = cv2.VideoCapture(out)
|
|
|
45 |
inp_out=inp_out.replace("/","_").replace(".","_").replace("=","_").replace("?","_")
|
46 |
|
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-subs --write-auto-subs --sub-lang en --convert-subs=srt "{inp}" -o "{uid}/{inp_out}"')
|
49 |
+
with open(f"{uid}/{inp_out}.en.srt") as f:
|
50 |
print(f.read())
|
51 |
#out = f"{uid}/{inp_out}.mp4"
|
52 |
#capture = cv2.VideoCapture(out)
|