diff --git a/auto_remove_redlight.py b/auto_remove_redlight.py index fce8e50..1a44e31 100644 --- a/auto_remove_redlight.py +++ b/auto_remove_redlight.py @@ -1170,10 +1170,16 @@ def main(): else: videos = [in_path] if args.output and os.path.splitext(args.output)[1]: + # -o 指定了含副檔名的完整輸出檔名 → 照用 single_named_output = args.output out_dir = os.path.dirname(os.path.abspath(args.output)) or "." + elif args.output: + # -o 指定了資料夾 + out_dir = args.output else: - out_dir = args.output if args.output else os.path.dirname(os.path.abspath(in_path)) + # 預設: 與多支/整資料夾一致,放到來源同層的 no_redlight\ 子資料夾 + out_dir = os.path.join(os.path.dirname(os.path.abspath(in_path)), + OUTPUT_SUBDIR) # --- preview 模式: 確認 ROI 後就結束(僅單一輸入支援)--- if args.preview: