Article start
Technology
Gstreamer

๐Ÿš€ Day 3: Building Pipelines Manually with filesrc and decodebin

Learn how to build multimedia pipelines manually using filesrc, decodebin, videoconvert, and sinks to understand media flow in GStreamer.

February 12, 2026ยท75

Day 3 is where GStreamer starts to feel truly powerful. On Day 2 you used playbin , which is convenient but hides most of whatโ€™s happening inside. Today, you begin building pipelines manually so you can understand and control the media flow yourself. This shift is important because real projectsโ€”camera apps, stream processors, recorders, AI pipelinesโ€”usually require you to choose elements and connect them intentionally rather than relying on auto-magic.

When you play a file, GStreamer has to do a few big jobs: it must read bytes from storage , understand the container format , extract audio/video streams , decode them , and then render them to a screen or speaker. playbin wraps all of this into a single element. On Day 3, you break that process into visible pieces so you can see what each stage does and where things can go wrong.

Starting with a simple manual playback pipeline

A good first step is to replace playbin with a minimal set of elements that still gets the job done. A common pattern is:

โ€ข read the file using filesrc

โ€ข decode automatically using decodebin

โ€ข send video to a sink

Try this (change the filename):

gst-launch-1.0 filesrc location=video.mp4 ! decodebin ! autovideosink

At a high level, youโ€™ve told GStreamer: โ€œRead this file, decode whatever you find inside, and show it on the screen.โ€ This looks simple, but it teaches a key idea: pipelines donโ€™t need to be hugeโ€”just correctly connected .

Understanding what you just built

In this pipeline, each element has a specific role:

โ€ข filesrc is a source element that reads bytes from a file.

โ€ข decodebin is a smart decoder element that inspects the stream and plugs in the right decoders at runtime.

โ€ข autovideosink is a sink element that chooses the best video output method for your system.

The ! symbol is not decorationโ€”it meanโ€ฆ