skills/gst-pipeline-builder/SKILL.md
Build GStreamer pipelines from high-level descriptions. Use when a user wants to construct a multimedia pipeline for tasks like video playback, transcoding, streaming, recording, mixing, or any media processing workflow using GStreamer.
npx skillsauth add flejz/skills gst-pipeline-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Construct GStreamer pipelines from natural-language descriptions. Produce both gst-launch-1.0 command lines and equivalent programmatic code (C, Python, or Rust) depending on what the user needs.
queue elements at thread boundaries# Basic pipe: element ! element
gst-launch-1.0 videotestsrc ! autovideosink
# Named elements and tee
gst-launch-1.0 videotestsrc ! tee name=t \
t. ! queue ! autovideosink \
t. ! queue ! x264enc ! filesink location=out.mp4
# Caps filter (inline)
gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=720 ! autovideosink
# Muxing audio + video
gst-launch-1.0 videotestsrc ! x264enc ! mux. \
audiotestsrc ! audioconvert ! voaacenc ! mux. \
mp4mux name=mux ! filesink location=out.mp4
uridecodebin uri=URI ! autovideosink
uridecodebin uri=URI ! audioconvert ! autoaudiosink
playbin uri=URI
uridecodebin uri=INPUT ! videoconvert ! x264enc ! h264parse ! mp4mux ! filesink location=OUTPUT
v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,width=1280,height=720 ! autovideosink
ximagesrc ! videoconvert ! x264enc tune=zerolatency ! mp4mux ! filesink location=screen.mp4
v4l2src ! videoconvert ! x264enc tune=zerolatency bitrate=2500 ! video/x-h264,profile=main ! flvmux streamable=true ! rtmpsink location='rtmp://server/live/key'
pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=recording.ogg
compositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=10 sink_1::ypos=10 sink_1::width=320 sink_1::height=240 ! autovideosink \
videotestsrc pattern=snow ! comp.sink_0 \
videotestsrc ! comp.sink_1
videotestsrc ! clockoverlay halignment=center valignment=bottom text="Stream" ! autovideosink
| Task | Preferred Elements |
|------|--------------------|
| Decode anything | uridecodebin, decodebin3 |
| Encode H.264 | x264enc, vaapih264enc, nvh264enc |
| Encode H.265 | x265enc, vaapih265enc, nvh265enc |
| Encode VP8/VP9 | vp8enc, vp9enc |
| Encode AV1 | av1enc, svtav1enc, vaav1enc |
| Encode AAC | voaacenc, fdkaacenc, avenc_aac |
| Mux MP4 | mp4mux, qtmux |
| Mux MKV | matroskamux |
| Mux WebM | webmmux |
| Mux MPEG-TS | mpegtsmux |
| Mix video | compositor |
| Mix audio | audiomixer |
| Resize | videoscale |
| Convert colorspace | videoconvert |
| Convert audio format | audioconvert |
| Resample audio | audioresample |
| Add text overlay | textoverlay, clockoverlay, timeoverlay |
| RTP payloading | rtph264pay, rtpvp8pay, rtpopuspay |
| WebRTC | webrtcbin |
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GLib
Gst.init(None)
pipeline = Gst.parse_launch(
'videotestsrc ! videoconvert ! autovideosink'
)
pipeline.set_state(Gst.State.PLAYING)
loop = GLib.MainLoop()
bus = pipeline.get_bus()
bus.add_signal_watch()
bus.connect('message::eos', lambda *_: loop.quit())
bus.connect('message::error', lambda _, msg: print(msg.parse_error()))
try:
loop.run()
finally:
pipeline.set_state(Gst.State.NULL)
videoconvert before sinks and encoders that expect specific formatsaudioconvert ! audioresample before audio encoders and sinksqueue to decouple threads and prevent deadlocks in complex pipelinesdecodebin3 over decodebin for new pipelinesplaybin3 over playbin when availabletune=zerolatency on x264enc for live/low-latency scenariosasync-handling=true on bins when mixing live and non-live sourcesfilesinkgst-inspect-1.0 ELEMENT to check pad templatestools
Find the right GStreamer elements and plugins for a given task. Use when a user needs to identify which GStreamer element handles a specific codec, protocol, effect, or media operation.
devops
Optimize GStreamer pipeline performance. Use when a user needs to reduce latency, increase throughput, fix dropped frames, tune buffer sizes, leverage hardware acceleration, or profile pipeline bottlenecks.
development
Debug and fix broken GStreamer pipelines. Use when a user has a pipeline that fails, produces errors, hangs, or behaves unexpectedly. Covers error message interpretation, GST_DEBUG, dot graph generation, and common failure patterns.
development
Understand and resolve GStreamer caps negotiation issues. Use when a user encounters caps-related errors, format mismatches, or needs to control media formats between pipeline elements.