huashu-design
alchaincyf
Huashu Design 3.0 · 在 agent 里打一句话,拿回能交付的设计:网页 / App 原型 / 可编辑 PPTX / 动画 / 信息图 · 六个候选挑三个方向 · 84 种带样张的风格库 · 越用越懂你的外观账本与设计体检 · HTML-native design skill for Claude Code, Codex, Cursor & any agent
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:a-mochis/dsh-video-merger
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Merge every folder's videos into one file — without changing the video spec.
A DeepSeek Harness plugin that scans a folder tree, groups the videos by folder, and writes one merged video per folder. It picks the cheapest safe path for each folder: stream copy when the clips are truly identical, timestamp-safe remux when only the container or start time differs, audio-only repair when the video matches but the audio does not, and a single-pass hardware-accelerated encode only when the streams really differ.
按文件夹合并视频:每个包含至少 2 个视频的文件夹生成一个合并文件。完全一致时 无损拼接;仅容器/时间戳不同则重封装;仅音频不同只修音频;真正规格不一致时才 单遍转码(优先 NVENC/QSV/AMF,失败自动回退 x264)。
-c copy can produce.merge_folder_videos DSH tool and a standalone
CLI, both using the same engine.ffmpeg and ffprobe for the actual merge. Put them on PATH, point the plugin
at their folder, or use the Windows auto-download.Clone this repository somewhere stable, then install the folder as a DSH bundle.
In DSH, call the plugin_manager tool:
plugin_manager install_bundle target = <absolute path to dsh-video-merger>
For example:
git clone https://github.com/a-mochis/dsh-video-merger.git
plugin_manager install_bundle target = E:\code\6-plugins\dsh-video-merger
Or download the packaged zip from the latest release, unzip it, and install the extracted folder the same way.
After installing or updating, force-refresh the Web UI (Ctrl+Shift+R). Open any
session and choose the 视频合并 / Video Merge tab in the session tab bar.
The repository also publishes a one-plugin market index. In DSH open Plugins → Discover → Index sources → Add index source and paste:
https://cdn.jsdelivr.net/gh/a-mochis/dsh-video-merger@main/market/index.json
The Video Merger card then appears in Discover and installs the same bundle. This is a personal index hosted beside the project, not an entry in the curated community catalog. See docs/marketplace.md for the release/update checklist.
The plugin has no runtime npm dependencies.
npm installis only needed for the client tests (react/react-domare dev dependencies).
1. Choose the root folder. Click 选择文件夹 / Select folder, browse into the target folder in the built-in browser, then click 选择此文件夹 / Select this folder. The path is filled back and scanned automatically.
2. Review and merge. Check the folders you want, leave 统一输出到同一个文件夹 checked to collect every result in one place (the root by default), then click 开始合并 / Start merge. Progress, speed, and the finished output are shown per folder.
merge_folder_videos root="E:\videos" recursive=true outputDir="E:\videos\merged"
| Argument | Default | Meaning |
|---|---|---|
root |
required | Root directory to scan. |
folder |
– | Merge only this folder instead of scanning root. |
recursive |
true |
Scan sub-folders. |
order |
name |
Clip order: name or mtime. |
overwrite |
false |
Overwrite an existing output instead of auto-renaming. |
reencodeFallback |
true |
Normalize folders whose clips have different specs. |
deleteSource |
false |
Delete source clips after a successful merge. |
outputDir |
– | Put every result in this folder (created if missing). |
wait |
true |
Wait for completion; false returns a job id immediately. |
node bin/merge-videos.mjs "E:\videos" --out "E:\videos\merged"
--no-recursive scan only the root folder
--folder <path> merge only this folder
--order name|mtime clip order (default: name)
--out <dir> unified output folder
--overwrite overwrite existing *_merged output
--no-reencode skip folders whose clips have mismatched specs
--delete-source delete source clips after a successful merge
--ffmpeg <dir> directory containing ffmpeg and ffprobe
--json print the final job snapshot as JSON
Exit codes: 0 all succeeded, 1 at least one failure, 2 bad arguments,
3 ffmpeg/ffprobe not found.
<folder>_merged.<original extension>.root/a/b/ becomes a_b_merged.mp4 instead of colliding with root/a/._; an empty name becomes merged.(1), (2), … unless overwrite is on.*_merged.* are ignored on the next scan, so you can safely scan
the same tree again.deleteSource / --delete-source is set.scan folders → ffprobe every clip → compare strict signatures
├─ identical streams, time base and start → concat demuxer + -c copy
├─ video identical, audio differs → copy video + encode audio
├─ streams identical, container differs → per-clip TS remux + concat copy
└─ streams really differ → single concat-filter encode
(NVENC/QSV/AMF → x264 fallback)
The copy signature is deliberately strict:
video: codec | profile | level | width | height | pixel format | fps | avg fps |
SAR | rotation | field order | colour space/primaries/transfer/range |
time base
audio: codec | profile | sample rate | channels | channel layout (or "no audio")
-f concat -safe 0 -i list -map 0:v:0 -map 0:a? -c copy.
If ffmpeg prints a non-monotonic/DTS warning (or fails), the folder is
automatically redone through the remux path.-c copy and written as MP4 with -video_track_timescale 30000.concat filter produces a single output generation;
resolution/fps come from the first clip, yuv420p, H.264/HEVC hardware
encoder when available, AAC 192 kbps. A silent track is generated only when the
target folder has audio.-progress pipe:1 -nostats (out_time_us and speed).-fflags +genpts -avoid_negative_ts make_zero was applied to -c copy, which
can make the second clip's timestamps collide with the first. The stricter
signature plus the TS-remux fallback removes that class of seams.Checked in this order:
FFMPEG_DIR, then FFMPEG_PATH.%DSH_HOME%/plugin-data/dsh-video-merger/bin (managed download).PATH.The configuration file is
%DSH_HOME%/plugin-data/dsh-video-merger/config.json ($DSH_HOME or ~/.dsh
when the variable is unset). The detection result is cached for 15 seconds.
The in-app download is Windows-only and fetches the gyan.dev "essentials" build. On macOS/Linux install ffmpeg with your package manager, for example:
brew install ffmpeg # macOS
sudo apt install ffmpeg # Debian / Ubuntu
npm install
npm run check # node --check for every runtime file
npm test # directory-listing normalization + React SSR
npm run test:merge # generates synthetic clips, merges them, asserts specs
npm run test:merge creates test/fixtures/ and test/output/ with ffmpeg
lavfi sources (two identical clips, mixed resolutions, Matroska, an apostrophe
in the file name, missing audio, and a single-clip folder). Both directories are
git-ignored; no test media is committed.
The client tests load lib/client.js through the same
window.__ModuleLoader__ wrapper the Harness uses. If React is not installed
locally, set DSH_PROFILE_PACKAGE to a DSH profile's package.json path.
See CONTRIBUTING.md for the development install flow and PR expectations.
“ffmpeg not found”. Install ffmpeg and ffprobe and put them on PATH, or set
ffmpegDir in the plugin settings / merge_folder_videos call. The Web UI shows
the resolved binary under the status card; on Windows the Download ffmpeg
button installs the official essentials build into the plugin data directory.
“No folders with at least two videos”. The scan skips single clips and
outputs ending in _merged. Pick the parent folder, not one clip's folder.
A folder shows “转码 / Transcode”. The clips really differ in resolution, frame rate, pixel format, or codec. The first clip is the target; the folder is encoded once with the concat filter. “重封装 / Remux” means only the container or start time differed and no video was re-encoded. Turn off the normalization option to make truly mixed folders fail instead.
A merge fails midway. The per-folder error is shown in the list and in the tool result. The temporary concat list and partial output are removed. Re-run with Overwrite enabled; the job is resumable per folder, not per clip.
The page shows the old UI after an update. Force-refresh with
Ctrl+Shift+R (macOS Cmd+Shift+R); a client bundle is cached per page load.
MIT © 2026 a-mochis
-c copy,无损、不重新编码。-c copy 重封装,避免接缝卡顿。merge_folder_videos 对话工具和 bin/merge-videos.mjs 命令行。git clone https://github.com/a-mochis/dsh-video-merger.git
在 DSH 中调用:
plugin_manager install_bundle target = <dsh-video-merger 的绝对路径>
The profile package can also be installed from a terminal with the DSH CLI:
dsh plugin --profile desktop add git+https://github.com/a-mochis/dsh-video-merger.git
plugin_manager install_bundle additionally enables the bundle in the profile;
after a bare dsh plugin add, make sure dsh-video-merger is listed under
dsh.profile.bundles in the profile's package.json.
安装或更新后强制刷新页面,在会话顶部打开「视频合并」。
1. 选择根目录:点「选择文件夹」,在插件自带的目录浏览器中进入目标文件夹, 再点「选择此文件夹」。路径会回填并自动扫描。
2. 核对并合并:勾选要处理的文件夹;「统一输出到同一个文件夹」默认勾选, 留空即输出到扫描根目录;点「开始合并」后可查看总进度、速度和结果。
merge_folder_videos root="E:\videos" outputDir="E:\videos\merged"。node bin/merge-videos.mjs "E:\videos" --out "E:\videos\merged"。输出命名 <文件夹名>_merged.<原扩展名>;统一输出时嵌套目录会带相对路径前缀
(如 a_b_merged.mp4),重名默认自动加 (1),勾选覆盖则直接覆盖。
npm install
npm test
npm run test:merge
测试会用 ffmpeg 的 lavfi 现场生成素材,覆盖同规格、混合分辨率、MKV、文件名
带单引号、缺音轨和单视频文件夹。
MIT © 2026 a-mochis
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: video。