跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
视频与音频

video-to-4k

Upscales a single low-resolution video to 4K with Video2X (Real-ESRGAN), then encodes to unified 3840×2160 H.265 Main10 40Mbps + AAC 320kbps MP4. Source frame rate is preserved (no fps=60 duplication, no RIFE). Already-4K sources skip Video2X and go straight to FFmpeg. Use when the user wants video-to-4k, 4K upscale, UHD export, Video2X, Real-ESRGAN, H.265 Main10, or convert an SD/HD clip to 4K.

godot-fun · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add godot-fun/godot-agent --skill video-to-4k

技能说明


name: video-to-4k description: >- Upscales a single low-resolution video to 4K with Video2X (Real-ESRGAN), then encodes to unified 3840×2160 H.265 Main10 40Mbps + AAC 320kbps MP4. Source frame rate is preserved (no fps=60 duplication, no RIFE). Already-4K sources skip Video2X and go straight to FFmpeg. Use when the user wants video-to-4k, 4K upscale, UHD export, Video2X, Real-ESRGAN, H.265 Main10, or convert an SD/HD clip to 4K.

Video to 4K

Convert a supported video to a unified 4K master:

SpecValue
Resolution3840×2160
Frame rateSource fps kept (no fps= filter, no RIFE)
VideoH.265 Main10 (libx265, yuv420p10le)
Video bitrate40 Mbps
AudioAAC 320 kbps
ContainerMP4 (.mp4, hvc1 tag)

Pipeline

  1. Probe with ffprobe (width, height, fps, audio).
  2. Already 4K? (width ≥ 3840 and height ≥ 2160) → skip Video2X.
  3. Below 4K → Video2X Real-ESRGAN upscale (scale 2 or 4) to intermediate under video-to-4k/upscaled/.
  4. Always FFmpeg final encode → video-to-4k/ at the unified specs above.

Rules

When this skill applies, read and follow skill-dependency-manager — run scripts as documented, install missing tools into .dependency/.

  • Run convert.py through .dependency/python/python. Never use host python / ffmpeg / video2x.
  • Never overwrite sources. Outputs go under video-to-4k/ (final) and video-to-4k/upscaled/ (Video2X intermediate).
  • Use the bundled script — do not hand-write equivalent video2x / ffmpeg commands.
  • One file per run — pass --video with a single file; repeat for each clip in a batch.

Setup (first run)

FFmpeg + Python

Populate ffmpeg and python under .dependency/ per skill-dependency-manager.

Video2X (CLI)

Download the CLI release (not the Qt6 installer) from video2x releases and extract to .dependency/video2x/:

PlatformRelease asset
Windowsvideo2x-windows-amd64.zip → video2x.exe
LinuxVideo2X-x86_64.AppImage (or distro package) → register as bin

Register in .dependency/manifest.json:

"video2x": {
  "populated": true,
  "bin": ".dependency/video2x/video2x.exe"
}

Use video2x (no .exe) or the AppImage path on Unix. Requires a Vulkan GPU and AVX2 CPU. Docs: Command Line.

Quick Start

.dependency/python/python .ai/video-to-4k/convert.py --video path/to/clip.mp4

Example:

assets/video/clip.mp4
  → assets/video/video-to-4k/upscaled/clip.mkv   (Video2X, only if below 4K)
  → assets/video/video-to-4k/clip.mp4            (final master)

Already-4K source → only video-to-4k/clip.mp4 (FFmpeg only).

Anime / cartoon content (Real-ESRGAN anime model):

.dependency/python/python .ai/video-to-4k/convert.py --video clip.mp4 --anime

Defaults

SettingDefaultNotes
UpscalerReal-ESRGAN realesrgan-plusGeneral / live-action
--animerealesr-animevideov3Anime / illustration
ScaleAuto 2 or 4Smallest factor that meets or exceeds 4K
IntermediateHigh-bitrate HEVC MKV in video-to-4k/upscaled/Kept for re-encode; delete manually or --clean-upscaled
FinalAlways re-encodeEven if source already matches specs

Common Flags

--video · -o / --output · --anime · --gpu · --clean-upscaled

.dependency/python/python .ai/video-to-4k/convert.py --video clip.mp4
.dependency/python/python .ai/video-to-4k/convert.py --video clip.mp4 --gpu 0 --clean-upscaled
.dependency/python/python .ai/video-to-4k/convert.py --video clip.mp4 -o out/clip.mp4

Never overwrite source files. Input must be a single video file (--video), not a directory. Supported inputs: .mp4, .mkv, .mov, .avi, .webm, .wmv, .flv, .m4v, .mpeg, .mpg, .ts, .mts, .m2ts, .3gp, .ogv.

Agent Notes

  1. Use the bundled script only.
  2. Missing Python / FFmpeg / Video2X → populate .dependency/, set populated: true, retry the same command.
  3. Tell the user where video-to-4k/ (and video-to-4k/upscaled/ if used) outputs are; they swap assets manually.
  4. Default model is general (realesrgan-plus). Pass --anime for anime/cartoon.
  5. Do not force fps. Keep the source frame rate. Need 60fps interpolation → video-to-60fps first (RIFE at source resolution).
  6. Pipeline / FFmpeg / Video2X details: reference.md

Tests

From repo root:

.dependency/python/python .ai/video-to-4k/test_convert.py

Manual CLI examples: cli/video-to-4k.md