跳到正文
DEV Community· zr9959·· 3 小時前AI 評分46

auto-xhs 驗證器只檢查檔案、不檢查影格:首位外部用戶指出關鍵差異

Our validator checked files, not frames — the first external user taught us the difference

AI 導讀

auto-xhs 首位外部用戶 axiom3356 發現驗證器只檢查影片檔案、未檢查影格,並報告空白畫面、低位元率和註釋卡重疊三項問題。項目加入每 0.5 秒抽查影格及低於 2000 kb/s 的警告,並為組裝器設定位元率 target 3M、cap 4M;卡片重疊則以模板規則預防,兩項新增檢查均只發出警告。

正文

zr9959

auto-xhs is an open-source system that lets an AI agent (Muse, Dots, or Grok Bot) run a Xiaohongshu account end to end: research, writing, video production, posting, and replying to comments. It works through the browser like a person would — no unofficial APIs. I open-sourced it on Oct 14.

On the same day, a user in Vietnam, axiom3356, ran the pipeline as-is, measured the output videos, and filed issue #1: three reproducible visual flaws that our validator, validate.py, had not caught. Not one of them.

The three flaws:

  1. At a scene change, the picture goes almost blank for about 2 seconds. Cards in the new scene appear one by one, and before the first one lands, there is nothing on screen.
  2. The finished video came out at 585 kb/s. For 1080p that is far too low — edges smear. 2 Mb/s is the floor anyone recommends.
  3. Two annotation cards in the same area, entering with different delays, can overlap each other.

His root-cause note was the part that stung: the validator checked the file — duration, resolution, word counts, silence gaps — but never looked at a single frame.

What we changed, all of it credited to his report:

  • Blank frames are now a check. Every 0.5 seconds we grab a frame, shrink it to a small grayscale image, and ask whether it is nearly one flat color. Two seconds of that in a row raises a warning with the rough position. Only ffmpeg and the Python standard library.
  • Low bitrate is now a check. Below 2000 kb/s the validator warns. Our own weather example, rendered with the old settings, is 844 kb/s — it gets warned too, and that warning is correct.
  • The assembler got a bitrate floor: target 3M, cap 4M. A small trap here: we had -crf 21 and -b:v set together, and in that combination ffmpeg follows crf and the bitrate target is ignored. Dropping crf fixed it.
  • The overlapping cards are NOT a machine check, and I want to be plain about why. A frame is pixels. Pixels cannot tell a full-bleed background (fine) from a card cropped by the frame edge (broken). A check built on that would cry wolf every day. So instead the template rules now say: one delayed entrance per area, and cards sharing an area go into a layout container. Prevention, not detection.

Both new checks are warn-only. A warning respects the person running the pipeline; a hard error from a check that can misfire does not.

The issue is still open, on purpose. If axiom3356 sends a PR, his gets reviewed first and used first — he found the problems and proposed the checks.

If you run it and your videos look wrong in a way the validator misses, that is exactly the report I want. And if you have content that repeats daily — weather, a digest, a ranking — playbooks live in scenarios/ and new ones are welcome.

Repo: https://github.com/zr9959/auto-xhs

來源:DEV Community · dev.to