From a036b400d26e166798251bf744c54d693c63801c Mon Sep 17 00:00:00 2001 From: FlintyLemming Date: Sat, 28 Feb 2026 10:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(av1-transfer):=20use=20setproc?= =?UTF-8?q?title=20to=20rename=20Python=20main=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- av1-transfer/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/av1-transfer/main.py b/av1-transfer/main.py index dcac2dc..af7de67 100644 --- a/av1-transfer/main.py +++ b/av1-transfer/main.py @@ -8,7 +8,7 @@ AV1 视频批量转码脚本 -i, --input 输入目录路径(必需) -o, --output 输出目录路径(必需) -w, --workers 并行任务数,默认为 4 - -n, --process-name ffmpeg 进程别名(混淆进程名,等效于 exec -a <别名> ffmpeg) + -n, --process-name 进程别名(同时重命名 Python 主进程和 ffmpeg 子进程) 示例: python main.py -i /path/to/input -o /path/to/output @@ -23,6 +23,7 @@ import subprocess from concurrent.futures import ThreadPoolExecutor, as_completed from pathlib import Path +import setproctitle from tqdm import tqdm # ================= 配置区域 ================= @@ -202,6 +203,7 @@ def main(): print(f"共发现 {len(tasks)} 个文件,准备使用 {max_workers} 个并行任务进行转码...") if process_name: + setproctitle.setproctitle(process_name) print(f"进程别名: {process_name}") # 初始化进度条