aboutsummaryrefslogtreecommitdiff
path: root/video2story/cutter.py
diff options
context:
space:
mode:
Diffstat (limited to 'video2story/cutter.py')
-rw-r--r--video2story/cutter.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/video2story/cutter.py b/video2story/cutter.py
index 23f035e..0a83ad1 100644
--- a/video2story/cutter.py
+++ b/video2story/cutter.py
@@ -5,15 +5,15 @@ from subprocess import Popen
5 5
6def cut( 6def cut(
7 filename: str, 7 filename: str,
8 output: str, 8 output_dir: str,
9 duration: int, 9 duration: int,
10 no_sound: bool, 10 no_sound: bool,
11 start: int | None, 11 start: int | None,
12 end: int | None, 12 end: int | None,
13) -> None: 13) -> None:
14 if not exists(output): 14 if not exists(output_dir):
15 makedirs(output) 15 makedirs(output_dir)
16 elif not isdir(output): 16 elif not isdir(output_dir):
17 print("Output is not a directory") 17 print("Output is not a directory")
18 exit(1) 18 exit(1)
19 process = Popen( 19 process = Popen(
@@ -40,7 +40,7 @@ def cut(
40 *("-reset_timestamps", "1"), 40 *("-reset_timestamps", "1"),
41 *("-force_key_frames", f"expr:gte(t,n_forced*{duration})"), 41 *("-force_key_frames", f"expr:gte(t,n_forced*{duration})"),
42 # Output 42 # Output
43 join(output, "%d.mp4"), 43 join(output_dir, "%d.mp4"),
44 ] 44 ]
45 ) 45 )
46 46