One SKILL.md that has Claude Code install yt-dlp, AutoClip and Postiz, wire them together, and turn a long video into vertical, subtitled clips queued in your own scheduler.
This guide is reviewed for clarity, service accuracy, and AI-search readability. The next quarterly content review is tracked internally before unsupported metrics or client proof are added.
Paste one SKILL.md into Claude Code and it builds a full clipping pipeline on your machine. yt-dlp pulls in a long video or livestream. AutoClip finds the best moments and turns them into vertical, subtitled clips. Postiz, running on your own computer or server, queues those clips for TikTok, YouTube Shorts and Instagram Reels.
This page has everything you need: the skill, the script it writes, setup notes for each tool, platform connections, checks, fixes and the fine print. Think of it as the Hypd build sheet for running a clipping channel without editing a single clip by hand.
What you get
promptURL or video file │ yt-dlp → ~/clipping/input/<id>.mp4 (+ subtitles when available) ▼ AutoClip (Docker) → finds the best moments, crops to vertical, adds subtitles │ clip_pipeline.py collects the clips → ~/clipping/clips/<run-id>/clip_01.mp4 … ▼ Postiz (Docker) → drafts or scheduled posts → TikTok · YouTube Shorts · Instagram Reels
- A
clipping-pipelineskill that Claude Code runs on request or picks up on its own. - Three open-source tools installed in one folder,
~/clipping. - One script,
clip_pipeline.py, that moves a video through all three. - One command to run the channel: a URL goes in, clips come out queued in Postiz.
What you still supply yourself
The skill installs and wires everything. It can't create accounts or keys for you. Have these ready, or know where to get them:
- An LLM for AutoClip. Either an API key from a provider AutoClip supports, or a free local model running in Ollama or LM Studio.
- A Postiz public API key. You create it in your own Postiz dashboard after setup.
- Developer apps for each platform. A Google Cloud OAuth app for YouTube, a TikTok developer app, and a Meta developer app plus an Instagram professional account.
- A domain with HTTPS, if you want to publish to TikTok or Instagram. Local is fine for testing, drafts and YouTube.
- Videos you have the right to clip. See the rights box near the end.
Prerequisites checklist
The skill checks all of this in Step 1 and offers to install what's missing. Doing it upfront saves time.
| Need | Why | Minimum |
|---|---|---|
| git | Clones AutoClip and Postiz | Any recent version |
| Docker + Compose plugin | Runs AutoClip and Postiz | Docker Desktop (Mac/Windows) or Docker Engine (Linux) |
| Python | Runs yt-dlp and the wiring script | 3.10 or newer |
| Node.js | AutoClip's frontend if you use the manual install | Current LTS |
| ffmpeg + ffprobe | Merges downloads, cuts clips, converts subtitles | Any recent build |
| Deno | yt-dlp uses it for YouTube | Recommended |
| curl | The script's API calls | 7.76 or newer |
| Free disk | Source videos, clips, Docker images | We recommend 20 GB+, more for long streams |
| RAM | Two Docker stacks plus video work | We recommend 8 GB+, 16 GB+ with a local LLM |
Postiz's own docs test its Docker Compose stack on an Ubuntu 24.04 VM with 2 GB RAM and 2 vCPUs. AutoClip and video processing need more on top of that.
macOS
bash# Homebrew, if you don't have it /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install git python node ffmpeg deno # Docker: install Docker Desktop from https://www.docker.com/products/docker-desktop/ and start it
Linux (Ubuntu / Debian)
bashsudo apt update && sudo apt install -y git curl python3 python3-venv ffmpeg unzip # Docker Engine + Compose plugin (official convenience script) curl -fsSL https://get.docker.com | sh sudo usermod -aG docker $USER # then log out and back in # Node.js LTS curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt install -y nodejs # Deno (for yt-dlp's YouTube support) curl -fsSL https://deno.land/install.sh | sh
Windows (WSL 2)
Run the whole pipeline inside WSL 2, not in PowerShell.
powershell# PowerShell as Administrator, then reboot wsl --install -d Ubuntu
Then:
- Install Docker Desktop for Windows. In Settings → Resources → WSL Integration, switch it on for Ubuntu.
- Open the Ubuntu terminal and run the Linux commands above, except the
get.docker.comline. Docker Desktop provides Docker inside WSL. - Install and run Claude Code inside Ubuntu too, so the skill lives in the Linux
~/.claude/skills.
Check everything
bashgit --version; curl --version | head -1; python3 --version; node --version docker --version; docker compose version; docker info > /dev/null && echo "Docker is running" ffmpeg -version | head -1; ffprobe -version | head -1; deno --version | head -1 df -h ~ # RAM: Linux/WSL → free -h macOS → sysctl -n hw.memsize
The skill: copy this SKILL.md
Copy the whole block. The frontmatter tells Claude Code when to use the skill. The body is the step-by-step setup Claude follows, plus the two files it writes: pipeline.env and clip_pipeline.py.
markdown--- name: clipping-pipeline description: Sets up and runs a local short-form clipping pipeline. Installs yt-dlp (downloads videos and livestreams), AutoClip (AI finds the best moments, crops to vertical, adds subtitles) and self-hosted Postiz (schedules to TikTok, YouTube Shorts and Instagram Reels), wires them with one script, then turns a long video URL or file into queued clips. Use when the user mentions a clipping channel, clipping long videos into shorts, yt-dlp, AutoClip or Postiz setup, or asks to run the clip pipeline on a URL. argument-hint: "[setup | run <video-url-or-file> [--schedule] [--live]]" --- # Clipping pipeline: yt-dlp → AutoClip → Postiz You install and operate a three-part pipeline in `~/clipping`. yt-dlp downloads a long video. AutoClip turns it into vertical, subtitled clips. Postiz queues them for TikTok, YouTube Shorts and Instagram Reels. `~/clipping/bin/clip_pipeline.py` (Template B) connects the three. ## Ground rules - Arguments: `$ARGUMENTS`. If they start with `run`, go to **Run mode**. Otherwise do **Setup**. Re-running Setup is safe: skip any step whose check already passes. - Ask before using `sudo`, installing system packages, or changing anything outside `~/clipping`. - Each repo's current README wins. If it disagrees with this skill (commands, ports, file names), follow the README and tell the user what changed. - Secrets live only in `~/clipping/pipeline.env` (chmod 600), AutoClip's env file and Postiz's compose file. Never echo them back. Never commit them. For API keys, ask the user to paste the value into the file themselves. - Values written `<<LIKE_THIS>>` are user-supplied. Stop and ask for them. Never invent one. - Only process videos the user owns, has permission to use, or that a creator's clipping program covers. If a URL looks like someone else's content, ask before downloading. - On Windows, everything runs inside WSL 2 (Ubuntu). ## Setup ### Step 0 — Ask once, up front 1. LLM for AutoClip: a cloud API key (which provider?) or a local model through Ollama or LM Studio (which model?). 2. Postiz address: local only (`http://localhost:4007`) or a domain with HTTPS. TikTok and Instagram publishing need the HTTPS domain. Local is fine for testing, drafts and YouTube. 3. Platforms to connect: TikTok, YouTube, Instagram. 4. Install folder: default `~/clipping`. If the user picks another, use it everywhere below and set `CLIP_HOME` to match. ### Step 1 — Prerequisites ~~~bash uname -s; (grep -E '^(NAME|VERSION)=' /etc/os-release 2>/dev/null || sw_vers) git --version; curl --version | head -1; python3 --version; node --version docker --version; docker compose version; docker info > /dev/null && echo "Docker running" ffmpeg -version | head -1; ffprobe -version | head -1; deno --version | head -1 df -h "$HOME" ~~~ Required: git, curl 7.76+, Python 3.10+, Node.js LTS, Docker with the Compose plugin and the daemon running, ffmpeg + ffprobe. Recommended: Deno (yt-dlp uses it for YouTube), 20 GB+ free disk, 8 GB+ RAM (16 GB+ for a local LLM). Install anything missing: - macOS: `brew install git python node ffmpeg deno`, plus Docker Desktop from docker.com. - Ubuntu/Debian: `sudo apt update && sudo apt install -y git curl python3 python3-venv ffmpeg unzip`. Docker: `curl -fsSL https://get.docker.com | sh`, then `sudo usermod -aG docker $USER` and log out/in. Node: `curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt install -y nodejs`. Deno: `curl -fsSL https://deno.land/install.sh | sh`. - WSL: same as Ubuntu, but use Docker Desktop for Windows with WSL integration on, not get.docker.com. Re-run the checks until the required ones pass. ### Step 2 — Folder layout ~~~bash mkdir -p ~/clipping/bin ~/clipping/input ~/clipping/clips ~/clipping/runs ~~~ ### Step 3 — yt-dlp ~~~bash python3 -m venv ~/clipping/.venv ~/clipping/.venv/bin/python -m pip install -U pip "yt-dlp[default]" ~/clipping/.venv/bin/yt-dlp --version ~~~ ### Step 4 — AutoClip ~~~bash git clone https://github.com/zhouxiaoka/autoclip.git ~/clipping/autoclip ~~~ 1. Read the README (and any English README), the example env file and the Docker Compose file in `~/clipping/autoclip`. Summarise for the user: install routes, services, host ports, LLM settings. 2. Use the Docker route if the README offers it. Otherwise follow its manual backend + frontend setup (Python virtualenv, Redis, the processing worker, `npm install` in the frontend). 3. LLM: copy the example env file to the name the README expects. Set the provider, model and key the user chose (`<<YOUR_LLM_API_KEY>>`). Local models: Ollama serves on port 11434 (`ollama pull <model>` first); LM Studio's local server uses port 1234. AutoClip inside Docker can't reach the host's `localhost`, so use `http://host.docker.internal:<port>`. On Linux, also add `extra_hosts: ["host.docker.internal:host-gateway"]` to the AutoClip services. 4. Make sure AutoClip's data folder is bind-mounted to the host (for example `./data:/app/data`, matching the container's real data path). The script reads finished clips from there. 5. Turn on vertical (9:16) output, speaker-following crop and burned-in subtitles wherever this version exposes them (env file, settings page or API). Tell the user about any of these the installed version doesn't have. 6. Check the host ports in the compose file are free (`lsof -i :<port>` on macOS, `ss -ltnp` on Linux). Start AutoClip the way the README says (Docker: `docker compose up -d --build`). Wait until the web UI loads and the API answers. 7. Write the API base URL into `pipeline.env` as `AUTOCLIP_API_URL`. Then list the API routes (substitute the real API URL): ~~~bash curl -s http://localhost:8000/openapi.json | python3 -c 'import json,sys; d=json.load(sys.stdin); [print(m.upper(), p) for p, v in d["paths"].items() for m in v if m in ("get", "post")]' ~~~ From the routes and their request schemas, fill in `pipeline.env`: - `AUTOCLIP_UPLOAD_PATH`: the route that creates a project from an uploaded video file. - `AUTOCLIP_VIDEO_FIELD`, `AUTOCLIP_SRT_FIELD` (blank if none), `AUTOCLIP_NAME_FIELD` (blank if none): its form field names. - `AUTOCLIP_EXTRA_FORM`: JSON of any other required form fields, e.g. `{"video_category": "default"}`. - `AUTOCLIP_ID_FIELD`: dotted path to the project id in the upload response, e.g. `id` or `data.id`. - `AUTOCLIP_PROCESS_PATH`: the route that starts processing (blank if upload starts it). - `AUTOCLIP_STATUS_PATH`, `AUTOCLIP_STATUS_FIELD`, `AUTOCLIP_DONE_VALUES`, `AUTOCLIP_FAILED_VALUES`. Write `{project_id}` wherever the id goes in a path. If there's no OpenAPI document, read the routes from the backend source. ### Step 5 — Postiz ~~~bash git clone https://github.com/gitroomhq/postiz-docker-compose.git ~/clipping/postiz openssl rand -hex 32 ~~~ 1. Read `~/clipping/postiz/docker-compose.yaml` and the self-hosting docs at docs.postiz.com (Docker Compose install page and configuration reference). Since v2.12.0 the stack includes Temporal, which scheduled posts need. Keep those services. 2. In the `postiz` service environment set: `MAIN_URL` and `FRONTEND_URL` = the Postiz address from Step 0; `NEXT_PUBLIC_BACKEND_URL` = that address + `/api`; `JWT_SECRET` = the `openssl` output. Keep `BACKEND_INTERNAL_URL`, `DATABASE_URL` and `REDIS_URL` as shipped. If you change the database password, change it in the Postgres service and in `DATABASE_URL`. 3. Postiz's host ports (4007 for the web app, 8080 for the Temporal UI by default) must not collide with AutoClip or anything else. If they do, change the left side of the port mapping and the URLs to match. 4. `cd ~/clipping/postiz && docker compose up -d`. Poll the address until it returns HTTP 200. The first start can take a few minutes. 5. After any later env change: `docker compose down && docker compose up -d`. 6. Domain setup: put Postiz behind HTTPS (for example `caddy reverse-proxy --from <<postiz.yourdomain.com>> --to localhost:4007`) and use the `https://` address in all three URL variables. ### Step 6 — First login and API key (the user does this) 1. The user opens the Postiz address and registers. The first account becomes the organisation owner. 2. Public instance: set `DISABLE_REGISTRATION: "true"` in the `postiz` env afterwards and restart, so strangers can't sign up. 3. The user opens Settings → Public API, copies the key, and pastes it into `~/clipping/pipeline.env` as `POSTIZ_API_KEY`. 4. Set `POSTIZ_API_URL` to the Postiz address + `/api/public/v1`. ### Step 7 — Connect platforms (the user does this; can wait) Print this checklist with the real Postiz address in place of `<<POSTIZ_URL>>`: - YouTube: Google Cloud project → enable YouTube Data API v3 → OAuth consent screen (add the user's Google account as a test user) → OAuth client ID, type Web application → authorised redirect URI `<<POSTIZ_URL>>/integrations/social/youtube` → env `YOUTUBE_CLIENT_ID`, `YOUTUBE_CLIENT_SECRET`. - TikTok: TikTok for Developers app → add Login Kit and Content Posting API → scopes `user.info.basic`, `video.upload`, `video.publish` → redirect URI `<<POSTIZ_URL>>/integrations/social/tiktok` (HTTPS) → env `TIKTOK_CLIENT_ID`, `TIKTOK_CLIENT_SECRET`. - Instagram: needs an Instagram professional account (Business or Creator). Route A: Meta app with Facebook Login for Business, account linked to a Facebook Page → redirect `<<POSTIZ_URL>>/integrations/social/instagram` → env `FACEBOOK_APP_ID`, `FACEBOOK_APP_SECRET`. Route B: Meta app with Instagram API with Instagram Login → redirect `<<POSTIZ_URL>>/integrations/social/instagram-standalone` → env `INSTAGRAM_APP_ID`, `INSTAGRAM_APP_SECRET`. Confirm each redirect path and variable name on that provider's page in the Postiz docs. When the user supplies a client ID and secret, add them to the `postiz` env, run `docker compose down && docker compose up -d`, and have the user click Add Channel in Postiz. Warn the user: platform review can take weeks. Until then, TikTok posts from unaudited apps are private-only, and YouTube uploads from unverified API projects are private. ### Step 8 — Write the wiring files and test If `~/clipping/pipeline.env` doesn't exist, create it from Template A, keeping any values found in Steps 4-6. Write `~/clipping/bin/clip_pipeline.py` exactly as Template B. Then: ~~~bash chmod 600 ~/clipping/pipeline.env chmod +x ~/clipping/bin/clip_pipeline.py ~/clipping/.venv/bin/python ~/clipping/bin/clip_pipeline.py --check ~~~ Test run on a short video the user owns: ~~~bash ~/clipping/.venv/bin/python ~/clipping/bin/clip_pipeline.py "<<URL_OR_FILE_YOU_OWN>>" --skip-postiz --max-clips 1 ~~~ The first run stops at "set AUTOCLIP_CLIPS_GLOB first" and logs the project id. Find where the clips landed (`find ~/clipping/autoclip -name '*.mp4' -mmin -180`). Set `AUTOCLIP_CLIPS_GLOB` using `{project_id}` and `**`. It must match only finished clips, never the uploaded source video. Then finish the test: ~~~bash ~/clipping/.venv/bin/python ~/clipping/bin/clip_pipeline.py --project-id <id> --max-clips 1 ~~~ Confirm the draft appears in Postiz. ### Finish Tell the user: the AutoClip and Postiz URLs, what's verified, what they still need to supply (LLM key if pending, Postiz API key, platform apps, HTTPS domain), and the run command from Run mode. ## Run mode `run <url-or-file> [flags]`. First confirm AutoClip and Postiz are up (`docker compose ps` in each folder; start them if not). Then: ~~~bash ~/clipping/.venv/bin/python ~/clipping/bin/clip_pipeline.py "<url-or-file>" [--schedule] [--max-clips N] [--live] [--start 2026-12-06T15:00:00Z] ~~~ Without `--schedule`, posts are saved as drafts. Use `--schedule` only when the user asks. Use `--live` for a livestream in progress. Report the final JSON line and point to `~/clipping/runs/<run-id>.json`. If yt-dlp fails with an extractor error, update it once (`~/clipping/.venv/bin/python -m pip install -U "yt-dlp[default]"`) and retry. ## Template A — ~/clipping/pipeline.env ~~~bash # Read by bin/clip_pipeline.py. Keep chmod 600. Never commit. # Comments go on their own lines: a # after a value becomes part of the value. CLIP_HOME=~/clipping # yt-dlp YTDLP_FORMAT_SORT=res:1080,ext:mp4:m4a FETCH_SUBS=1 SUB_LANGS=en.* # AutoClip: Step 4 fills the API fields from your running instance. # AUTOCLIP_API_URL uses the API port from AutoClip's compose file. AUTOCLIP_API_URL=http://localhost:8000 AUTOCLIP_HEALTH_PATH=/openapi.json AUTOCLIP_UPLOAD_PATH= AUTOCLIP_VIDEO_FIELD= AUTOCLIP_SRT_FIELD= AUTOCLIP_NAME_FIELD= AUTOCLIP_EXTRA_FORM={} AUTOCLIP_ID_FIELD= AUTOCLIP_PROCESS_PATH= AUTOCLIP_STATUS_PATH= AUTOCLIP_STATUS_FIELD=status AUTOCLIP_DONE_VALUES=completed,done,success,finished AUTOCLIP_FAILED_VALUES=failed,error AUTOCLIP_TIMEOUT_MIN=240 # Set after the first test run (Step 8). Must match finished clips only. AUTOCLIP_CLIPS_GLOB= # Postiz POSTIZ_API_URL=http://localhost:4007/api/public/v1 POSTIZ_API_KEY=<<PASTE_YOUR_POSTIZ_PUBLIC_API_KEY>> POSTIZ_PLATFORMS=youtube,tiktok,instagram,instagram-standalone POST_EVERY_HOURS=6 CAPTION_SUFFIX= YOUTUBE_PRIVACY=private TIKTOK_PRIVACY=SELF_ONLY ~~~ ## Template B — ~/clipping/bin/clip_pipeline.py ~~~python #!/usr/bin/env python3 """yt-dlp -> AutoClip -> Postiz: one long video in, vertical clips queued out. clip_pipeline.py URL_OR_FILE [--schedule] [--max-clips N] [--live] clip_pipeline.py --project-id ID [--schedule] # reuse a finished AutoClip project clip_pipeline.py --check # is every stage installed and reachable? Settings: ~/clipping/pipeline.env (or point CLIP_ENV at another file). Run it with ~/clipping/.venv/bin/python so it uses the pipeline's yt-dlp. """ import argparse import datetime as dt import glob import json import os import re import shutil import subprocess import sys import time from pathlib import Path def load_env(path): path = Path(path).expanduser() if not path.is_file(): sys.exit(f"Missing {path}. Create it from Template A in the skill.") cfg = {} for line in path.read_text().splitlines(): line = line.strip() if line and not line.startswith("#") and "=" in line: key, value = line.split("=", 1) cfg[key.strip()] = value.strip().strip('"').strip("'") return cfg CFG = load_env(os.environ.get("CLIP_ENV", "~/clipping/pipeline.env")) HOME = Path(CFG.get("CLIP_HOME", "~/clipping")).expanduser() def log(msg): print(f"[clip] {msg}", file=sys.stderr, flush=True) def need(key): value = CFG.get(key, "") if not value or value.startswith("<<"): sys.exit(f"pipeline.env: set {key} first") return value def dig(obj, dotted): """Read a value like 'data.id' out of nested JSON.""" for key in dotted.split("."): obj = obj[int(key)] if isinstance(obj, list) else obj[key] return obj def http(url, *opts, secret_header=None): """Uses curl because it streams multi-GB uploads from disk instead of loading them into RAM.""" cmd = ["curl", "-sS", "--fail-with-body", *opts] if secret_header: cmd += ["-K", "-"] # auth header comes in on stdin, so the key never shows in `ps` result = subprocess.run(cmd + [url], capture_output=True, text=True, input=f'header = "{secret_header}" ' if secret_header else None) if result.returncode != 0: sys.exit(f"HTTP call failed: {url} {(result.stdout + result.stderr)[-1500:]}") return json.loads(result.stdout) if result.stdout.strip() else {} def autoclip(path, *opts): return http(need("AUTOCLIP_API_URL").rstrip("/") + path, *opts) def postiz(path, *opts): return http(need("POSTIZ_API_URL").rstrip("/") + path, *opts, secret_header=f"Authorization: {need('POSTIZ_API_KEY')}") def download(url, live): """yt-dlp -> ~/clipping/input/<id>.mp4, plus <id>.<lang>.srt when subtitles exist.""" base = [sys.executable, "-m", "yt_dlp", "--no-playlist", "-o", str(HOME / "input" / "%(id)s.%(ext)s")] live_opts = ["--live-from-start", "--wait-for-video", "60"] if live else [] result = subprocess.run( base + live_opts + ["-S", CFG.get("YTDLP_FORMAT_SORT", "res:1080,ext:mp4:m4a"), "--merge-output-format", "mp4", "--progress", "--print", "after_move:filepath", "--no-simulate", url], stdout=subprocess.PIPE, text=True) if result.returncode != 0 or not result.stdout.strip(): sys.exit("yt-dlp failed (see above). Update it, then retry: " f" {sys.executable} -m pip install -U 'yt-dlp[default]'") video = Path(result.stdout.strip().splitlines()[-1]) srt = None if CFG.get("FETCH_SUBS", "1") == "1": # Subtitles help AutoClip but are optional, so a failure here never stops the run. subprocess.run(base + ["--skip-download", "--write-subs", "--write-auto-subs", "--sub-langs", CFG.get("SUB_LANGS", "en.*"), "--convert-subs", "srt", url], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) srt = next(iter(sorted(video.parent.glob(f"{video.stem}.*.srt"))), None) return video, srt def submit(video, srt): """Upload the video (and subtitles) to AutoClip and start processing. Returns the project id.""" form = ["-F", f'{need("AUTOCLIP_VIDEO_FIELD")}=@"{video}"'] if srt and CFG.get("AUTOCLIP_SRT_FIELD"): form += ["-F", f'{CFG["AUTOCLIP_SRT_FIELD"]}=@"{srt}"'] fields = json.loads(CFG.get("AUTOCLIP_EXTRA_FORM") or "{}") if CFG.get("AUTOCLIP_NAME_FIELD"): fields[CFG["AUTOCLIP_NAME_FIELD"]] = video.stem for key, value in fields.items(): form += ["--form-string", f"{key}={value}"] created = autoclip(need("AUTOCLIP_UPLOAD_PATH"), *form) project_id = str(dig(created, need("AUTOCLIP_ID_FIELD"))) log(f"AutoClip project {project_id} created") if CFG.get("AUTOCLIP_PROCESS_PATH"): autoclip(CFG["AUTOCLIP_PROCESS_PATH"].replace("{project_id}", project_id), "-X", "POST") return project_id def wait_for(project_id): done = set(CFG.get("AUTOCLIP_DONE_VALUES", "completed").lower().split(",")) failed = set(CFG.get("AUTOCLIP_FAILED_VALUES", "failed").lower().split(",")) path = need("AUTOCLIP_STATUS_PATH").replace("{project_id}", project_id) deadline = time.time() + 60 * int(CFG.get("AUTOCLIP_TIMEOUT_MIN", "240")) while time.time() < deadline: status = str(dig(autoclip(path), CFG.get("AUTOCLIP_STATUS_FIELD", "status"))).lower() log(f"AutoClip project {project_id}: {status}") if status in done: return if status in failed: sys.exit("AutoClip reported a failure. Check its web UI and logs; " "a missing LLM key or model is the usual cause.") time.sleep(30) sys.exit(f"AutoClip is still working. Resume later with: --project-id {project_id}") def is_vertical(path): probe = subprocess.run(["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries", "stream=width,height", "-of", "csv=p=0", str(path)], capture_output=True, text=True).stdout.strip() try: width, height = (int(n) for n in probe.split(",")[:2]) except ValueError: return True # can't tell, so don't block the run return height > width def collect(project_id, run_dir, limit): pattern = os.path.expanduser(need("AUTOCLIP_CLIPS_GLOB").replace("{project_id}", project_id)) found = sorted(glob.glob(pattern, recursive=True))[:limit] if not found: sys.exit(f"No clips match {pattern} " f"Fix AUTOCLIP_CLIPS_GLOB, then rerun with --project-id {project_id}") clips = [] for i, src in enumerate(found, 1): dst = run_dir / f"clip_{i:02d}.mp4" # plain names keep curl uploads and platform checks happy shutil.copy2(src, dst) title = re.sub(r"[_-]+", " ", Path(src).stem).strip() or f"Clip {i}" clips.append({"file": str(dst), "source": src, "title": title, "vertical": is_vertical(dst)}) if not clips[-1]["vertical"]: log(f"WARNING: {dst.name} is not vertical. Turn on 9:16 output in AutoClip.") log(f"collected {len(clips)} clips into {run_dir}") return clips def platform_settings(identifier, title): """Per-platform options Postiz expects. If a post is rejected, compare with the Postiz public API docs.""" if identifier == "youtube": return {"__type": "youtube", "title": title[:100], "type": CFG.get("YOUTUBE_PRIVACY", "private"), "selfDeclaredMadeForKids": "no", "tags": []} if identifier == "tiktok": return {"__type": "tiktok", "privacy_level": CFG.get("TIKTOK_PRIVACY", "SELF_ONLY"), "duet": False, "stitch": False, "comment": True, "autoAddMusic": "no", "brand_content_toggle": False, "brand_organic_toggle": False, "content_posting_method": "DIRECT_POST"} if identifier.startswith("instagram"): return {"__type": identifier, "post_type": "post", "collaborators": []} return {"__type": identifier} def queue(clips, schedule, start): wanted = set(CFG.get("POSTIZ_PLATFORMS", "youtube,tiktok,instagram").split(",")) channels = [c for c in postiz("/integrations") if c.get("identifier") in wanted and not c.get("disabled")] if not channels: sys.exit("No matching channels in Postiz. Connect them in the dashboard or fix POSTIZ_PLATFORMS.") every = dt.timedelta(hours=float(CFG.get("POST_EVERY_HOURS", "6"))) for i, clip in enumerate(clips): media = postiz("/upload", "-F", f'file=@"{clip["file"]}";type=video/mp4') caption = f'{clip["title"]} {CFG.get("CAPTION_SUFFIX", "")}'.strip() when = (start + i * every).strftime("%Y-%m-%dT%H:%M:%S.000Z") body = { "type": "schedule" if schedule else "draft", "date": when, "shortLink": False, "tags": [], # One request per clip covers every channel, which keeps you well inside the API rate limit. "posts": [{"integration": {"id": c["id"]}, "value": [{"content": caption, "image": [{"id": media["id"], "path": media["path"]}]}], "settings": platform_settings(c["identifier"], clip["title"])} for c in channels], } postiz("/posts", "-H", "Content-Type: application/json", "--data-binary", json.dumps(body)) clip.update(post_at=when, channels=[c["identifier"] for c in channels]) log(f'{"scheduled" if schedule else "saved draft"}: {Path(clip["file"]).name} at {when}') def check(): ok = True def step(name, fn): nonlocal ok try: log(f"OK {name}: {fn()}") except (Exception, SystemExit) as err: ok = False log(f"FAIL {name}: {err}") step("yt-dlp", lambda: subprocess.run([sys.executable, "-m", "yt_dlp", "--version"], capture_output=True, text=True, check=True).stdout.strip()) step("ffmpeg", lambda: shutil.which("ffmpeg") or sys.exit("not on PATH")) step("ffprobe", lambda: shutil.which("ffprobe") or sys.exit("not on PATH")) step("AutoClip API", lambda: "reachable" if autoclip( CFG.get("AUTOCLIP_HEALTH_PATH", "/openapi.json")) is not None else "no response") step("Postiz API", lambda: ", ".join(c.get("identifier", "?") for c in postiz("/integrations")) or "reachable, no channels connected yet") return 0 if ok else 1 def main(): ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap.add_argument("source", nargs="?", help="video or livestream URL, or a local video file") ap.add_argument("--project-id", help="skip download and upload; use this AutoClip project") ap.add_argument("--live", action="store_true", help="record a livestream from its start; waits for it to end") ap.add_argument("--schedule", action="store_true", help="schedule posts (default: save as drafts)") ap.add_argument("--start", help="first post time, ISO 8601; UTC if no offset (default: next full hour)") ap.add_argument("--max-clips", type=int, default=5) ap.add_argument("--skip-postiz", action="store_true", help="stop after collecting clips") ap.add_argument("--check", action="store_true", help="check every stage is installed and reachable") args = ap.parse_args() if args.check: return check() if not args.source and not args.project_id: ap.error("give a URL or a video file, or --project-id") run_id = dt.datetime.now().strftime("%Y%m%d-%H%M%S") run_dir = HOME / "clips" / run_id run_dir.mkdir(parents=True, exist_ok=True) (HOME / "runs").mkdir(parents=True, exist_ok=True) project_id = args.project_id if not project_id: local = Path(args.source).expanduser() video, srt = (local, None) if local.is_file() else download(args.source, args.live) log(f"sending {video.name} to AutoClip") project_id = submit(video, srt) wait_for(project_id) clips = collect(project_id, run_dir, args.max_clips) if not args.skip_postiz: if args.start: start = dt.datetime.fromisoformat(args.start.replace("Z", "+00:00")) start = start if start.tzinfo else start.replace(tzinfo=dt.timezone.utc) else: start = (dt.datetime.now(dt.timezone.utc).replace(minute=0, second=0, microsecond=0) + dt.timedelta(hours=1)) queue(clips, args.schedule, start.astimezone(dt.timezone.utc)) (HOME / "runs" / f"{run_id}.json").write_text(json.dumps( {"run_id": run_id, "source": args.source, "autoclip_project": project_id, "clips": clips}, indent=2)) mode = "skipped" if args.skip_postiz else ("scheduled" if args.schedule else "drafts") print(json.dumps({"run_id": run_id, "clips": len(clips), "postiz": mode})) return 0 if __name__ == "__main__": sys.exit(main()) ~~~
Install the skill in Claude Code
Claude Code loads skills from a folder per skill. The folder name becomes the command.
Personal (every project): ~/.claude/skills/clipping-pipeline/SKILL.md
One project only: .claude/skills/clipping-pipeline/SKILL.md inside that project's root.
bashmkdir -p ~/.claude/skills/clipping-pipeline # macOS: copy the SKILL.md block above, then pbpaste > ~/.claude/skills/clipping-pipeline/SKILL.md # Linux / WSL: open the file, paste, save nano ~/.claude/skills/clipping-pipeline/SKILL.md
Check that the file starts with --- on line 1. The frontmatter must be the very first thing in it.
Confirm Claude Code loaded it:
- Start a new session with
claude. Type/clipand look for/clipping-pipelinein the autocomplete list. - Or ask Claude: "What skills can you use?" It should list
clipping-pipeline. - Not showing? Check the exact path and folder name, then restart Claude Code.
Run it:
text/clipping-pipeline
You can also just say "set up my clipping pipeline". The description is written so Claude picks the skill up on its own. Claude asks permission before running commands. It pauses when it needs you: to choose an LLM, to log in to Postiz, and to paste your keys.
yt-dlp: pull in the raw video
yt-dlp downloads videos and livestreams from a long list of sites. It's the raw material for every clip.
Install. The skill installs it into the pipeline's own Python environment, the method the yt-dlp README recommends for pip users:
bashpython3 -m venv ~/clipping/.venv ~/clipping/.venv/bin/python -m pip install -U pip "yt-dlp[default]"
Other official options: the standalone binaries on the project's GitHub releases page, or brew install yt-dlp on macOS.
Dependencies. yt-dlp needs ffmpeg and ffprobe to merge separate video and audio streams into one MP4 and to convert subtitles. For YouTube, current releases also use a JavaScript runtime. Deno is the recommended one.
Download a video at good quality into the input folder:
bash~/clipping/.venv/bin/yt-dlp --no-playlist -S "res:1080,ext:mp4:m4a" --merge-output-format mp4 -o "$HOME/clipping/input/%(id)s.%(ext)s" "https://www.youtube.com/watch?v=<<VIDEO_ID>>"
-S "res:1080,ext:mp4:m4a" picks the best quality up to 1080p and prefers MP4 video and M4A audio. That's plenty for vertical clips and keeps files manageable.
Livestreams and VODs:
bash# Live right now: record from the beginning; finishes when the stream ends ~/clipping/.venv/bin/yt-dlp --live-from-start --merge-output-format mp4 -o "$HOME/clipping/input/%(id)s.%(ext)s" "<<LIVESTREAM_URL>>" # Scheduled stream: wait for it to start, checking every 60 seconds ~/clipping/.venv/bin/yt-dlp --wait-for-video 60 --merge-output-format mp4 -o "$HOME/clipping/input/%(id)s.%(ext)s" "<<UPCOMING_STREAM_URL>>" # Finished stream or VOD: download it like a normal video
--live-from-start works on some sites only, YouTube included. The wiring script adds both flags when you pass --live.
Keep it updated. Sites change often and extractors break. Update before every big batch:
bash~/clipping/.venv/bin/python -m pip install -U "yt-dlp[default]" # the skill's install ~/clipping/.venv/bin/python -m pip install -U --pre "yt-dlp[default]" # nightly, if a fix isn't released yet yt-dlp -U # standalone binary installs brew upgrade yt-dlp # Homebrew installs
AutoClip: find the moments, cut the clips
AutoClip (github.com/zhouxiaoka/autoclip) is the brain of the setup. Give it a long video and it finds the best moments and cuts them out. It follows whoever is talking, crops each clip to vertical and adds subtitles. Options vary by version. The skill switches them on where your copy has them and tells you if one is missing.
Clone:
bashgit clone https://github.com/zhouxiaoka/autoclip.git ~/clipping/autoclip cd ~/clipping/autoclip
Install route. The README offers two:
- Docker (recommended): one Compose stack with everything inside. Start it with
docker compose up -d --buildfrom the repo folder, or the start script the README names. - Manual: a Python backend in a virtualenv, a Redis server, the background worker that processes videos, and the React frontend via
npm install. Use it only if Docker isn't an option.
Services and ports. A web UI, an API backend, Redis as the task queue, and a worker that runs the cutting with ffmpeg. At the time of writing the README's defaults are the web UI on port 3000 and the API on 8000, with interactive API docs at /docs. Redis uses 6379. Always confirm the host ports in your copy's compose file. The skill reads them from there.
LLM config. AutoClip needs an LLM to judge which moments are worth clipping. Settings go in the env file you create from the repo's example env file (the README names it), and some versions also expose them on a settings page.
- Cloud providers: bring an API key for a provider the README lists. The project began on Alibaba's Qwen (DashScope) API. Check the README for the current list.
- Local models: Ollama (API on port 11434) or LM Studio (local server on port 1234). Free to run, but slower and heavier on RAM.
- Docker gotcha: inside a container,
localhostis the container itself. Point AutoClip athttp://host.docker.internal:11434(or:1234). On Linux, also addextra_hosts: ["host.docker.internal:host-gateway"]to the AutoClip services.
Submit a long video. Two ways:
- In the web UI: create a project and upload the MP4 (plus an SRT subtitle file if you have one).
- Through the API: that's what
clip_pipeline.pydoes. The skill maps your version's API routes from its OpenAPI document, so the script keeps working when routes change between releases.
Where the clips land. Finished clips are saved inside AutoClip's data folder, organised per project, and you can download them from the web UI. The skill bind-mounts that folder to your disk. After the first test run it records the exact path pattern as AUTOCLIP_CLIPS_GLOB. The script copies the clips into ~/clipping/clips/<run-id>/.
Postiz: your own scheduling dashboard
Postiz is an open-source social media scheduler you host yourself. One dashboard posts to TikTok, YouTube Shorts and Instagram Reels, plus many other networks.
Install with Docker Compose (official method). The full, current Compose file lives in the gitroomhq/postiz-docker-compose repository:
bashgit clone https://github.com/gitroomhq/postiz-docker-compose.git ~/clipping/postiz cd ~/clipping/postiz openssl rand -hex 32 # use the output as JWT_SECRET
Postiz is configured entirely with environment variables. Set them in docker-compose.yaml, in a postiz.env file mounted at /config, or in a .env file next to the Compose file (the docs advise against that last one).
Required variables (in the postiz service):
| Variable | What to set |
|---|---|
MAIN_URL | Your Postiz address, e.g. http://localhost:4007 |
FRONTEND_URL | Same address |
NEXT_PUBLIC_BACKEND_URL | Same address + /api |
BACKEND_INTERNAL_URL | Keep the shipped value |
JWT_SECRET | The openssl rand -hex 32 output |
DATABASE_URL | Keep the shipped value (points at the bundled PostgreSQL) |
REDIS_URL | Keep the shipped value (points at the bundled Redis) |
Local example:
yamlenvironment: MAIN_URL: "http://localhost:4007" FRONTEND_URL: "http://localhost:4007" NEXT_PUBLIC_BACKEND_URL: "http://localhost:4007/api" JWT_SECRET: "<<OUTPUT_OF_openssl_rand_-hex_32>>"
Domain example (needed for TikTok and Instagram):
yamlMAIN_URL: "https://<<postiz.yourdomain.com>>" FRONTEND_URL: "https://<<postiz.yourdomain.com>>" NEXT_PUBLIC_BACKEND_URL: "https://<<postiz.yourdomain.com>>/api"
bash# One simple way to get HTTPS on a server: Caddy as a reverse proxy caddy reverse-proxy --from <<postiz.yourdomain.com>> --to localhost:4007
Good to know:
- File storage defaults to local disk. Cloudflare R2 is the other option.
- Email uses Resend (API key) or SMTP. Both are optional for a single-user setup.
- Since v2.12.0 the stack includes Temporal, which scheduled posts depend on. Upgrading from v2.11.2? Read the migration guide in the Postiz docs first.
- After changing any variable:
docker compose downthendocker compose up -d.
Start it:
bashcd ~/clipping/postiz && docker compose up -d
Open http://localhost:4007. The Temporal UI, for watching scheduled jobs, is at http://localhost:8080.
First login:
- Open your Postiz address and sign up. The first account becomes the organisation owner. Self-hosted Postiz has no plans or limits.
- If Postiz asks you to confirm your email and you haven't set up email, check the configuration reference in the Postiz docs.
- On a public server, set
DISABLE_REGISTRATION: "true"afterwards and restart, so nobody else can sign up.
Create a public API key:
- Go to Settings → Public API.
- Copy the key.
- Paste it into
~/clipping/pipeline.envasPOSTIZ_API_KEY. Do this yourself, in the file, so the key stays out of your chat history.
Connect TikTok, YouTube and Instagram
For each network, you register your own developer app and give Postiz the keys as environment variables. Every redirect URL follows the same pattern: your FRONTEND_URL + /integrations/social/<provider>. Confirm each one on that provider's page in the Postiz docs before you save it.
Warning: approval takes time. Platform app review can take weeks. Start these applications early. Until approval, expect limits: TikTok posts from unaudited apps are private-only, and YouTube uploads from unverified API projects are private.
YouTube (Google Cloud OAuth app)
- Create a project in the Google Cloud console.
- Enable the YouTube Data API v3, plus any other API the Postiz YouTube page lists.
- Configure the OAuth consent screen. While it's in Testing, add your Google account as a test user.
- Create an OAuth client ID, type Web application.
- Authorised redirect URI:
https://<<postiz.yourdomain.com>>/integrations/social/youtube(orhttp://localhost:4007/integrations/social/youtubefor local testing). - Fill
YOUTUBE_CLIENT_IDandYOUTUBE_CLIENT_SECRET. - The default daily API quota allows only a handful of uploads. Request more in the Google Cloud console if you need it.
TikTok (TikTok for Developers app)
- Create an app in the TikTok developer portal.
- Add Login Kit and the Content Posting API.
- Request the scopes
user.info.basic,video.uploadandvideo.publish. - Redirect URI:
https://<<postiz.yourdomain.com>>/integrations/social/tiktok. TikTok requires HTTPS. - Fill
TIKTOK_CLIENT_IDandTIKTOK_CLIENT_SECRET. - Submit for review. Keep
TIKTOK_PRIVACY=SELF_ONLYinpipeline.envuntil the app passes its audit.
Instagram (Meta developer app + professional account)
- Switch your Instagram account to a professional account (Business or Creator).
- Create a Meta developer app, then pick one route:
- Facebook-linked: add Facebook Login for Business and link the Instagram account to a Facebook Page. Redirect URI:
https://<<postiz.yourdomain.com>>/integrations/social/instagram. FillFACEBOOK_APP_IDandFACEBOOK_APP_SECRET. - Instagram-only: add Instagram API with Instagram Login. Redirect URI:
https://<<postiz.yourdomain.com>>/integrations/social/instagram-standalone. FillINSTAGRAM_APP_IDandINSTAGRAM_APP_SECRET.
- Facebook-linked: add Facebook Login for Business and link the Instagram account to a Facebook Page. Redirect URI:
- In development mode, only accounts with a role on the app can connect. Going live requires Meta's App Review.
- Instagram fetches your video from the Postiz server, so Postiz must be on a public HTTPS address.
Apply the keys
bashcd ~/clipping/postiz # add the *_CLIENT_ID / *_SECRET / *_APP_ID variables to the postiz service env, then: docker compose down && docker compose up -d
In Postiz, click Add Channel and connect each account.
| Platform | Redirect URL | Env vars |
|---|---|---|
| YouTube | <FRONTEND_URL>/integrations/social/youtube | YOUTUBE_CLIENT_ID, YOUTUBE_CLIENT_SECRET |
| TikTok | <FRONTEND_URL>/integrations/social/tiktok | TIKTOK_CLIENT_ID, TIKTOK_CLIENT_SECRET |
| Instagram (via Facebook) | <FRONTEND_URL>/integrations/social/instagram | FACEBOOK_APP_ID, FACEBOOK_APP_SECRET |
| Instagram (standalone) | <FRONTEND_URL>/integrations/social/instagram-standalone | INSTAGRAM_APP_ID, INSTAGRAM_APP_SECRET |
The wiring layer
The skill writes ~/clipping/bin/clip_pipeline.py (Template B in the SKILL.md) and its settings file ~/clipping/pipeline.env (Template A). Want the script without Claude? Copy Template B out of the block above, save it to that path and fill in the env file by hand.
Shared folder layout:
prompt~/clipping/ ├── .venv/ Python environment with yt-dlp ├── pipeline.env every setting and key the script reads (chmod 600) ├── bin/clip_pipeline.py the wiring script ├── input/ yt-dlp downloads (MP4 + optional SRT) ├── clips/<run-id>/ finished clips copied out of AutoClip as clip_01.mp4, clip_02.mp4 … ├── runs/<run-id>.json what each run produced and queued ├── autoclip/ AutoClip repo and Docker stack; its data/ folder holds projects └── postiz/ postiz-docker-compose repo; docker-compose.yaml holds Postiz's settings
What one run does:
- Download. yt-dlp saves the video as MP4 in
input/, plus subtitles when the site has them. A local file path skips this step. - Process. The script uploads the video to AutoClip's API and starts processing.
- Wait. It checks the project status every 30 seconds until AutoClip finishes.
- Collect. It copies the top clips into
clips/<run-id>/and warns if any clip isn't vertical. - Upload. Each clip goes to Postiz's media endpoint.
- Queue. One post per clip goes to every connected channel, as a draft or scheduled every
POST_EVERY_HOURS. - Record. It writes a manifest to
runs/<run-id>.json.
The Postiz public API is rate-limited per hour. The script stays light: one upload and one post request per clip, with every platform in the same request. --max-clips (default 5) keeps each run small.
The two Postiz calls, by hand (handy for testing your key):
bashKEY='<<YOUR_POSTIZ_PUBLIC_API_KEY>>' API=http://localhost:4007/api/public/v1 # 1. List connected channels: note each channel's "id" and "identifier" curl -s -H "Authorization: $KEY" "$API/integrations" # 2. Upload a clip: the response includes "id" and "path" curl -s -H "Authorization: $KEY" -F 'file=@"clip_01.mp4";type=video/mp4' "$API/upload" # 3. Save it as a draft on one channel curl -s -H "Authorization: $KEY" -H "Content-Type: application/json" -d '{"type":"draft","date":"2026-12-06T15:00:00.000Z","shortLink":false,"tags":[],"posts":[{"integration":{"id":"<<CHANNEL_ID>>"},"value":[{"content":"Test clip","image":[{"id":"<<MEDIA_ID>>","path":"<<MEDIA_PATH>>"}]}],"settings":{"__type":"youtube","title":"Test clip","type":"private","selfDeclaredMadeForKids":"no","tags":[]}}]}' "$API/posts"
Each platform expects its own settings fields. If Postiz rejects a post, compare the script's platform_settings with the current Postiz Public API docs and update it.
Run the channel with one command
Add a shortcut once:
bashecho "alias clipit='~/clipping/.venv/bin/python ~/clipping/bin/clip_pipeline.py'" >> ~/.zshrc # bash: ~/.bashrc source ~/.zshrc
Then a URL goes in and clips come out queued in Postiz:
bashclipit "https://www.youtube.com/watch?v=<<VIDEO_ID>>" --schedule --max-clips 5
The last line is a summary such as {"run_id": "20261205-141500", "clips": 5, "postiz": "scheduled"}. The full details are in ~/clipping/runs/<run-id>.json.
More ways to run it:
bashclipit "<<VIDEO_URL>>" # drafts only: review in Postiz first clipit "<<LIVESTREAM_URL>>" --live --schedule # record a live stream, then clip it clipit ~/Videos/<<your-own-episode>>.mp4 --schedule # a file you already have clipit "<<VIDEO_URL>>" --schedule --start 2026-12-06T15:00:00Z clipit --project-id <<AUTOCLIP_PROJECT_ID>> --schedule # reuse a finished AutoClip project
Or from inside Claude Code:
text/clipping-pipeline run https://www.youtube.com/watch?v=<<VIDEO_ID>> --schedule
Start with drafts. Watch a few clips, then switch to --schedule once you trust the output.
Verify the setup
Run these after setup and whenever something feels off.
bash# 1. yt-dlp and ffmpeg ~/clipping/.venv/bin/yt-dlp --version ffmpeg -version | head -1 # 2. AutoClip: containers up, API answering, UI loading cd ~/clipping/autoclip && docker compose ps curl -fsS http://localhost:8000/openapi.json > /dev/null && echo "AutoClip API up" # then open the web UI (http://localhost:3000 by default) in your browser # 3. Postiz: containers up and dashboard reachable cd ~/clipping/postiz && docker compose ps curl -s -o /dev/null -w "Postiz HTTP %{http_code} " http://localhost:4007 # 4. Everything at once, including your Postiz API key ~/clipping/.venv/bin/python ~/clipping/bin/clip_pipeline.py --check
Use the ports from your own compose files if you changed them. --check prints OK or FAIL for each stage and lists the channels Postiz sees.
Test post saved as a draft:
- In the Postiz dashboard, create a post on any connected channel, attach a short MP4 and save it as a draft, not "post now".
- Then test the full pipeline on a short video you own:
bashclipit "<<SHORT_VIDEO_YOU_OWN>>" --max-clips 1
A new draft with your clip should appear in Postiz.
Troubleshooting
| Problem | What you see | Fix |
|---|---|---|
| Missing ffmpeg | ERROR: You have requested merging of multiple formats but ffmpeg is not installed, or --check shows FAIL ffmpeg | Install it (brew install ffmpeg or sudo apt install -y ffmpeg), then confirm ffmpeg -version and ffprobe -version. With AutoClip's manual install, the backend needs it on PATH too. |
| Docker port conflict | Bind for 0.0.0.0:3000 failed: port is already allocated | Find what holds the port: lsof -i :3000 (macOS) or ss -ltnp (Linux). Stop it, or change the left number in the compose port mapping (e.g. "3001:3000") and update the matching URLs in pipeline.env or Postiz's env. |
| AutoClip LLM not configured | Project stuck or failed at the analysis step; auth or model errors in docker compose logs | Set provider, model and key in AutoClip's env file or settings, then restart its stack. For Ollama, ollama list must show the model. From Docker, use host.docker.internal instead of localhost. |
| Postiz OAuth redirect mismatch | Google shows Error 400: redirect_uri_mismatch; TikTok or Meta report an invalid redirect URI | The redirect URL in the developer app must match FRONTEND_URL/integrations/social/<provider> exactly: same scheme, domain and port, no trailing slash. After any env change: docker compose down && docker compose up -d. |
| Platform API rejections | Post fails in Postiz, or the script stops on an HTTP error from /posts | TikTok unaudited: use SELF_ONLY. YouTube unverified: uploads stay private, and quota can run out. Instagram: needs a professional account and a public HTTPS Postiz. Check the clip is vertical. If the error mentions settings, compare platform_settings with the Postiz Public API docs. |
| yt-dlp extractor errors | Unable to extract, HTTP Error 403, Sign in to confirm you're not a bot | Update yt-dlp (pip install -U "yt-dlp[default]"; nightly with --pre), install Deno for YouTube, then retry. |
| Scheduled posts never go out | Posts sit in the calendar past their time | Run docker compose ps in ~/clipping/postiz. The Temporal services must be running (required since v2.12.0). Check them at http://localhost:8080. |
| Clips are horizontal or have no subtitles | The script logs WARNING: clip_01.mp4 is not vertical | Turn on 9:16 output and subtitles in AutoClip's settings, then reprocess. |
| Script can't find clips | No clips match ... | Find the files with find ~/clipping/autoclip -name '*.mp4' -mmin -180, fix AUTOCLIP_CLIPS_GLOB, rerun with --project-id. |
Costs and licensing
The software is free. Your time, the LLM and any server are the costs.
- yt-dlp: Unlicense (public domain). Free.
- AutoClip: MIT. Free. Its analysis needs an LLM: your own API key billed at your provider's rates, or a free local model in Ollama or LM Studio.
- Postiz: AGPL-3.0. Free when self-hosted, with no plans or limits. If you modify Postiz and offer it to others over a network, the AGPL requires you to share your changes. Prefer not to host it? Postiz Cloud has no free tier; its pricing page listed plans from $29/month (Standard, 5 channels) in October 2026, each with a 7-day trial.
- Hosting: $0 on your own computer, which must stay on for scheduled posts. Deploying to a server or VPS costs whatever your provider charges. Size it for the video work, not just Postiz.
Rights and terms
Only clip what you're allowed to clip.
- Clip content you own, content you have written permission to use, or content covered by a creator's clipping program, and follow that program's rules.
- yt-dlp downloads are subject to each site's terms of service. Read them for every site you pull from.
- Posting to TikTok, YouTube and Instagram through your own developer apps also means following each platform's developer and content policies.
- When in doubt, ask the creator first.
FAQ
Can I run this on my laptop without a domain or server?
Yes, for most of it. Downloading, clipping and Postiz all run locally, and YouTube accepts a localhost redirect for testing. TikTok and Instagram need Postiz on a public HTTPS address. Your laptop also has to stay on for scheduled posts to go out. Many people start local, then move Postiz to a small server.
Can I use Postiz Cloud instead of self-hosting?
Yes. Skip the Postiz install steps, create an API key in your cloud account, and set POSTIZ_API_URL and POSTIZ_API_KEY in pipeline.env to the values shown in Postiz's Public API docs. Cloud is a paid service with a 7-day trial. Self-hosting is free.
Which LLM should I pick for AutoClip? For a first test, use a cloud API key from a provider AutoClip supports. It's fast and simple, and you pay per use. For a high-volume channel, a local model in Ollama or LM Studio costs nothing per video but needs more RAM and runs slower. You can switch later by changing AutoClip's LLM settings and restarting it.
For more practical Claude Code builds for solo founders, keep an eye on the Hypd blog.