Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,9 @@ def clip(yt_url, start_timestamp, duration):
|
|
33 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
34 |
ydl.download([yt_url])
|
35 |
clip_path = os.path.join(tmpdir, f"{uuid4()}.mp3")
|
36 |
-
print(
|
37 |
subprocess.run(f'ffmpeg -ss {start_timestamp} -t {duration} -i "{video_output_path}" "{clip_path}"', shell=True)
|
|
|
38 |
sleep(3)
|
39 |
return clip_path
|
40 |
|
|
|
33 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
34 |
ydl.download([yt_url])
|
35 |
clip_path = os.path.join(tmpdir, f"{uuid4()}.mp3")
|
36 |
+
print(f'ffmpeg -ss {start_timestamp} -t {duration} -i "{video_output_path}" "{clip_path}"')
|
37 |
subprocess.run(f'ffmpeg -ss {start_timestamp} -t {duration} -i "{video_output_path}" "{clip_path}"', shell=True)
|
38 |
+
print(os.listdir(tmpdir))
|
39 |
sleep(3)
|
40 |
return clip_path
|
41 |
|