ChandimaPrabath commited on
Commit
bb9c4a8
·
1 Parent(s): 0bbba4e
Files changed (2) hide show
  1. app.py +3 -6
  2. video.py +1 -1
app.py CHANGED
@@ -102,12 +102,9 @@ def generate(file_url):
102
 
103
  # Set up HLS streaming
104
  token = TOKEN
105
- output_path, process = ffmpeg_stream(file_url, token, output_dir=output_dir)
106
-
107
- if output_path:
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 stream_id, process
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}")