rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:lijianbin2/dsh-subtitle-remover
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DSH Web UI plugin with a left-sidebar entry for video-subtitle-remover: pick a video, see a frame, mark one or more subtitle regions on it (or let the engine propose them), then run the job — or the whole automatic path — without leaving the Harness window.
Get video-subtitle-remover
working on the same machine: models downloaded, its config/config.json in
place, and a Python environment with torch / paddle / cv2 installed.
Clone this repository somewhere stable. Auto-detection covers these layouts — the
engine (vsr) and its environment (vsr-env) either inside the plugin folder or
next to it / its plugins/ parent:
<repo>/engine/vsr <dir>/vsr <parent>/vsr
<repo>/engine/vsr-env <dir>/vsr-env <parent>/vsr-env
<repo> ← or <dir>/dsh-subtitle-remover
cd <dir> # or <parent>\plugins
git clone https://github.com/lijianbin2/dsh-subtitle-remover
With any of these nothing needs configuring — the page's installer uses the
engine/ layout by default. Any other layout works too — set vsrRoot /
pythonPath (see Configuration), or use the panel to point at it.
Add it to DSH: on the Plugins page add this folder, or call the plugin
manager's install_bundle with its absolute path.
Open the left sidebar entry 字幕擦除 / Subtitle Remover.
The engine itself is a separate Apache-2.0 project; this plugin only spawns it and never bundles its code or models.
The editor: frame preview with the start/end processing range, drag-drawn regions, and the detection/model controls.

A finished job: the live before/after comparison strip kept from processing, per-job metadata with the processing range, and the open-file actions.

字幕擦除 / Subtitle Remover in the global panel list
(sidebar.panellist), with a small pulse while a job runs.main panel keyed by subtitle-remover) with:ffprobe readout (resolution, fps, frame count, duration),The Host half spawns the runners in runner/ with the local checkout's
interpreter. Both print one JSON event per line on a private channel
(@@VSR@@ {...}) while every engine/tqdm/paddle print goes to stderr:
vsr_runner.py removes subtitles (one --area per marked region),vsr_detect.py samples frames, clusters the detected text boxes into bands and
reports them as percentages. Bands are ranked by width, horizontal centring and
frame hits, so HUD text in a corner (ammo counters, kill feeds, minimaps) loses
against the wide, centred subtitle line.The page polls these over /dsh-subtitle-remover/api/* (registered on the
Harness webServer, same origin, loopback + same-origin checked):
| Route | Purpose |
|---|---|
GET /state |
environment verdict, jobs, running detection |
GET /jobs, GET /jobs/<id> |
job list / one job with its log |
POST /jobs, POST /jobs/<id>/cancel, POST /jobs/<id>/remove |
job lifecycle |
GET /browse?path= |
directory listing for the pickers |
GET /probe?path= |
video metadata via ffprobe |
GET /frame?path=&t= |
one JPEG preview frame via ffmpeg |
GET /jobs/<id>/preview/left\|right |
live before/after comparison frame |
POST /jobs/<id>/open |
open the output file or its folder with the OS handler |
GET /models |
DSH model catalogue plus the current DSH selection |
POST /detect, GET /detect/<id>, POST /detect/<id>/cancel |
automatic region detection (optionally model-reviewed) |
Precedence: the folder saved from the page, then the config below, then automatic detection.
~, ~/Documents,
~/projects, and the working directory for a checkout of
video-subtitle-remover with its virtualenv.配置引擎 in the page and pick the engine folder (and the
interpreter if it is somewhere unusual). The choice is stored in
<DSH_HOME>/data/dsh-subtitle-remover/settings.json, so it survives plugin
upgrades and needs no profile editing.自动 picks CUDA when an NVIDIA GPU is
found, otherwise CPU). The target defaults to engine/video-subtitle-remover
inside the plugin folder and is editable/pickable. It needs git and Python
3.10+ on PATH and downloads several GB. Model files are not in the engine
repository: install the engine, then copy backend/models from a
video-subtitle-remover release archive (or an existing install) into the cloned
folder — the panel says exactly which files are missing.All keys are optional; the plugin auto-detects the checkout and its interpreter
first (<workspace>/vsr, <workspace>/vsr-env/Scripts/python.exe).
- id: dsh-subtitle-remover
name: dsh-subtitle-remover
config:
vsrRoot: 'D:\tools\video-subtitle-remover' # directory containing backend/main.py
pythonPath: 'D:\tools\vsr-env\Scripts\python.exe'
ffmpegPath: 'C:\ffmpeg\bin\ffmpeg.exe' # preview frames; the checkout's bundled copy is used otherwise
ffprobePath: 'C:\ffmpeg\bin\ffprobe.exe' # only for the info readout
defaultDir: 'D:\videos'
defaultMode: 'sttn-auto'
defaultDetect: 'server' # or 'mobile'
config/config.json present).ffmpeg for the preview frame (the checkout ships one, so this normally works
out of the box) and ffprobe for the metadata readout.Two integration checks drive the real Host half through a stub Cordis context and real engine runs. Each uses its own temp output directory and removes it again.
node test/host-api.test.mjs # routing, gates, browse/probe/frame, detection, model decision, range, preview, open (~5 min)
node test/cancel.test.mjs # cancel a running job, partial output cleanup (~40 s)
test/fixtures/ holds two tiny synthetic clips; they are test-only and not part
of the shipped files list. host-api.test.mjs points DSH_HOME at a temp folder,
so it never touches the engine settings of the machine that runs it.
409 until the current job finishes or is cancelled.D:\clip_no_sub.mp4).clip_no_sub (2).mp4, (3), … instead. The job log
records the rename.gui_mode +
update_preview_with_comp) and are throttled to two JPEGs per ~0.5 s at 640 px.
Frames outside the processing range are skipped because they would look identical.POST /jobs/<id>/open uses explorer.exe on Windows (/select, for the folder),
open -R on macOS and xdg-open elsewhere. It only ever opens that job's own
output path.The HTTP surface is registered on the GUI's own origin and answers only loopback
requests whose Host is loopback and whose Origin, when present, matches the
GUI. The image routes (/frame, /jobs/<id>/preview/*) additionally refuse
cross-site embeds through Sec-Fetch-Site, because an <img> on another local
page would otherwise be able to display arbitrary local pictures. The
/jobs/<id>/open route only ever opens that job's own output path — it never
accepts a caller-supplied path. There is no authentication beyond the desktop
app's own renderer credential gate, so never expose the GUI port to other
machines.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。