Fix issue with start_time=0

This commit is contained in:
Karl Kroening 2018-01-07 23:26:53 -08:00
parent 5b813cdecf
commit 338a1286f7
2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ from .nodes import (
get_stream_spec_nodes,
FilterNode,
GlobalNode,
InputNode,
InputNode,
OutputNode,
output_operator,
)
@ -31,7 +31,7 @@ def _convert_kwargs_to_cmd_line_args(kwargs):
for k in sorted(kwargs.keys()):
v = kwargs[k]
args.append('-{}'.format(k))
if v:
if v is not None:
args.append('{}'.format(v))
return args

View File

@ -291,6 +291,11 @@ def test_merge_outputs():
]
def test__input__start_time():
assert ffmpeg.input('in', ss=10.5).output('out').get_args() == ['-ss', '10.5', '-i', 'in', 'out']
assert ffmpeg.input('in', ss=0.0).output('out').get_args() == ['-ss', '0.0', '-i', 'in', 'out']
def test_multi_passthrough():
out1 = ffmpeg.input('in1.mp4').output('out1.mp4')
out2 = ffmpeg.input('in2.mp4').output('out2.mp4')