8000 Fix issue with start_time=0 · Powercoder64/ffmpeg-python@338a128 · GitHub
[go: up one dir, main page]

Skip to content

Commit 338a128

Browse files
committed
Fix issue with start_time=0
1 parent 5b813cd commit 338a128

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ffmpeg/_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
get_stream_spec_nodes,
1717
FilterNode,
1818
GlobalNode,
19-
InputNode,
19+
InputNode,
2020
OutputNode,
2121
output_operator,
2222
)
@@ -31,7 +31,7 @@ def _convert_kwargs_to_cmd_line_args(kwargs):
3131
for k in sorted(kwargs.keys()):
3232
v = kwargs[k]
3333
args.append('-{}'.format(k))
34-
if v:
34+
if v is not None:
3535
args.append('{}'.format(v))
3636
return args
3737

ffmpeg/tests/test_ffmpeg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ def test_merge_outputs():
291291
]
292292

293293

294+
def test__input__start_time():
295+
assert ffmpeg.input('in', ss=10.5).output('out').get_args() == ['-ss', '10.5', '-i', 'in', 'out']
296+
assert ffmpeg.input('in', ss=0.0).output('out').get_args() == ['-ss', '0.0', '-i', 'in', 'out']
297+
298+
294299
def test_multi_passthrough():
295300
out1 = ffmpeg.input('in1.mp4').output('out1.mp4')
296301
out2 = ffmpeg.input('in2.mp4').output('out2.mp4')

0 commit comments

Comments
 (0)
0