From 6950f75d264f1a80fc84d6f1a27e93e52352836a Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 28 Oct 2026 22:02:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(copy):=20--overwrite=20=E7=8E=B0=E5=9C=A8?= =?UTF-8?q?=E7=9C=9F=E7=9A=84=E7=94=9F=E6=95=88=20=E2=80=94=E2=80=94=20?= =?UTF-8?q?=E5=B7=B2=E6=98=AF=20HEVC=20hvc1=20=E4=BD=86=E9=9F=B3=E8=BD=A8?= =?UTF-8?q?=E9=9D=9E=20AAC=20=E6=97=B6=E9=87=8D=E5=B0=81=E9=9F=B3=E8=BD=A8?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AF=20SKIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --overwrite 从加进 argparse 起就没被读过(只在 help 里)。控制面换了规则之后需要一个 「视频没问题、这条仍要跑」的开关:kind="audio" 的行(hevc + ac3/mp3/pcm)在 copy 挡位 只能被 SKIP,结果是控制面把行标成 done 而音轨一条没动。 audio_only_remux = args.overwrite and acodec not in (aac, mp4a, "") → 不吃 already_hevc 的 SKIP,走正常 copy 流程;实测输出 video md5 与源逐位相同、audio 转成 aac。 --- scripts/library_run.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/library_run.py b/scripts/library_run.py index 05f54fb..7ea9f80 100644 --- a/scripts/library_run.py +++ b/scripts/library_run.py @@ -1295,8 +1295,19 @@ def process(src, args, dest=None, origin=None): live = dest or dst_path_for(src, container) redo_playable = False # True once we know this run is re-doing a file that ALREADY plays + # A row the control plane queued as `kind="audio"`: the VIDEO is already what we ship, only the + # audio track is not AAC. The product promise is HEVC(hvc1) + AAC, so that row has real work to + # do - and the copy tier's answer ("SKIP already HEVC hvc1") is exactly wrong for it. `--overwrite` + # is how the control plane says "the video is fine but this file still needs the run"; without it + # 3 rows were filed as `done` with their AC3/MP3/PCM tracks untouched (measured 2026-10-28 on + # Z:\Temporary\短视频\_io-test, docs of hevc-transcode §10.149). + audio_only_remux = bool(getattr(args, "overwrite", False)) \ + and (info.get("acodec") or "") not in ("aac", "mp4a", "") + if audio_only_remux: + log(" audio-only run: video is %s %s, audio is %s -> re-muxing the audio to AAC" + % (info["vcodec"], info["tag"], info["acodec"])) if already_hevc(src, info, container) and info["pix"] in ("yuv420p",) \ - and not T.unusable_timeline(info, src)[0]: + and not T.unusable_timeline(info, src)[0] and not audio_only_remux: # Already converted. Only worth touching if the ORIGINAL is available and the current # file is BIGGER than it: that is precisely the old settings' damage (a fixed cq27 above # the source's own quality plus a fixed 256k audio). A file that is already smaller than