/media-os:ffmpeg-probe [input] [fields]from media-os
Inspects media files with ffprobe: format, streams, codecs, duration, bitrate, resolution, fps, color space, HDR, chapters, and per-frame/packet analysis, outputting JSON/CSV/XML.
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
ffprobe -v error -show_format -show_streams -of json in.mp4 → Step 1uv run ${CLAUDE_SKILL_DIR}/scripts/probe.py summary --input in.mp4ffmpeg-playback; for transcoding use ffmpeg-transcode;
for raw extradata/bitstream inspection use ffmpeg-bitstream.ffprobe organises output into sections. Combine as many -show_* flags as needed:
| Flag | Contents | Size |
|---|---|---|
-show_format | Container: filename, duration, size, bit_rate, tags | small |
-show_streams | Per-stream: codec, resolution, fps, channels, color, tags | small |
-show_chapters | Chapter list with start/end times and titles | small |
-show_programs | MPEG-TS programs (broadcast / multi-program streams) | small |
-show_frames | Every decoded frame (pict_type, pts, key_frame, …) | HUGE |
-show_packets | Every packet (pts, dts, size, flags) | HUGE |
-show_entries K=V,… | Whitelist specific sections/fields (see references/queries.md) | small |
-show_error | Structured error if demuxing fails | tiny |
For -show_frames / -show_packets, always combine with either
-select_streams and/or -read_intervals to bound the output:
ffprobe -v error -select_streams v:0 -read_intervals "%+#20" -show_frames -of json in.mp4
# reads the first 20 packets of v:0 (the `%+#N` form = first N packets)
-of value | Use case |
|---|---|
default | Human-ish, section.key=value lines |
default=noprint_wrappers=1:nokey=1 | Bare value(s), one per line — great for shell |
json | Scripts / jq / the bundled probe.py |
csv=p=0 | Spreadsheet; p=0 strips the section name |
csv=s=x:p=0 | Use x as separator (e.g. 1920x1080) |
flat | streams.stream.0.width=1920 — easy to grep |
ini | INI sections per stream |
xml | XML (pair with -x pretty-print) |
Rule of thumb: json for automation, default=…nokey=1 for shell
one-liners, csv when you want to paste into a sheet.
Full dump, JSON (the default starting point):
ffprobe -v error -show_format -show_streams -of json in.mp4
Duration in seconds (float):
ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 in.mp4
Resolution as 1920x1080:
ffprobe -v error -select_streams v:0 \
-show_entries stream=width,height -of csv=s=x:p=0 in.mp4
FPS as a fraction (30000/1001, 25/1, …):
ffprobe -v error -select_streams v:0 \
-show_entries stream=r_frame_rate \
-of default=nokey=1:noprint_wrappers=1 in.mp4
Parse the fraction yourself — it is not a float. See Gotchas.
Codec name (video / audio):
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name \
-of default=nokey=1:noprint_wrappers=1 in.mp4
ffprobe -v error -select_streams a:0 -show_entries stream=codec_name \
-of default=nokey=1:noprint_wrappers=1 in.mp4
Bitrate (stream level first, then container fallback):
ffprobe -v error -select_streams v:0 -show_entries stream=bit_rate \
-of default=nokey=1:noprint_wrappers=1 in.mp4
# fallback if "N/A":
ffprobe -v error -show_entries format=bit_rate \
-of default=nokey=1:noprint_wrappers=1 in.mp4
Audio channel layout / channel count / sample rate:
ffprobe -v error -select_streams a:0 \
-show_entries stream=channel_layout,channels,sample_rate \
-of default=noprint_wrappers=1 in.mp4
Color info (for HDR / BT.2020 / BT.709 classification):
ffprobe -v error -select_streams v:0 \
-show_entries stream=color_space,color_primaries,color_transfer,color_range,pix_fmt \
-of json in.mp4
HDR detection (full recipe):
ffprobe -v error -select_streams v:0 \
-show_entries stream=color_transfer,color_primaries,color_space:stream_side_data_list \
-of json in.mp4
Classify:
color_transfer=smpte2084 + color_primaries=bt2020 → HDR10 (also check
mastering_display_metadata / content_light_level in side_data_list for HDR10).color_transfer=arib-std-b67 → HLG.side_data_type="DOVI configuration record" → Dolby Vision.bt709).Frame count (exact — SLOW, decodes whole stream):
ffprobe -v error -count_frames -select_streams v:0 \
-show_entries stream=nb_read_frames -of csv=p=0 in.mp4
Prefer the fast path first:
ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames \
-of default=nokey=1:noprint_wrappers=1 in.mp4
# "N/A" → fall back to -count_frames, or compute duration * fps.
Keyframe timestamps:
ffprobe -v error -select_streams v:0 -show_frames \
-show_entries frame=pkt_pts_time,pict_type \
-of csv=p=0 in.mp4 | awk -F, '$2=="I" {print $1}'
All packets (use intervals — raw -show_packets is huge):
ffprobe -v error -select_streams v:0 -read_intervals "10%+30" \
-show_packets -of json in.mp4
# reads 30 seconds starting 10% into the file
Chapters:
ffprobe -v error -show_chapters -of json in.mkv
Metadata tags (format + per-stream):
ffprobe -v error -show_entries format_tags:stream_tags -of json in.mp4
scripts/probe.py — stdlib-only wrapper. Subcommands:
summary --input I — human-readable container / V / A summary.json --input I — full -show_format -show_streams JSON to stdout.field --input I --query KEY — dotted path: format.duration,
stream.v.width, stream.v.fps, stream.a.channels, …keyframes --input I — keyframe PTS times, one per line.hdr --input I — prints one of SDR, HDR10, HLG, DolbyVision.compare --inputs A.mp4 B.mp4 — side-by-side field diff.--verbose and --dry-run (prints the underlying
ffprobe command instead of executing).# Quick human summary:
uv run ${CLAUDE_SKILL_DIR}/scripts/probe.py summary --input in.mp4
# One field for a shell variable:
FPS=$(uv run ${CLAUDE_SKILL_DIR}/scripts/probe.py field --input in.mp4 --query stream.v.fps)
# HDR class:
uv run ${CLAUDE_SKILL_DIR}/scripts/probe.py hdr --input in.mp4
references/queries.md for the full
-show_entries field table, stream-specifier syntax, output-format cheat
sheet, an HDR detection flowchart, timebase math, and a 30+ one-liner library.r_frame_rate is a FRACTION (30000/1001, 24000/1001, 25/1), not a
float. Always parse num/den. probe.py does this; raw shell consumers must too.avg_frame_rate ≠ r_frame_rate on VFR content. r_frame_rate is the
lowest framerate that exactly describes every timestamp (effectively "base"
rate); avg_frame_rate = total frames / duration. For CFR they match; for
VFR use avg_frame_rate for "how many FPS on average", r_frame_rate for
"what does each timestamp snap to".-count_frames decodes the whole stream. Slow on long videos. Prefer
stream=nb_frames first; most MP4/MOV muxers write it. MKV usually does not.bit_rate at stream level is often N/A for streams inside MKV/WebM and
some fragmented MP4s. Fall back to format.bit_rate, or compute
file_size * 8 / duration.-v error to silence stderr noise when piping (otherwise ffprobe
prints banner + build info to stderr and callers assume it failed).v:0 picks the first video stream — after
-select_streams, the remaining stream's original index is still in its
JSON, but counting positions in the filtered output is different. Always
identify streams by index, not by position.pts * time_base.num / time_base.den. ffprobe exposes *_time convenience
fields (pkt_pts_time, best_effort_timestamp_time) already in seconds —
prefer those.-read_intervals "10%+30" = start at 10% of duration, read 30 seconds.
"%+#20" = from start, 20 packets. Great for sampling huge files without
dumping gigabytes of JSON.side_data_list (a.k.a. -show_entries stream_side_data_list) is where
HDR10 mastering display, content light level, Dolby Vision config, and
stereoscopic 3D layout live. Not in the main stream dict.ffprobe -f rawvideo -video_size 1920x1080 -pix_fmt yuv420p -framerate 24 in.yuv.-show_entries section syntax uses : between sections, , between
fields: -show_entries format=duration:stream=codec_name,bit_rate.-of json is nested: {"streams":[{...}], "format":{...}}. Flatten with
jq or -of flat if you need grep-friendly output.-hide_banner is implied when -v error is set, but set both to be safe
across ffmpeg versions.ffprobe -v error -select_streams v:0 \
-show_entries stream=width,height,r_frame_rate \
-of csv=p=0 in.mp4
# -> 1920,1080,30000/1001
uv run ${CLAUDE_SKILL_DIR}/scripts/probe.py hdr --input in.mp4
# -> HDR10
DUR=$(ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 in.mp4)
echo "$DUR" # 128.458667
ffprobe -v error -select_streams v:0 -show_frames \
-show_entries frame=pkt_pts_time,pict_type \
-of csv=p=0 in.mp4 | awk -F, '$2=="I"{print $1}' > keyframes.txt
uv run ${CLAUDE_SKILL_DIR}/scripts/probe.py compare --inputs orig.mp4 encoded.mp4
Invalid data found when processing inputCause: file is truncated, or container is wrong (e.g. .mp4 is actually a .ts).
Solution: try ffprobe -v error -show_format file (no -show_streams) to see
the detected format_name. If it's mpegts, treat as .ts. If ffprobe still
fails, the file is likely corrupt — try ffmpeg -err_detect ignore_err -i ….
bit_rate=N/A on every streamCause: muxer didn't write per-stream bitrate (common in MKV, WebM, fragmented MP4).
Solution: use format.bit_rate, or compute size_bytes * 8 / duration_seconds
from -show_entries format=size,duration.
r_frame_rate=0/0Cause: codec/container has no concept of a frame rate (image, some audio-only
containers probed for a non-existent video stream).
Solution: guard against num==0 || den==0 in parsers; skip fps reporting.
nb_frames=N/A but I need an exact countCause: muxer doesn't store it. Solution: either compute
duration * avg_frame_rate (approximate, fine for CFR) or use -count_frames
(slow, exact).
Cause: you hit a pipe or buffer limit dumping -show_frames / -show_packets
on a long file.
Solution: always scope with -select_streams + -read_intervals; stream JSON
to a file with > rather than piping through an aggressive consumer.
Option not found for -show_entriesCause: very old ffprobe (< 1.0). Solution: upgrade; on macOS
brew install ffmpeg.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub damionrashford/media-os --plugin media-os110 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++.
Other plugins' skills for the same job