@@ -101,7 +101,7 @@ def test_stream_repr():
101101
102102def test_get_args_simple ():
103103 out_file = ffmpeg .input ('dummy.mp4' ).output ('dummy2.mp4' )
104- assert out_file .get_args () == ['-i' , 'dummy.mp4' , 'dummy2.mp4' ]
104+ assert out_file .get_args () == ['-i' , 'dummy.mp4' , 'dummy2.mp4' , '-y' ]
105105
106106
107107def _get_complex_filter_example ():
@@ -122,7 +122,6 @@ def _get_complex_filter_example():
122122 .overlay (overlay_file .hflip ())
123123 .drawbox (50 , 50 , 120 , 120 , color = 'red' , thickness = 5 )
124124 .output (TEST_OUTPUT_FILE1 )
125- .overwrite_output ()
126125 )
127126
128127
@@ -156,7 +155,7 @@ def _get_drawtext_font_repr(font):
156155 .get_args ()
157156 )
158157 assert args [:3 ] == ['-i' , 'in' , '-filter_complex' ]
159- assert args [4 :] == ['-map' , '[s0]' , 'out' ]
158+ assert args [4 :] == ['-map' , '[s0]' , 'out' , '-y' ]
160159 match = re .match (r'\[0\]drawtext=font=a((.|\n)*)b:text=test\[s0\]' , args [3 ], re .MULTILINE )
161160 assert match is not None , 'Invalid -filter_complex arg: {!r}' .format (args [3 ])
162161 return match .group (1 )
@@ -190,7 +189,7 @@ def _get_drawtext_text_repr(text):
190189 .get_args ()
191190 )
192191 assert args [:3 ] == ['-i' , 'in' , '-filter_complex' ]
193- assert args [4 :] == ['-map' , '[s0]' , 'out' ]
192+ assert args [4 :] == ['-map' , '[s0]' , 'out' , '-y' ]
194193 match = re .match (r'\[0\]drawtext=text=a((.|\n)*)b\[s0\]' , args [3 ], re .MULTILINE )
195194 assert match is not None , 'Invalid -filter_complex arg: {!r}' .format (args [3 ])
196195 return match .group (1 )
@@ -226,7 +225,7 @@ def test_run_multi_output():
226225 in_ = ffmpeg .input (TEST_INPUT_FILE1 )
227226 out1 = in_ .output (TEST_OUTPUT_FILE1 )
228227 out2 = in_ .output (TEST_OUTPUT_FILE2 )
229- ffmpeg .run ([out1 , out2 ], overwrite_output = True )
228+ ffmpeg .run ([out1 , out2 ])
230229
231230
232231def test_run_dummy_cmd ():
@@ -253,7 +252,8 @@ def test_custom_filter():
253252 '-i' , 'dummy.mp4' ,
254253 '-filter_complex' , '[0]custom_filter=a:b:kwarg1=c[s0]' ,
255254 '-map' , '[s0]' ,
256- 'dummy2.mp4'
255+ 'dummy2.mp4' ,
256+ '-y' ,
257257 ]
258258
259259
@@ -267,7 +267,8 @@ def test_custom_filter_fluent():
267267 '-i' , 'dummy.mp4' ,
268268 '-filter_complex' , '[0]custom_filter=a:b:kwarg1=c[s0]' ,
269269 '-map' , '[s0]' ,
270- 'dummy2.mp4'
270+ 'dummy2.mp4' ,
271+ '-y' ,
271272 ]
272273
273274
@@ -276,10 +277,10 @@ def test_merge_outputs():
276277 out1 = in_ .output ('out1.mp4' )
277278 out2 = in_ .output ('out2.mp4' )
278279 assert ffmpeg .merge_outputs (out1 , out2 ).get_args () == [
279- '-i' , 'in.mp4' , 'out1.mp4' , 'out2.mp4'
280+ '-i' , 'in.mp4' , 'out1.mp4' , 'out2.mp4' , '-y'
280281 ]
281282 assert ffmpeg .get_args ([out1 , out2 ]) == [
282- '-i' , 'in.mp4' , 'out2.mp4' , 'out1.mp4'
283+ '-i' , 'in.mp4' , 'out2.mp4' , 'out1.mp4' , '-y'
283284 ]
284285
285286
@@ -292,14 +293,16 @@ def test_multi_passthrough():
292293 '-i' , 'in2.mp4' ,
293294 'out1.mp4' ,
294295 '-map' , '[1]' , # FIXME: this should not be here (see #23)
295- 'out2.mp4'
296+ 'out2.mp4' ,
297+ '-y' ,
296298 ]
297299 assert ffmpeg .get_args ([out1 , out2 ]) == [
298300 '-i' , 'in2.mp4' ,
299301 '-i' , 'in1.mp4' ,
300302 'out2.mp4' ,
301303 '-map' , '[1]' , # FIXME: this should not be here (see #23)
302- 'out1.mp4'
304+ 'out1.mp4' ,
305+ '-y' ,
303306 ]
304307
305308
@@ -327,7 +330,8 @@ def test_pipe():
327330 '[0]trim=start_frame=2[s0]' ,
328331 '-map' , '[s0]' ,
329332 '-f' , 'rawvideo' ,
330- 'pipe:1'
333+ 'pipe:1' ,
334+ '-y' ,
331335 ]
332336
333337 cmd = ['ffmpeg' ] + args
0 commit comments