FIX 修复ffmpeg调用
This commit is contained in:
parent
7ba2931b0d
commit
c798e90b56
|
|
@ -284,21 +284,11 @@ class VideoChangeFPS:
|
||||||
"copy",
|
"copy",
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
try:
|
print(ff.cmd)
|
||||||
print(ff.cmd)
|
with open("user/ffmpeg.txt", "a") as log:
|
||||||
with open("user/ffmpeg.txt", "a") as log:
|
log.write("\n----"+f"{datetime.now()}----\n"+ff.cmd+"\n========\n")
|
||||||
log.write("\n----"+f"{datetime.now()}----\n"+ff.cmd+"\n========\n")
|
with open("user/ffmpeg.txt", "a") as log:
|
||||||
process = subprocess.Popen(
|
ff.run(stdout=log, stderr=log)
|
||||||
ff.cmd, stdout=log, stderr=log
|
|
||||||
)
|
|
||||||
except OSError as e:
|
|
||||||
if e.errno == errno.ENOENT:
|
|
||||||
raise FFExecutableNotFoundError(f"Executable '{ff.executable}' not found")
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
o_stdout, o_stderr = process.communicate()
|
|
||||||
if process.returncode != 0:
|
|
||||||
raise FFRuntimeError(ff.cmd, process.returncode, o_stdout, o_stderr)
|
|
||||||
return (output,)
|
return (output,)
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue