This commit is contained in:
Markos Gogoulos
2025-05-21 16:11:47 +03:00
parent 9b8c860b46
commit cb6004ce15
2 changed files with 8 additions and 4 deletions
+2
View File
@@ -420,6 +420,8 @@ def kill_ffmpeg_process(filepath):
Returns:
subprocess.CompletedProcess: Result of the kill command
"""
if not filepath:
return False
cmd = "ps aux|grep 'ffmpeg'|grep %s|grep -v grep |awk '{print $2}'" % filepath
result = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True)
pid = result.stdout.decode("utf-8").strip()