FIX 修复ffmpeg调用
This commit is contained in:
parent
7ba2931b0d
commit
c798e90b56
|
|
@ -284,21 +284,11 @@ class VideoChangeFPS:
|
|||
"copy",
|
||||
]
|
||||
})
|
||||
try:
|
||||
print(ff.cmd)
|
||||
with open("user/ffmpeg.txt", "a") as log:
|
||||
log.write("\n----"+f"{datetime.now()}----\n"+ff.cmd+"\n========\n")
|
||||
process = subprocess.Popen(
|
||||
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)
|
||||
print(ff.cmd)
|
||||
with open("user/ffmpeg.txt", "a") as log:
|
||||
log.write("\n----"+f"{datetime.now()}----\n"+ff.cmd+"\n========\n")
|
||||
with open("user/ffmpeg.txt", "a") as log:
|
||||
ff.run(stdout=log, stderr=log)
|
||||
return (output,)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
|
|
|||
Loading…
Reference in New Issue