handbrake-expert
Skill2 starsChanged 10 days agoMITView on GitHub
Expert video transcoding with HandBrakeCLI — transcode, batch, monitor, optimize for devices, troubleshoot
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Do NOT invoke the agentic workflow for something one tool call answers.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HandBrake Expert Skill
Domain skill for the handbrake-mcp server. Two audiences: agents (tool-first workflows below) and humans (codec guidance at the bottom).
Agent routing
- Single file or a defined list →
transcode_video/batch_transcodedirectly. Do NOT invoke the agentic workflow for something one tool call answers. - Vague multi-step goal ("make my library iPad-ready") →
handbrake_agentic_workflow(goal)for a sampled plan, then execute it. - Fleet maintenance, launcher, or packaging questions → repo docs
(
docs/,INSTALL.md), not these tools.
Tool catalog (real names — verified against mcp.list_tools())
| Operation | Signature | Returns |
transcode_video | (input_path, output_path, preset?, options?) | TranscodeResponse(job_id, status, ...) |
batch_transcode | (jobs[{input_path, output_path, preset?, options?}], default_preset?) | list[TranscodeResponse], one per job |
get_job_status | (job_id) | JobStatusResponse(status, progress 0–100, ...) |
cancel_job | (job_id) | bool |
get_presets / get_loaded_models | () | list[str] preset names |
get_provider_status / system_status / show_status_card | () | health dict / text / Prefab card |
help / multilevel_help / advanced_help / tool_categories / search_tools | (...) | formatted help strings |
handbrake_agentic_workflow | (goal) + sampling ctx | Markdown plan |
handbrake_optimize_library | (source_dir, target_device) + sampling ctx | device strategy |
handbrake_shutdown | () | exits ~500 ms after responding |
Workflows
Workflow 1 — transcode and track to completion
r = await transcode_video("/videos/in.mp4", "/videos/out.mkv", preset="Fast 1080p30")
# poll every 5–30 s until terminal
s = await get_job_status(r.job_id) # queued → processing → completedWorkflow 2 — batch a folder, then report
jobs = [{"input_path": str(p), "output_path": str(p.with_suffix(".mkv"))} for p in Path("/watch").glob("*.mp4")]
results = await batch_transcode(jobs, default_preset="Fast 1080p30")
failed = [x for x in results if x.status == "failed"]
for x in results: await get_job_status(x.job_id) # final states for the reportWorkflow 3 — stuck or unwanted job
s = await get_job_status("job_12345")
if s.status in ("queued", "processing"): await cancel_job("job_12345")Errors and recovery
transcode_videoreturnsstatus="failed"witherror(file missing, unwritable output dir, CLI unavailable) — no exception, check the field.get_job_statusreturnsstatus="not_found"for expired/unknown ids.- Starting encodes while host RAM is over the 85% service gate raises
ValueError— free memory or wait; do NOT retry in a tight loop. - Integration tests skip transcode cases on a loaded host for the same reason
(see
tests/test_handbrake.py::skip_if_host_loaded).
Configuration
HandBrakeCLImust be on PATH (winget install HandBrake.HandBrake.CLI).- Server: stdio via
handbrake_mcp.stdio_main; HTTP bridgehandbrake_mcp.server:appon 127.0.0.1:10875 (/health,/api/shutdown). - Dashboard (
web_sota/) on 10874. Canonical entry isserver.py;main.pyis the legacy/Docker entry.
Human guidance — codec selection (RTX 4090 / Goliath)
| Scenario | Codec | Rationale |
| Archival | x265 HEVC 10-bit | efficiency + compatibility |
| Speed | AV1 NVENC | peak 4090 throughput |
| Universal playback | x264 | plays everywhere |
- Audio: AAC for mobile, Auto Passthru for DTS/AC3 preservation.
- Containers: MKV for library preservation, MP4 for web/older hardware.
- Quality starting point: CRF-equivalent 24–28; verify on your own eyes.
Troubleshooting
- Dashboard unreachable → backend on 10875?
GET /health200? - NVENC failure → NVIDIA drivers current?
nvidia-smion PATH? - Empty preset list → CLI missing (fallback list engages) — install HandBrakeCLI.
POST /api/shutdownis the orderly stop (fleet launcher calls it pre-restart).
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/architect.mdcCursor rule
- llms-full.txtllms.txt
- llms.txtllms.txt
- handbrakeSkill
- full-stack-developerSkill
- mcp-server-architectSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

