Skip to content
streamneo.
Setup Guides11 min read

How to Send a Video Playlist to YouTube Live with GStreamer

Build a GStreamer playlist pipeline for YouTube Live, understand its moving parts, and test the exact ingest setup before an event.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

GStreamer can send a sequence of prerecorded videos to YouTube Live, but an arbitrary playlist needs an application to manage decoding, format changes and transitions. Treat its elements as building blocks: assemble and test the exact pipeline and YouTube ingest combination before relying on it for an event.

The practical flow is to decode each item, normalise audio and video, sequence the items into a continuous feed, encode and mux that feed, then transmit it to the ingest URL shown in YouTube Live Control Room. A documented element or example is not a certified one-line player for every set of files, nor a guarantee that your installed RTMPS path will connect.

What you need before building the pipeline

Start with a defined playlist and output target. Know which files should play, in what order, whether the list should stop or repeat, and which audio and video streams you intend to use. A folder of unrelated MP4 or MKV files is not automatically a GStreamer playlist: the application must open each URI, handle the pads that appear as streams are discovered, and decide what to do when a file ends or fails to decode.

Check your local GStreamer installation before designing around an element. gst-inspect-1.0 can show whether the relevant source, decoder, converter, encoder, muxer and sink plugins are installed, and expose their properties. The exact plugin names and available encoders vary by build. Do not assume that an element described in online documentation exists in your package, or that a property shown in another version is available locally.

You will need a YouTube channel that can create a live stream, an event or stream entry in Live Control Room, and its current ingest address and stream key. Keep the key private: YouTube describes stream keys as the password and address for a stream. Do not place it in a public repository, screenshot or support post. If it is exposed, replace it in YouTube rather than treating the leak as harmless.

Plan a test window before the real broadcast. For a devotional programme, for example, test the evening bhajan file, the transition to the next recording, and the audio level through a private or unlisted event. If the channel is meant to run overnight, a brief launch test alone will not expose a playlist that stops after its first cycle or a process that fails to recover after a disconnect. Consider the broader failure plan described in this guide to backing up a 24/7 devotional stream.

Create or select the YouTube Live stream

In YouTube Studio, create a live stream or select the scheduled event you intend to use. Open its stream settings in Live Control Room and copy the ingest server URL and stream key displayed there. Prefer the current values from the event over a URL copied from an old command, tutorial or notes file; ingest details can differ, and a stale address is not a meaningful pipeline test.

The stream key is a credential, not a channel identifier to share with collaborators casually. Store it in a protected configuration location and limit who can see it. Avoid putting it directly in a script that will be committed or pasted into a public issue. A local shell history may also retain a command containing a key, so think about how you pass configuration while testing.

YouTube's encoder setup guidance covers the current stream settings and supported encoder parameters. The recommendation is to use RTMPS where possible, but that does not prove that every GStreamer installation's RTMP sink and linked libraries can negotiate TLS with the current YouTube endpoint. Check the local build and verify an actual test connection.

For a scheduled event, distinguish starting the encoder from making the event public. Send the feed, wait for the incoming preview, inspect the picture, sound and stream health, and then use the event controls as intended. YouTube's guide to creating a live stream with an encoder explains the workflow; follow the current Live Control Room prompts rather than assuming that a connected encoder has automatically put the scheduled event live.

Open and decode playlist items

For ordinary videos with different filenames and formats, an application commonly opens each file by URI with uridecodebin or a version-appropriate alternative. GStreamer documents uridecodebin as a way to decode a URI into raw media. Its source pads are dynamic: they appear as streams are discovered, so the application has to inspect and link the audio and video pads it wants, rather than assuming a fixed pair of outputs exists immediately.

That distinction matters with real libraries. One file may contain a video track and stereo audio, another may have no audio, and a third may include multiple language tracks. The application needs a policy for selecting streams and handling missing or unexpected ones. It also needs to handle errors and end-of-stream events; otherwise a damaged item can leave the whole programme waiting or cause a transition to fail.

multifilesrc is easy to misread as a general playlist source. Its documented use is for sequentially named files such as an indexed image series, not a list of arbitrary differently named video files. Use it when your media genuinely matches that numbered-sequence model and its buffer expectations. For a playlist of separate videos, URI decoding and application-managed sequencing are the relevant concepts.

Before adding the live output, test file opening and decoding locally. Log which item is active, whether expected audio and video pads were found, and what happened at end of stream. A pipeline that works with one MP4 does not establish that the rest of the folder has compatible codecs or streams. If you manage a longer recorded programme, this guide to an always-on stream of recorded lessons is a useful reminder that content preparation is part of stream reliability.

Normalise audio and video formats

Decoded files can differ in dimensions, frame rate, pixel format, sample rate and channel layout. A sequence element cannot magically make those differences disappear. Convert or scale each item's raw video to a common output shape, and resample and convert audio to a common rate and layout before the inputs meet the sequential part of the pipeline.

Choose a target that suits the content and the channel, not simply the largest resolution found in one file. A bhajan still image with modest motion may have different needs from a local news loop with captions or a study channel showing small text. Test that the final picture is legible at the intended viewing size and that letterboxing, cropping or scaling does not hide titles. Keep the output dimensions and frame rate consistent across playlist items.

Audio deserves an explicit check. Normalisation here means format compatibility, not necessarily equal loudness. A converter and resampler can make streams compatible, but they do not ensure that one recording is not much louder than the next. Listen to transitions on headphones or speakers, check that dialogue or singing remains intelligible, and decide whether to adjust source levels before encoding.

Use the current YouTube encoder settings page to select codecs, frame rate and bitrate for the intended output. YouTube lists H.264, H.265/HEVC and AV1 video, and AAC or MP3 audio; it recommends constant bitrate and a two-second keyframe interval, with a maximum interval of four seconds. The appropriate bitrate depends on the resolution, frame rate and codec, so use the matching row in YouTube's live encoder settings rather than applying one number to every stream.

Sequence items into one program feed

GStreamer documents concat for sequential streams: it advances to the next requested sink pad when the active input ends with EOS. That is a useful building block, but it is not an arbitrary-playlist player. Your application must request and link pads in the intended order, ensure the inputs provide compatible streams, and decide how EOS at the end of the list should be handled.

Think of the playlist controller as the part that makes a programme out of individual files. It can prepare the next decoded item, select the intended audio and video, manage dynamic pads, and move to the next item at the appropriate boundary. The precise design depends on the application and GStreamer version; the documentation's elementary example establishes the element's behaviour, not the edge cases of a mixed-format media library.

Decide whether the list ends, repeats, or waits for an operator. Do not assume concat itself loops the programme. If it should repeat, the controlling application needs to reopen or otherwise re-present the items deliberately. Test what happens after the final item and after a missing file. A channel intended to run continuously needs an explicit end-of-list policy, not just a sequence that works once.

Transitions also need a clear expectation. Sequential concatenation generally means one item follows another; it is not automatically a crossfade or scene transition. If a smooth audio fade, slate, gap, or branded interstitial is required, implement and test that behaviour in the programme logic. A useful comparison is whether you need a programmable media pipeline or a simpler operator workflow, much as choosing between OBS scenes for YouTube streaming depends on how much live scene control you need.

Encode, mux and send to YouTube

Once the program feed has stable raw audio and video, encode both continuously using settings accepted by YouTube. Mux the encoded streams into FLV for the documented RTMP delivery path. GStreamer documents rtmpsink as sending FLV content through librtmp; its example shows flvmux connected to the sink. This describes a route through the elements, not proof that a particular packaged build supports the required endpoint and transport.

Inspect the local encoder, muxer and sink with gst-inspect-1.0. Confirm that the selected encoders exist and accept the settings you have chosen. Then check how your installed rtmpsink is configured to receive the server address and key. Keep credentials out of source control and logs where practical. Do not copy a complete command from another machine and infer success from its syntax alone.

The GStreamer concat documentation and rtmpsink documentation explain the relevant building blocks. Neither promises that every distribution's sink and librtmp combination will connect to YouTube's current RTMPS endpoint. If you use RTMPS, confirm TLS support in the installed build and test it against the URL provided for your event.

YouTube also supports HLS ingest, but do not treat it as an automatic fallback if RTMPS fails. HLS has its own requirements, including HTTPS POST/PUT, TS segments, a rolling playlist and segment timing rules, and the reviewed GStreamer documentation does not establish a complete GStreamer-to-YouTube HLS recipe. It also has higher latency than a continuous stream. Use it only after verifying the required elements and endpoint behaviour for your own setup.

Test the exact pipeline before an event

The meaningful test is the same pipeline, files, encoder settings, sink and ingest mode that you will use on the day. Send it to a private or unlisted stream first. Confirm that Live Control Room receives a preview, that picture and sound are present, and that the stream health display does not report a problem. A successful local playback test does not validate network transmission or YouTube ingest.

Watch item boundaries, not just the first minute. Confirm that audio does not disappear, video does not freeze, and format changes do not produce an unintended black frame or silence. Let the final item end so you can verify the end-of-list behaviour, then test repeat logic if the channel should cycle. If the application has retry or recovery logic, exercise the relevant failure case before depending on it overnight.

Check network capacity as well as encoder output. YouTube's streaming tips recommend upload headroom of 20 per cent above the total stream bitrate. Measure the connection you will actually use and account for other traffic on it; a nominal broadband plan is not proof of stable available upload. If the site uses a mobile connection or shared office Wi-Fi, test under realistic conditions rather than assuming the connection will be idle during the broadcast.

After a test, write down the working version and configuration: GStreamer build, plugin availability, file order, output settings and the current event's ingest details, without publishing the key. Repeat the ingest check if you change the machine, package, endpoint, codec or transport. If an internet drop is a major concern, plan reconnection separately; this guide to making FFmpeg reconnect after an internet drop covers a different tool and reinforces that reconnect behaviour is not implied by a successful first connection.

For a playlist whose main operational burden is keeping the computer on, connected and watched through the night, StreamNeo removes that specific local-computer burden: you upload a video, provide the YouTube stream key, and the broadcast can run with your computer switched off. It does not remove the need to prepare suitable content, protect the key, or verify the channel and stream before relying on it.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

Can I use concat alone to play any video playlist?

No. concat sequences compatible streams, but an application still needs to open and decode each URI, select streams, manage dynamic pads and handle format differences and end-of-stream behaviour. The documented example is not a verified arbitrary-playlist recipe.

Does multifilesrc read a folder of unrelated MP4 files?

It is documented for sequentially named files that fit its sequence model, such as numbered images. A list of unrelated video filenames calls for URI decoding and application-managed sequencing instead.

Does GStreamer's rtmpsink guarantee YouTube RTMPS will work?

No. The GStreamer documentation describes RTMP delivery of FLV through librtmp, but does not certify every installed build for YouTube's current RTMPS endpoint. Check the local plugin and TLS support, then test the exact connection in Live Control Room.

What should I verify before the scheduled event?

Use the same files, pipeline, settings and ingest method in a private or unlisted test. Check the preview, audio, transitions, end-of-list policy, stream health and available upload headroom, then follow the event's current Live Control Room steps before going live.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Setup Guides guides ↗ · All topics ↗