/media-os:gstreamer-pipeline [pipeline]from media-os
Builds and runs GStreamer pipelines via gst-launch-1.0, introspects elements, discovers media, enumerates devices, and handles common flows like transcoding, RTP, WebRTC, and RTSP.
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
launch -- <pipeline-desc>)inspect --element <name>)discover --uri <uri>)devices)references/pipelines.mdgst-device-monitor-1.0.gst-discoverer-1.0.gst-launch-1.0 one-liner for bench-testing before coding the C / Rust / Python client.For documentation lookup (which properties does hlssink2 expose? what does webrtcbin support?), use the gstreamer-docs skill first.
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --element filesrc --dry-run
If this errors with "gst-inspect-1.0 not found", install:
brew install gstreamerapt install gstreamer1.0-tools gstreamer1.0-plugins-{base,good,bad,ugly} gstreamer1.0-libavdnf install gstreamer1 gstreamer1-plugins-{base,good,bad-free,ugly-free} gstreamer1-libavVerify plugin sets are present; many elements (e.g. webrtcbin, hlssink2, srtsink, x264enc) ship in -bad or -ugly or Rust plugins (gst-plugins-rs).
Never hand-assemble an element's properties from memory. Use:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --element webrtcbin
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --element hlssink2
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --element x264enc
List every factory:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py list-elements
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py list-elements --plugin coreelements
Find which elements handle a URI scheme (e.g. rtsp://):
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --uri-handlers
Filter by factory type:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --types "Codec/Encoder/Video"
Pair with the gstreamer-docs skill for the canonical URL and full property table if the CLI output is terse.
Discover streams, caps, duration, tags of a file or URL:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py discover --uri file:///path/to/file.mp4
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py discover --uri rtsp://camera.local/stream -v -t 10
List capture + output devices:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py devices
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py devices --classes "Video/Source" "Audio/Source"
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py devices --follow # watch add/remove events
Typefind (MIME / caps) on a blob:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py typefind /tmp/unknown.bin
launchUse -- to separate pipeline tokens from gst.py flags, then write the pipeline in GStreamer shell syntax:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch -- \
videotestsrc num-buffers=300 \
! video/x-raw,width=1280,height=720,framerate=30/1 \
! timeoverlay \
! autovideosink
Enable verbose caps negotiation:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch -v -- videotestsrc ! fakesink
Set GST_DEBUG without manual env export:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch \
--debug-level "3,webrtcbin:6" \
--debug-file /tmp/gst.log \
--verbose-tool -e -- \
videotestsrc ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000
Add --eos-on-shutdown when writing to a muxer so Ctrl-C finalises the file cleanly (otherwise matroskamux / mp4mux leave a truncated output).
Dry-run echoes the exact gst-launch-1.0 invocation and exits:
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch --dry-run -- filesrc location=in.mp4 ! decodebin ! autovideosink
playuv run ${CLAUDE_SKILL_DIR}/scripts/gst.py play video.mp4
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py play rtsp://cam/stream --audio-only
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py play video.mp4 --no-interactive
--no-interactive disables keyboard controls — use this in any non-interactive agent run.
references/pipelines.md has 15+ production-ready pipelines:
hlssink2)dashsink)webrtcsink (Rust, auto-negotiation)webrtcbinRead references/pipelines.md when the user needs a starting pipeline for any of the above.
-1.0 suffix. gst-inspect-1.0 not gst-inspect, gst-launch-1.0 not gst-launch. The 1.0 is the major API version; GStreamer 0.10 was EOL'd in 2012 and tools without -1.0 usually don't exist.! is NOT a logical-NOT in gst-launch. It's the link operator. Quote your pipeline or use -- so the shell passes it through: gst.py launch -- videotestsrc ! fakesink.video/x-raw,width=1280,... with NO space after the commas. Some shells swallow the parens / commas — single-quote the caps string when in doubt.queue is mandatory between threads. Whenever you have a tee fan-out, or sink/source crossing subsystems (audio<->video, CPU<->GPU), insert a queue on each branch. Without it the pipeline serialises on one thread and the second branch starves.videoconvert + audioconvert are cheap insurance. When two elements disagree on caps, drop videoconvert ! videoscale or audioconvert ! audioresample in between. GStreamer will no-op if the caps already match.decodebin3 / uridecodebin3 use GST_MESSAGE_STREAM_COLLECTION + GST_EVENT_SELECT_STREAMS, NOT the old autoplug-* signals. Port old decodebin code carefully.playbin3 has different bus messages from playbin. Don't copy-paste signal handlers between them.webrtcsink, awstranscriber, whipclientsink aren't in -good/-bad/-ugly — they need gst-plugins-rs (available from gstreamer.freedesktop.org or your distro). If gst-inspect-1.0 webrtcsink comes up empty, install gst-plugins-rs.webrtcbin vs webrtcsink: webrtcbin is the low-level C element where you drive SDP + ICE manually via signals (create-offer, set-local-description, etc.). webrtcsink is the Rust high-level element that auto-negotiates and speaks WHIP/WHEP. Pick one.hlssink is deprecated; use hlssink2 or hlssink3. Same for RTSP server: rtspclientsink is the client side; the server side is the gst-rtsp-server library (no stand-alone element).-e / --eos-on-shutdown — always pass this when writing to a muxer. Without it, Ctrl-C kills the pipeline mid-write and the output file has no moov atom / is unseekable.GST_DEBUG=3 is the sweet spot for pipeline tracing. *:4 is too noisy. Scope to one element: GST_DEBUG="*:3,webrtcbin:6".avfvideosrc needs device-index=<N> — discover via gst-device-monitor-1.0 Video/Source. Permission prompts happen on first run; grant them in System Settings -> Privacy.ksvideosrc / wasapisrc may be flaky on some Dell/Realtek combos — fall back to mfvideosrc / directsoundsrc when they are.autovideosink / autoaudiosink pick the best-available sink; fine for ad-hoc testing but in production always name the sink (glimagesink, d3d11videosink, osxvideosink, pulsesink, pipewiresink) so behaviour is deterministic.gst-launch-1.0 may need slight tweaks in gst_parse_launch(). The latter is a superset in most GStreamer versions but bracket+escaping differs. When porting from CLI to code, test both.gst-launch-1.0 is debug-only per the official docs — production code should use the library API. The pipelines in references/pipelines.md are optimised for prototyping and Claude-to-user hand-off.uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch -v -- \
filesrc location=in.mp4 ! decodebin3 ! videoconvert ! autovideosink
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch -e -- \
avfvideosrc device-index=0 ! video/x-raw,width=1280,height=720 \
! videoconvert ! x264enc tune=zerolatency bitrate=3000 ! h264parse \
! qtmux name=mux ! filesink location=out.mp4 \
avfaudiosrc ! audioconvert ! audioresample ! avenc_aac bitrate=128000 \
! mux. \
--eos-on-shutdown
(Kill with Ctrl-C after 30s; -e ensures qtmux finalises.)
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py discover \
--uri rtsp://admin:[email protected]/stream -v -t 10
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py devices --classes "Video/Source"
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py inspect --element webrtcbin
uv run ${CLAUDE_SKILL_DIR}/scripts/gst.py launch -v -e -- \
videotestsrc is-live=true \
! video/x-raw,width=1280,height=720,framerate=30/1 \
! videoconvert \
! 'whipclientsink name=ws signaller::whip-endpoint=http://127.0.0.1:8889/live/whip'
(Requires gst-plugins-rs; fall back to a webrtcsink + signaller setup if absent.)
WARNING: erroneous pipeline: no element "webrtcbin"Cause: Plugin not installed.
Solution: webrtcbin lives in gst-plugins-bad. Install it: macOS brew install gst-plugins-bad; Debian/Ubuntu apt install gstreamer1.0-plugins-bad libnice-dev. Verify with gst-inspect-1.0 webrtcbin.
could not link filesrc0 to decodebin0Cause: filesrc produces ANY caps, but some decoders want a typefind step.
Solution: Insert decodebin3 which handles typefind internally: filesrc location=in.mp4 ! decodebin3 ! .... Or use uridecodebin3 uri=file:///....
gst-launch-1.0: command not foundCause: Tools not on PATH, or only gst-launch installed without the -1.0 suffix (very old GStreamer).
Solution: Reinstall GStreamer 1.x. On macOS homebrew: brew install gstreamer.
Cause: Process killed without EOS -> qtmux / mp4mux never wrote the moov atom.
Solution: Re-run with -e / --eos-on-shutdown, use Ctrl-C only once, then wait 1-2s for finalisation.
avfvideosrc opens but produces no frames on macOSCause: Privacy permission not granted to the terminal / IDE running gst-launch. Solution: macOS System Settings -> Privacy & Security -> Camera -> add your terminal. Restart the terminal after granting.
Cause: Missing queue on the audio branch of a muxer fan-in, or wrong sample rate.
Solution: Insert queue ! audioconvert ! audioresample before the muxer pad. Ensure mux. syntax attaches to the named mux element.
Cause: webrtcbin refuses RTP caps that don't specify payload-type / encoding-name.
Solution: Add a capsfilter: rtph264pay config-interval=-1 pt=96 ! application/x-rtp,media=video,encoding-name=H264,payload=96 ! webrtcbin.
references/pipelines.mdWhat 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.
Other plugins' skills for the same job