diff --git a/backend/src/routers/signvideo.py b/backend/src/routers/signvideo.py index a9ce4f9..3608c79 100644 --- a/backend/src/routers/signvideo.py +++ b/backend/src/routers/signvideo.py @@ -1,3 +1,4 @@ +import asyncio import base64 import datetime import io @@ -66,7 +67,8 @@ async def sign_video( f.write(video.file.read()) command = ['ffmpeg', '-y', '-i', settings.DATA_PATH + "/" + video.filename + ".test", '-c:v', 'libx264', '-c:a', 'aac', '-strict', '-2', '-b:a', '192k', '-c:a', 'aac', '-strict', '-2', '-b:a', '192k', settings.DATA_PATH + "/" + video.filename] - subprocess.run(command, check=True) + process = await asyncio.create_subprocess_exec(*command) + await process.wait() # delete the temporary file os.remove(settings.DATA_PATH + "/" + video.filename + ".test")