Video-Merger: Source-filtering, Random-slicing, and Batch-generating Short Videos with Logo and BGM

Introduction

When performing vertical screen mixed editing, managing material accounts, or batch producing videos, the common workflow is: first filter a batch of source videos by resolution, then manually clip multiple segments, splice them, remove original audio, overlay a logo, switch background music, and finally repeat the process by quantity. These steps are numerous, and the randomness (of clips and music) makes it hard to reproduce. The video-merger introduced below is a SkillHub community Skill (@user_aa378cba/video-merger-pro, v1.0.2). It codifies “filter resolution → random segment selection → merge → transparent Logo → random BGM → batch output” into instructions executable by an Agent, and includes helpers/generate_videos.py for direct command-line execution. No API Key is required (requires_api_key=false).

What is this

video-merger is aimed at design-media video post-production: it scans videos from a specified directory, keeps only those with resolutions matching the target width and height, randomly selects several clips and a background music track for each finished video, merges them, overlays a Logo centered at the bottom (taking the first image from the Logo directory), removes the original audio, and batch exports files like video_01.mp4, video_02.mp4, etc., based on the specified quantity.

The maintainer is the community publisher user_aa378cba, and the source is tagged as community. The current version on the SkillHub page is 1.0.2.

Core Features

The following capabilities are derived from the Skill’s bundled SKILL.md and auxiliary script instructions:

  1. Filter source videos by video_width / video_height (relies on ffprobe to read resolution).
  2. Randomly select background music from music_dir; supports mp3, wav, aac, m4a, flac.
  3. Randomly select the number of clips and the duration of each clip for every finished video (configurable range), then extract and merge them from source videos.
  4. Use the first png/jpg/jpeg/bmp in logo_dir as a transparent watermark (documentation suggests using transparent PNG for the Logo), overlaid at the bottom center of the frame.
  5. Remove the original video audio track, keeping only the selected BGM.
  6. Control the batch generation count via video_count (default 10).

Runtime dependencies require ffmpeg and ffprobe to be installed on the system.

Installation and Activation

Install SkillHub CLI

If not already installed, you can first check the version:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation documentation to perform a complete installation (CLI + default Skill):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

CLI only:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

Install video-merger

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, it defaults to ./skills/ which may not be recognized.

skillhub install video-merger-pro --namespace user_aa378cba --dir <your skills directory>

Common path examples (subject to SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

You can also provide the prompt below to the AI and let it fetch the Skill according to the official installation instructions:

Please install `@user_aa378cba/video-merger-pro` according to https://skillhub.cn/install/skillhub.md.

Typical Usage

Specify Parameters in Conversation

Instruct the Agent to use video-merger and provide the directories and resolution. Required fields: video_source, video_width, video_height, logo_dir, music_dir, output_dir.

Example (Basic):

Use video-merger to generate videos:
- Video source directory: D:\videouse
- Video resolution: 720x1280
- Logo directory: D:\workspace
- Music directory: D:\workspace\music
- Output directory: D:\videouse\output
- Video count: 10

Optional parameters include: video_count (default 10), min_clips / max_clips (default 3–5 segments per video), min_duration / max_duration (default 3–5 seconds per segment). See the SKILL.md inside the Skill for the complete parameter table.

Command Line Invocation of Auxiliary Script

In the directory where the Skill is installed, you can directly run helpers/generate_videos.py (Linux/macOS path separators differ from Windows examples; replace with your local paths):

python helpers/generate_videos.py \
  --video-source /path/to/videos \
  --video-width 720 \
  --video-height 1280 \
  --logo-dir /path/to/logos \
  --music-dir /path/to/music \
  --output-dir /path/to/output \
  --video-count 10

The workflow summarized in the documentation is: Scan source directory → Filter by resolution → Scan music and Logo → Randomly select segments and BGM for each video → ffmpeg extraction and merging → Overlay Logo and music → Write to output_dir.

Use Cases and Notes

Suitable for: Users who already have a large amount of vertical screen (or fixed width/height) material with the same resolution, need to quickly batch produce multiple finished videos with “random editing + unified Logo + switched BGM”, and are willing to use ffmpeg pipelines rather than manual operation in non-linear editing software.

Notes:

  1. Files with mismatched resolutions will be discarded directly; source videos need to be unified beforehand or the filtering results must be accepted.
  2. Only the first image matching the extension in the Logo directory is used; if there are multiple Logos, you need to organize the directory order yourself.
  3. Original audio is always removed; if dialogue or ambient sound needs to be preserved, this Skill is not applicable.
  4. Random segments and music will result in different outcomes for each run. If reproducibility is required, you need to modify the script yourself or fix the random seed (the current Skill documentation does not provide a seed parameter).
  5. The SkillHub page tags this Skill with approximately 637 downloads and a rating of 100000 (site display standards). You can confirm the version and coordinates on the page before installation.

Conclusion

video-merger consolidates the most repetitive tasks in mixed editing—“filtering, clipping, merging, watermarking, scoring, batch export”—into a set of parameterized workflows. It is suitable for handing over to an Agent to fill in paths and quantities, or for running batches locally with generate_videos.py. Official entry points and coordinates:

  • SkillHub Page: https://www.skillhub.cn/skills/user_aa378cba/video-merger-pro
  • API Coordinates: https://api.skillhub.cn/user_aa378cba/video-merger-pro
  • Installation Coordinates: @user_aa378cba/video-merger-pro (v1.0.2)
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye