Spaces:
Paused
Paused
Commit
·
bb9c4a8
1
Parent(s):
0bbba4e
fix
Browse files
app.py
CHANGED
@@ -102,12 +102,9 @@ def generate(file_url):
|
|
102 |
|
103 |
# Set up HLS streaming
|
104 |
token = TOKEN
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
# Return the unique stream ID for later use
|
109 |
-
return stream_id
|
110 |
-
return None
|
111 |
|
112 |
thread = Thread(target=start_prefetching)
|
113 |
thread.daemon = True
|
|
|
102 |
|
103 |
# Set up HLS streaming
|
104 |
token = TOKEN
|
105 |
+
process = ffmpeg_stream(file_url, token, output_dir=output_dir)
|
106 |
+
return stream_id
|
107 |
+
|
|
|
|
|
|
|
108 |
|
109 |
thread = Thread(target=start_prefetching)
|
110 |
thread.daemon = True
|
video.py
CHANGED
@@ -58,7 +58,7 @@ def ffmpeg_stream(file_url, token, output_dir="tmp/cache/stream"):
|
|
58 |
logging.error(f"HLS playlist not created at {output_path}")
|
59 |
|
60 |
# Return the unique stream ID and process
|
61 |
-
return
|
62 |
|
63 |
except Exception as e:
|
64 |
logging.error(f"Error using FFmpeg to stream file: {e}")
|
|
|
58 |
logging.error(f"HLS playlist not created at {output_path}")
|
59 |
|
60 |
# Return the unique stream ID and process
|
61 |
+
return process
|
62 |
|
63 |
except Exception as e:
|
64 |
logging.error(f"Error using FFmpeg to stream file: {e}")
|