mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #646 from ynput/bugfix/burnin-script-shell
Chore: Burnin script shell execution
This commit is contained in:
commit
3d0a35d7ad
1 changed files with 12 additions and 2 deletions
|
|
@ -14,9 +14,10 @@ from ayon_core.lib import (
|
||||||
convert_ffprobe_fps_value,
|
convert_ffprobe_fps_value,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FFMPEG_EXE_COMMAND = subprocess.list2cmdline(get_ffmpeg_tool_args("ffmpeg"))
|
||||||
FFMPEG = (
|
FFMPEG = (
|
||||||
'{}%(input_args)s -i "%(input)s" %(filters)s %(args)s%(output)s'
|
'{}%(input_args)s -i "%(input)s" %(filters)s %(args)s%(output)s'
|
||||||
).format(subprocess.list2cmdline(get_ffmpeg_tool_args("ffmpeg")))
|
).format(FFMPEG_EXE_COMMAND)
|
||||||
|
|
||||||
DRAWTEXT = (
|
DRAWTEXT = (
|
||||||
"drawtext@'%(label)s'=fontfile='%(font)s':text=\\'%(text)s\\':"
|
"drawtext@'%(label)s'=fontfile='%(font)s':text=\\'%(text)s\\':"
|
||||||
|
|
@ -482,10 +483,19 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins):
|
||||||
)
|
)
|
||||||
print("Launching command: {}".format(command))
|
print("Launching command: {}".format(command))
|
||||||
|
|
||||||
|
use_shell = True
|
||||||
|
try:
|
||||||
|
test_proc = subprocess.Popen(
|
||||||
|
f"{FFMPEG_EXE_COMMAND} --help", shell=True
|
||||||
|
)
|
||||||
|
test_proc.wait()
|
||||||
|
except BaseException:
|
||||||
|
use_shell = False
|
||||||
|
|
||||||
kwargs = {
|
kwargs = {
|
||||||
"stdout": subprocess.PIPE,
|
"stdout": subprocess.PIPE,
|
||||||
"stderr": subprocess.PIPE,
|
"stderr": subprocess.PIPE,
|
||||||
"shell": True,
|
"shell": use_shell,
|
||||||
}
|
}
|
||||||
proc = subprocess.Popen(command, **kwargs)
|
proc = subprocess.Popen(command, **kwargs)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue