/media-os:ffmpeg-metadata [operation] [input]from media-os
Authors metadata, chapters, and cover art in media files using ffmpeg flags. Sets container/stream tags, adds chapter markers, embeds cover art, attaches fonts, and strips metadata without re-encoding.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
default and/or forced.Decide which category your task falls in. Each maps to a different flag set.
| Operation | Core flags |
|---|---|
| Set container tags | -metadata KEY=VALUE ... |
| Set per-stream tags | -metadata:s:<type>:<index> KEY=VALUE (e.g. s:a:0, s:v:0, s:s:0) |
| Add chapters | ffmetadata file + -map_metadata 1 -map_chapters 1 |
| Extract chapters | -f ffmetadata chapters.txt |
| Embed cover art | Second input (image) + -map 0 -map 1:v -disposition:v:<i> attached_pic |
| MKV attachment | -attach FILE -metadata:s:t:<i> mimetype=... |
| Strip metadata | -map_metadata -1 -map_chapters -1 |
| Disposition flags | -disposition:<specifier> +default+forced (or bare value to replace) |
All of these should use -c copy — changing metadata never requires re-encoding.
ffmpeg -i in.mp4 -c copy \
-metadata title="My Video" \
-metadata artist="Alice" \
-metadata year=2026 \
-metadata comment="Rendered 2026-04-17" \
out.mp4
ffmpeg -i in.mkv -c copy \
-metadata:s:a:0 language=eng -metadata:s:a:0 title="English 5.1" \
-metadata:s:a:1 language=fra -metadata:s:a:1 title="Français Stereo" \
-metadata:s:s:0 language=eng -metadata:s:s:0 title="English SDH" \
out.mkv
Stream specifiers: s:v:0 (first video), s:a:1 (second audio), s:s:0 (first subtitle), s:t:0 (first attachment in MKV).
Create chapters.txt (FIRST line must be ;FFMETADATA1):
;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0
END=60000
title=Intro
[CHAPTER]
TIMEBASE=1/1000
START=60000
END=180000
title=Main
[CHAPTER]
TIMEBASE=1/1000
START=180000
END=210000
title=Outro
Apply:
ffmpeg -i in.mp4 -i chapters.txt -map_metadata 1 -map_chapters 1 -c copy out.mp4
ffmpeg -i in.mp4 -f ffmetadata chapters_out.txt
You can edit the resulting file (change titles, times) and re-apply with the command above.
MP3:
ffmpeg -i in.mp3 -i cover.jpg \
-map 0:a -map 1:v -c copy \
-id3v2_version 3 \
-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" \
-disposition:v:0 attached_pic \
out.mp3
MP4 / M4A:
ffmpeg -i in.m4a -i cover.jpg \
-map 0 -map 1 -c copy \
-disposition:v:1 attached_pic \
out.m4a
MKV (via attachment):
ffmpeg -i in.mkv -attach cover.jpg \
-metadata:s:t:0 mimetype=image/jpeg \
-metadata:s:t:0 filename=cover.jpg \
-c copy out.mkv
ffmpeg -i in.mkv -attach arial.ttf \
-metadata:s:t:0 mimetype=application/x-truetype-font \
-metadata:s:t:0 filename=arial.ttf \
-c copy out.mkv
# ADD flags (keeps any existing)
ffmpeg -i in.mkv -c copy -disposition:s:0 +default+forced out.mkv
# REPLACE flags (drops everything else)
ffmpeg -i in.mkv -c copy -disposition:s:0 default out.mkv
# CLEAR all flags on a stream
ffmpeg -i in.mkv -c copy -disposition:s:0 0 out.mkv
ffmpeg -i in.mp4 -map 0 -map_metadata -1 -map_chapters -1 \
-c copy -fflags +bitexact -flags:v +bitexact -flags:a +bitexact \
out.mp4
The +bitexact flags also suppress the automatic encoder=Lavf... tag ffmpeg adds.
After writing metadata, confirm it stuck:
# All format + stream tags, JSON
ffprobe -v error -show_format -show_streams -show_chapters -of json out.mp4
# Just the title
ffprobe -v error -show_entries format_tags=title -of default=nw=1:nk=1 out.mp4
# Per-stream language tags
ffprobe -v error -show_entries stream=index,codec_type:stream_tags=language,title \
-of compact out.mkv
# Disposition flags
ffprobe -v error -show_entries stream=index,codec_type:stream_disposition=default,forced,attached_pic \
-of compact out.mkv
# Chapters only
ffprobe -v error -show_chapters -of json out.mp4
If a tag is missing, check: (a) container supports that key, (b) you used -c copy (re-encoding sometimes drops unsupported tags), (c) -map_metadata wasn't set to -1.
-c copy is required for metadata-only edits, otherwise ffmpeg re-encodes (slow, quality loss).title, artist, album, album_artist, composer, date/year, comment, genre, track, disc, copyright, description, synopsis, show, episode_id, network, lyrics, performer. Arbitrary keys silently drop.-id3v2_version 3 for maximum player compatibility.-disposition:v:0 attached_pic or players ignore it.covr atom; ffmpeg handles this automatically when attached_pic disposition is set on the image stream.;FFMETADATA1 on line 1 — no leading whitespace, no BOM.TIMEBASE uses fraction form — 1/1000 = milliseconds, 1/1 = seconds, 1/90000 = MPEG-TS ticks. START and END are integers in timebase units.encoder=Lavf... sneaks back in even after -map_metadata -1. Add -fflags +bitexact -flags:v +bitexact -flags:a +bitexact to suppress.-map_chapters -1 is separate from -map_metadata -1 — chapters are tracked independently, strip both to fully clean.-disposition:s:0 +default+forced ADDS, -disposition:s:0 default REPLACES. 0 clears all flags.-map to control order.-c copy — that's by design. To remove them, see -map -0:t exclusion.-metadata:g KEY=VALUE also works for global tags (equivalent to bare -metadata).-metadata:s:a:0 applies to OUTPUT stream 0 of type a, after -map reordering. If you remap, recount.ffmpeg -i episode42.mp3 -i cover.jpg \
-map 0:a -map 1:v -c copy -id3v2_version 3 \
-metadata title="Episode 42: Time Travel" \
-metadata artist="The Pod" -metadata album="The Pod Season 3" \
-metadata date=2026 -metadata track=42 -metadata genre=Podcast \
-disposition:v:0 attached_pic \
out.mp3
chapters.txt (see Step 2).ffmpeg -i movie.mkv -i chapters.txt \
-map_metadata 1 -map_chapters 1 \
-metadata:s:a:0 language=eng -metadata:s:a:0 title="English 5.1" \
-metadata:s:a:1 language=fra -metadata:s:a:1 title="Français 5.1" \
-metadata:s:s:0 language=eng -disposition:s:0 +default \
-c copy tagged.mkv
ffmpeg -i vacation.mp4 -map 0 -map_metadata -1 -map_chapters -1 \
-c copy -fflags +bitexact -flags:v +bitexact -flags:a +bitexact \
clean.mp4
ffprobe -v error -show_format -show_streams clean.mp4 | grep -i tag
ffmpeg -i in.mkv -c copy -disposition:s:0 +default+forced out.mkv
ffprobe -show_entries stream=index:stream_disposition=default,forced -of compact out.mkv
At least one output file must be specifiedCause: -f ffmetadata extraction missing an output path.
Solution: ffmpeg -i in.mp4 -f ffmetadata chapters.txt — chapters.txt is the output.
Cause: Container doesn't support that tag name (common: arbitrary keys on MP4).
Solution: Use MKV for free-form tags, or pick a supported MP4 key from the list in references/tags.md.
Cause: Missing attached_pic disposition, OR cover is first video stream when player expects it second.
Solution: Set -disposition:v:N attached_pic on the image stream; reorder with -map so the primary video is first.
Cause: ffmetadata file missing ;FFMETADATA1 header, or wrong TIMEBASE.
Solution: First line must be exactly ;FFMETADATA1. TIMEBASE must be N/D (e.g. 1/1000).
Cause: Used two-letter code (en) instead of three-letter ISO 639-2 (eng).
Solution: Always use three-letter: eng, fra, deu, spa, ita, por, jpn, kor, zho, rus, ara, hin.
encoder=Lavf... keeps appearingCause: ffmpeg writes its own encoder tag.
Solution: Add -fflags +bitexact -flags:v +bitexact -flags:a +bitexact.
references/tags.md for the ffmetadata format spec, per-container tag catalogs (MP4/MKV/MP3/FLAC/OGG/WAV), ISO 639-2 language codes, disposition flag list, cover-art compatibility matrix, MKV edition entries, and ffprobe verification recipes.scripts/meta.py — argparse CLI for all metadata operations (set, chapters, extract-chapters, cover, attach, strip, disposition). Prints the ffmpeg command it runs; supports --dry-run and --verbose. Stdlib only.Usage examples:
# Set container + per-stream tags
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py set \
--input in.mp4 --output out.mp4 \
--tags title="My Video" artist="Alice" year=2026 \
--stream-tags a:0:language=eng a:0:title="English 5.1" s:0:language=eng
# Add chapters from inline timestamps
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py chapters \
--input in.mp4 --output out.mp4 \
--from-timestamps "0:00 Intro" "1:00 Main" "3:00 Outro"
# Add chapters from a pre-written ffmetadata file
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py chapters \
--input in.mp4 --output out.mp4 --chapters-file chapters.txt
# Extract chapters
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py extract-chapters \
--input in.mp4 --output chapters.txt
# Embed cover art
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py cover \
--input song.mp3 --output tagged.mp3 --image cover.jpg
# Attach font to MKV
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py attach \
--input in.mkv --output out.mkv --file arial.ttf \
--mimetype application/x-truetype-font
# Set disposition flags
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py disposition \
--input in.mkv --output out.mkv --stream s:0 --flags "+default+forced"
# Strip everything
uv run ${CLAUDE_SKILL_DIR}/scripts/meta.py strip \
--input in.mp4 --output clean.mp4
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
/audio-pipewireRoute and introspect Linux audio/video/MIDI graphs with PipeWire: pw-cli (interactive object/module control), pw-dump (full graph JSON with --monitor), pw-link (list/create/destroy port links), pw-cat / pw-play / pw-record (playback+record), pw-top (real-time DSP load + xrun viewer), pw-metadata (shared metadata store), pw-loopback (source/sink bridges), pw-midiplay/pw-midirecord, pw-jack (JACK client compat shim), pw-mon, pw-profiler. WirePlumber session manager handles routing/defaults/profiles. Replaces PulseAudio (via pipewire-pulse) and JACK (via libjack.so shim) simultaneously. Use when the user asks to route Linux audio, link two apps, list audio devices on Linux, create a loopback, record system audio, monitor the audio graph, or set up a virtual audio device on modern Linux.
/audio-wasapiManipulate Windows audio via WASAPI (learn.microsoft.com/coreaudio): SoundVolumeView + svcl.exe (NirSoft — set default device, per-app volumes, save/load profiles), AudioDeviceCmdlets PowerShell module (Get-AudioDevice, Set-AudioDevice, Get-AudioDevicePlaybackMute), nircmd setdefaultsounddevice. Shared mode (Windows engine resamples all streams to endpoint fixed format) vs Exclusive mode (bit-perfect, audiophile, ~sub-3ms latency with IAudioClient3 + event-driven callbacks). WASAPI then MMDevice then Audio Engine (audiodg.exe) then WDM/KS. ASIO is Steinberg's parallel stack bypassing Windows audio. Virtual audio devices: VB-Audio Virtual Cable, VoiceMeeter/Banana/Potato. Use when the user asks to change Windows default audio device, route app audio, use VoiceMeeter, install VB-Cable, set a specific device from PowerShell, or enable exclusive-mode low-latency output.
/cv-mediapipeGoogle MediaPipe Tasks API (current supported, NOT legacy mediapipe.solutions): Vision Tasks (Face Detector, Face Landmarker, Face Stylizer, Hand Landmarker, Gesture Recognizer, Pose Landmarker, Holistic Landmarker, Object Detector, Image Classifier, Image Segmenter, Interactive Segmenter, Image Embedder, Image Generator), Audio Tasks (Audio Classifier), Text Tasks (Text Classifier, Text Embedder, Language Detector), GenAI Tasks (LLM Inference — on-device Gemma/Phi-2/Falcon/StableLM). Three run modes: IMAGE, VIDEO, LIVE_STREAM (async). Python: mediapipe.tasks.python.vision/audio/text/genai. Docs at ai.google.dev/edge/mediapipe/solutions. Model Maker for transfer learning. Use when the user asks to detect pose/face/hand landmarks, classify an image, run a body-pose model, segment people, recognize gestures, do on-device LLM inference via MediaPipe, or build a mobile/embedded CV pipeline.
/cv-opencvComputer vision on images + video with OpenCV (docs.opencv.org/4.x/): core (Mat / ndarray, linalg), imgproc (filtering, morphology, geometric transforms, color conv, histograms, contours), imgcodecs (imread/imwrite — PNG, JPEG, TIFF, WebP, EXR), videoio (VideoCapture / VideoWriter — FFMPEG, GStreamer, V4L2, AVFoundation, MSMF backends), calib3d (camera calibration, stereo, solvePnP, homography), features2d (ORB, AKAZE, BRISK, KAZE, SIFT), objdetect (FaceDetectorYN, FaceRecognizerSF, HOG, ArUco, QRCode), dnn (ONNX/TF/Caffe/Darknet, CUDA + OpenVINO + Vulkan backends, model zoo at github.com/opencv/opencv_zoo), photo (inpainting, denoising, HDR Debevec/Robertson), stitching (panorama), video (optical flow Farneback/LK/DIS, BackgroundSubtractorMOG2/KNN, tracking KCF/CSRT/MIL/Nano/Vit/DaSiamRPN). Python-first via cv2. Use when the user asks to detect faces, track objects, run YOLO inference, capture + process webcam frames, calibrate a camera, stitch a panorama, or use OpenCV from Python/C++.
npx claudepluginhub damionrashford/media-os --plugin media-osOther plugins' skills for the same job