mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-04-05 04:22:51 +08:00
Merge 3778b3a9bf31d42d8154b6e60d7a230b3ffadde0 into df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6
This commit is contained in:
commit
8b9b29f9f5
@ -3,6 +3,7 @@ from .dag import get_outgoing_edges, topo_sort
|
|||||||
from ._utils import basestring, convert_kwargs_to_cmd_line_args
|
from ._utils import basestring, convert_kwargs_to_cmd_line_args
|
||||||
from builtins import str
|
from builtins import str
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
from shlex import quote
|
||||||
import copy
|
import copy
|
||||||
import operator
|
import operator
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -44,7 +45,7 @@ def _get_input_args(input_node):
|
|||||||
if video_size:
|
if video_size:
|
||||||
args += ['-video_size', '{}x{}'.format(video_size[0], video_size[1])]
|
args += ['-video_size', '{}x{}'.format(video_size[0], video_size[1])]
|
||||||
args += convert_kwargs_to_cmd_line_args(kwargs)
|
args += convert_kwargs_to_cmd_line_args(kwargs)
|
||||||
args += ['-i', filename]
|
args += ['-i', quote(filename)]
|
||||||
else:
|
else:
|
||||||
raise ValueError('Unsupported input node: {}'.format(input_node))
|
raise ValueError('Unsupported input node: {}'.format(input_node))
|
||||||
return args
|
return args
|
||||||
@ -144,7 +145,7 @@ def _get_output_args(node, stream_name_map):
|
|||||||
video_size = '{}x{}'.format(video_size[0], video_size[1])
|
video_size = '{}x{}'.format(video_size[0], video_size[1])
|
||||||
args += ['-video_size', video_size]
|
args += ['-video_size', video_size]
|
||||||
args += convert_kwargs_to_cmd_line_args(kwargs)
|
args += convert_kwargs_to_cmd_line_args(kwargs)
|
||||||
args += [filename]
|
args += [quote(filename)]
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user