@@ -103,7 +103,7 @@ def invoke_scenedetect(
103
103
if config_file :
104
104
command += " -c %s" % config_file
105
105
command += " " + args .format (** value_dict )
106
- return subprocess .call (command .strip ().split (" " ))
106
+ return subprocess .call (command .strip ().split (" " ), shell = True )
107
107
108
108
109
109
def test_cli_no_args ():
@@ -172,6 +172,7 @@ def test_cli_time_end():
172
172
+ ["-i" , DEFAULT_VIDEO_PATH , "-m" , "0" , "detect-content" , "list-scenes" , "-n" ]
173
173
+ test_case .split (),
174
174
text = True ,
175
+ shell = True ,
175
176
)
176
177
assert EXPECTED in output , test_case
177
178
@@ -200,6 +201,7 @@ def test_cli_time_start():
200
201
+ ["-i" , DEFAULT_VIDEO_PATH , "-m" , "0" , "detect-content" , "list-scenes" , "-n" ]
201
202
+ test_case .split (),
202
203
text = True ,
204
+ shell = True ,
203
205
)
204
206
assert EXPECTED in output , test_case
205
207
@@ -245,6 +247,7 @@ def test_cli_time_scene_boundary():
245
247
+ ["-i" , DEFAULT_VIDEO_PATH , "-m" , "0" , "detect-content" , "list-scenes" , "-n" ]
246
248
+ test_case .split (),
247
249
text = True ,
250
+ shell = True ,
248
251
)
249
252
assert EXPECTED in output , test_case
250
253
@@ -256,6 +259,7 @@ def test_cli_time_end_of_video():
256
259
SCENEDETECT_CMD .split (" " )
257
260
+ ["-i" , DEFAULT_VIDEO_PATH , "detect-content" , "list-scenes" , "-n" , "time" , "-s" , "1872" ],
258
261
text = True ,
262
+ shell = True ,
259
263
)
260
264
assert (
261
265
"""
@@ -408,7 +412,13 @@ def test_cli_split_video_ffmpeg(tmp_path: Path):
408
412
" "
409
413
)
410
414
command .append (DEFAULT_FFMPEG_ARGS )
411
- assert subprocess .call (command ) == 0
415
+ assert (
416
+ subprocess .call (
417
+ command ,
418
+ shell = True ,
419
+ )
420
+ == 0
421
+ )
412
422
entries = sorted (tmp_path .glob (f"{ DEFAULT_VIDEO_NAME } -Scene-*" ))
413
423
assert len (entries ) == DEFAULT_NUM_SCENES , entries
414
424
[entry .unlink () for entry in entries ]
@@ -424,7 +434,13 @@ def test_cli_split_video_ffmpeg(tmp_path: Path):
424
434
[entry .unlink () for entry in entries ]
425
435
426
436
command += ["-f" , "abc$VIDEO_NAME-123$SCENE_NUMBER" ]
427
- assert subprocess .call (command ) == 0
437
+ assert (
438
+ subprocess .call (
439
+ command ,
440
+ shell = True ,
441
+ )
442
+ == 0
443
+ )
428
444
entries = sorted (tmp_path .glob (f"abc{ DEFAULT_VIDEO_NAME } -123*" ))
429
445
assert len (entries ) == DEFAULT_NUM_SCENES , entries
430
446
[entry .unlink () for entry in entries ]
@@ -673,6 +689,7 @@ def test_cli_load_scenes_with_time_frames():
673
689
"list-scenes" ,
674
690
],
675
691
text = True ,
692
+ shell = True ,
676
693
)
677
694
assert (
678
695
"""
@@ -715,6 +732,7 @@ def test_cli_load_scenes_round_trip():
715
732
"400" ,
716
733
],
717
734
text = True ,
735
+ shell = True ,
718
736
)
719
737
loaded_first_pass = subprocess .check_output (
720
738
SCENEDETECT_CMD .split (" " )
@@ -734,6 +752,7 @@ def test_cli_load_scenes_round_trip():
734
752
"testout2.csv" ,
735
753
],
736
754
text = True ,
755
+ shell = True ,
737
756
)
738
757
SPLIT_POINT = " | Scene # | Start Frame | Start Time | End Frame | End Time |"
739
758
assert ground_truth .split (SPLIT_POINT )[1 ] == loaded_first_pass .split (SPLIT_POINT )[1 ]
0 commit comments