Spaces:
Sleeping
Sleeping
Commit ·
c97d16c
1
Parent(s): 28fe16f
keep logs
Browse files- hls_download.py +2 -1
hls_download.py
CHANGED
|
@@ -6,7 +6,6 @@ def download_clips(stream_url, out_dir, start_time, end_time, resize=True):
|
|
| 6 |
|
| 7 |
ffmpeg_cmd = [
|
| 8 |
'ffmpeg',
|
| 9 |
-
'-loglevel', 'warning', # Reduce log output
|
| 10 |
'-f', 'hls',
|
| 11 |
'-i', stream_url,
|
| 12 |
'-ss', str(max(0, start_time - 2)), # Ensure start time is not negative
|
|
@@ -24,6 +23,8 @@ def download_clips(stream_url, out_dir, start_time, end_time, resize=True):
|
|
| 24 |
'-y', # Overwrite output file if it exists
|
| 25 |
output_file
|
| 26 |
]
|
|
|
|
|
|
|
| 27 |
|
| 28 |
try:
|
| 29 |
subprocess.run(ffmpeg_cmd, check=True, capture_output=True, text=True)
|
|
|
|
| 6 |
|
| 7 |
ffmpeg_cmd = [
|
| 8 |
'ffmpeg',
|
|
|
|
| 9 |
'-f', 'hls',
|
| 10 |
'-i', stream_url,
|
| 11 |
'-ss', str(max(0, start_time - 2)), # Ensure start time is not negative
|
|
|
|
| 23 |
'-y', # Overwrite output file if it exists
|
| 24 |
output_file
|
| 25 |
]
|
| 26 |
+
|
| 27 |
+
print(ffmpeg_cmd.join(' '))
|
| 28 |
|
| 29 |
try:
|
| 30 |
subprocess.run(ffmpeg_cmd, check=True, capture_output=True, text=True)
|