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.
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Video To 4k when an AI agent needs a reusable SKILL.md workflow for this job: 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.
When not to use it
Skip Video To 4k when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/video-to-4k # Save SKILL.md to ~/.claude/skills/video-to-4k/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/video-to-4k/SKILL.md. For a shared project, commit the folder at .claude/skills/video-to-4k/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Video To 4k skill for this task: Use Video To 4k when this documented workflow matches the task. Confirm any required inputs or files before making changes.
What supports this recommendation?
70/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 61/100
- Source signals
- 70/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# Video to 4K
Convert a supported video to a **unified 4K master**:
| Spec | Value | |------|-------| | Resolution | 3840×2160 | | Frame rate | **Source fps kept** (no `fps=` filter, no RIFE) | | Video | H.265 Main10 (`libx265`, `yuv420p10le`) | | Video bitrate | 40 Mbps | | Audio | AAC 320 kbps | | Container | MP4 (`.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](https://github.com/k4yt3x/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](../skill-dependency-manager.md) — 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](https://github.com/k4yt3x/video2x/releases/latest) and extract to `.dependency/video2x/`:
| Platform | Release asset | |----------|---------------| | Windows | `video2x-windows-amd64.zip` → `video2x.exe` | | Linux | `Video2X-x86_64.AppImage` (or distro package) → register as `bin` |
Register in `.dependency/manifest.json`:
```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](https://docs.video2x.org/running/command-line.html).
## Quick Start
```bash .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):
```bash .dependency/python/python .ai/video-to-4k/convert.py --video clip.mp4 --anime ```
## Defaults
| Setting | Default | Notes | |---------|---------|-------| | Upscaler | Real-ESRGAN `realesrgan-plus` | General / live-action | | `--anime` | `realesr-animevideov3` | Anime / illustration | | Scale | Auto 2 or 4 | Smallest factor that meets or exceeds 4K | | Intermediate | High-bitrate HEVC MKV in `video-to-4k/upscaled/` | Kept for re-encode; delete manually or `--clean-upscaled` | | Final | Always re-encode | Even if source already matches specs |
## Common Flags
`--video` · `-o` / `--output` · `--anime` · `--gpu` · `--clean-upscaled`
```bash .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](reference.md)
## Tests
From repo root:
```bash .dependency/python/python .ai/video-to-4k/test_convert.py ```
Manual CLI examples: [cli/video-to-4k.md](../../../cli/video-to-4k.md)
Intended uses
- Use Video To 4k when this documented workflow matches the task.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.