Trying to fix blocking process
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user