Fix videos

This commit is contained in:
Logan Cusano
2025-08-02 01:32:17 -04:00
parent a391333c52
commit 414ffe075a

View File

@@ -176,7 +176,6 @@ async def stream_video(video_id: str, current_user: dict = Depends(is_user)):
'-crf', '28',
'-codec:a', 'aac',
'-b:a', '128k',
'-vf', 'scale=-1:720',
'-loglevel', 'warning',
'-hide_banner',
'pipe:1'
@@ -213,6 +212,7 @@ async def stream_video(video_id: str, current_user: dict = Depends(is_user)):
print(f"[{video_id}] Terminating FFmpeg process.")
process.terminate() # Send SIGTERM
await process.wait() # Wait for process to exit
stderr_output = await process.stderr.read()
elif process and process.returncode != 0:
# If FFmpeg exited with an error code
stderr_output = await process.stderr.read()