Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ function(text_input, url_params) {
|
|
26 |
}
|
27 |
"""
|
28 |
def load_video(vid):
|
29 |
-
os.system("yt-dlp -U")
|
30 |
new_video_in = str(vid)
|
31 |
capture = cv2.VideoCapture(new_video_in)
|
32 |
fps = capture.get(cv2.CAP_PROP_FPS)
|
@@ -63,7 +63,7 @@ def dl(inp,img):
|
|
63 |
try:
|
64 |
inp_out=inp.replace("https://","")
|
65 |
inp_out=inp_out.replace("/","_").replace(".","_").replace("=","_").replace("?","_")
|
66 |
-
os.system(f'yt-dlp "{inp}" --trim-filenames 160 -o "{uid}/{inp_out}.mp4" -S res,mp4 --recode mp4')
|
67 |
out = f"{uid}/{inp_out}.mp4"
|
68 |
capture = cv2.VideoCapture(out)
|
69 |
fps = capture.get(cv2.CAP_PROP_FPS)
|
|
|
26 |
}
|
27 |
"""
|
28 |
def load_video(vid):
|
29 |
+
#os.system("yt-dlp -U")
|
30 |
new_video_in = str(vid)
|
31 |
capture = cv2.VideoCapture(new_video_in)
|
32 |
fps = capture.get(cv2.CAP_PROP_FPS)
|
|
|
63 |
try:
|
64 |
inp_out=inp.replace("https://","")
|
65 |
inp_out=inp_out.replace("/","_").replace(".","_").replace("=","_").replace("?","_")
|
66 |
+
os.system(f'yt-dlp "{inp}" --extractor-arg "twitter:api=syndication" --trim-filenames 160 -o "{uid}/{inp_out}.mp4" -S res,mp4 --recode mp4')
|
67 |
out = f"{uid}/{inp_out}.mp4"
|
68 |
capture = cv2.VideoCapture(out)
|
69 |
fps = capture.get(cv2.CAP_PROP_FPS)
|