diff --git a/src/main.py b/src/main.py index 8391bd9..20c326b 100644 --- a/src/main.py +++ b/src/main.py @@ -13,6 +13,7 @@ def main(): ) parser.add_argument( "input_file", + nargs='?', help="Path to the input video file.", type=str ) @@ -25,7 +26,13 @@ def main(): args = parser.parse_args() - input_file_path = os.path.abspath(args.input_file) + input_file_path = args.input_file + while not input_file_path: + input_file_path = input("Please enter the path to the input video file: ").strip() + if not input_file_path: + print("Input file path cannot be empty. Please try again.", file=sys.stderr) + + input_file_path = os.path.abspath(input_file_path) if not os.path.exists(input_file_path): print(f"Error: Input file not found at '{input_file_path}'", file=sys.stderr)