修正: 單支影片也輸出到 no_redlight 子資料夾
啟動.bat 只勾選一支影片時走單檔模式,原本會把成品/CSV 放到影片同層, 與多支/整資料夾(輸出到 no_redlight)不一致。改為單檔(未指定 -o)時 同樣輸出到來源同層的 no_redlight,行為統一。 本次修正由 Claude Opus 4.8 (1M context) 協助處理。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1170,10 +1170,16 @@ def main():
|
|||||||
else:
|
else:
|
||||||
videos = [in_path]
|
videos = [in_path]
|
||||||
if args.output and os.path.splitext(args.output)[1]:
|
if args.output and os.path.splitext(args.output)[1]:
|
||||||
|
# -o 指定了含副檔名的完整輸出檔名 → 照用
|
||||||
single_named_output = args.output
|
single_named_output = args.output
|
||||||
out_dir = os.path.dirname(os.path.abspath(args.output)) or "."
|
out_dir = os.path.dirname(os.path.abspath(args.output)) or "."
|
||||||
|
elif args.output:
|
||||||
|
# -o 指定了資料夾
|
||||||
|
out_dir = args.output
|
||||||
else:
|
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 後就結束(僅單一輸入支援)---
|
# --- preview 模式: 確認 ROI 後就結束(僅單一輸入支援)---
|
||||||
if args.preview:
|
if args.preview:
|
||||||
|
|||||||
Reference in New Issue
Block a user