Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can send a video file from Ubuntu 24.04 to YouTube Live with GStreamer, but a normal GStreamer media pipeline does not automatically replay a file forever. The output chain must decode and encode the media, mux it into FLV, and send it to YouTube through an RTMP sink; a separate application or controller must handle the file reaching its end and restart it. This guide covers the setup and the key limitation: there is no documented universal gst-launch-1.0 loop command for arbitrary files that also guarantees one uninterrupted YouTube session.

What you need to build

The basic data path is:

local file → decode → convert or normalize → encode video and audio → flvmux → rtmpsink

The GStreamer RTMP reference documents flvmux feeding rtmpsink; the sink accepts FLV media. That establishes the output pattern, not a complete current YouTube command. You must also have a decoder for your file, suitable video and audio encoders, and the relevant GStreamer plugins installed. The exact elements available depend on the packages and repositories on your Ubuntu installation.

Ubuntu 24.04 (Noble) documents gstreamer1.0-tools version 1.24.2-1ubuntu0.1, which provides the command-line tools. That version does not mean every decoder, encoder, muxer, or sink is installed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
  • Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

Install the tools and inspect available elements

Install the command-line tools if they are not already present:

sudo apt update
sudo apt install gstreamer1.0-tools

Then inspect the elements your planned pipeline needs:

gst-inspect-1.0 decodebin
gst-inspect-1.0 x264enc
gst-inspect-1.0 flvmux
gst-inspect-1.0 rtmpsink

Rank #2
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
  • Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

Also inspect the decoder for your input format and an AAC or MP3 audio encoder. If a lookup fails, the element is not available to GStreamer on that machine; install the appropriate plugin package from a repository enabled for your system, then inspect again. Do not assume that installing the tools package installed all media plugins. rtmpsink is part of GStreamer’s Bad Plug-ins.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use gst-inspect-1.0 to check element properties and pad capabilities before assembling a pipeline. The chosen decoder, converters, encoders, muxer, and sink must agree on their media formats; an element being present does not by itself guarantee that it can handle a particular file or caps configuration.

Create a YouTube encoder stream and protect its key

  1. Open YouTube Live Control Room and create or schedule an encoder-based stream.
  2. Copy the ingest URL and stream key displayed for that stream. Use the actual endpoint shown in Live Control Room, not a hostname copied from an example.
  3. Choose the RTMPS endpoint when available. YouTube describes RTMPS as RTMP over a TLS/SSL connection that encrypts the stream, and recommends choosing the RTMPS URL through the lock icon in the stream settings.
  4. Keep the stream key private. Do not publish it, expose it in screenshots, or commit it to a public script. If a key is exposed, replace or reset it in YouTube’s stream settings.

First-time live-stream activation may take up to 24 hours. Allow for that if the channel has not streamed live before.

Rank #3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
  • CanaKit Raspberry Pi 5 Essentials Starter Kit

Construct the GStreamer output pipeline

For a supported input, the conceptual pipeline needs to decode the source, convert or normalize the streams as needed, encode video and audio to formats accepted by the selected YouTube ingest protocol, mux them into FLV, and send the result to the displayed endpoint. A useful way to reason about it is:

  • Input and decode: use a file source with decoding appropriate to the media. GStreamer documents decodebin and uridecodebin3 patterns for supported media.
  • Convert and encode: encode the video and audio rather than assuming the file’s existing codecs or stream layout will be accepted by the output chain. YouTube’s current RTMP/RTMPS guidance lists H.264, H.265, and AV1 video, up to 60 fps, and AAC or MP3 audio.
  • Mux and transmit: feed encoded streams to flvmux, then to rtmpsink, configured with the endpoint and authentication information for your stream.

GStreamer’s documented example using flvmux ! rtmpsink demonstrates the mux-and-sink relationship, but uses legacy ffenc_flv and a localhost RTMP destination. It is not a ready-to-run YouTube pipeline. Build the actual description around the elements and properties present on your system, the formats your file can decode, and the current ingest details shown by YouTube.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a production setup, write an application that constructs and manages the pipeline. GStreamer says gst-launch-1.0 is primarily a debugging tool and recommends application code for applications. The API function gst_parse_launch() can construct a pipeline from a description, but your program still needs to manage errors, stream lifecycle, and file looping.

Rank #4
SANOOV Raspberry Pi 5 4GB Kit, 4GB RAM Single Board Computer with Active Cooler and ABS Case, Complete Raspberry Pi 5 Starter Kit for IoT Robotics Retro Gaming
  • All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
  • Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
  • Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
  • Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
  • Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online

Choose resolution, bitrate, and keyframe settings

YouTube’s published figures below are recommended encoder settings, not independent performance measurements. They describe H.264 over RTMP/RTMPS; use YouTube’s live encoder guidance again before publishing because requirements and interface details can change.

Output Minimum bitrate Recommended bitrate
720p at 30 fps, H.264 3 Mbps 8 Mbps
1080p at 30 fps, H.264 5 Mbps 14 Mbps
1080p at 60 fps, H.264 6 Mbps 17 Mbps
  • Use constant bitrate (CBR) and set keyframes at YouTube’s recommended two-second interval; do not exceed four seconds.
  • Choose a resolution and frame rate the source, encoder, and Ubuntu machine can sustain. Higher output settings can increase encoder load and the upload bandwidth required.
  • Keep the configured upload bitrate comfortably below the connection’s reliably available upload capacity. A bitrate that consumes all available capacity leaves little room for network variation.
  • Test representative motion and audio before the broadcast, then check YouTube’s stream-health messages while the encoder is sending.

Make the file repeat: handle end of stream explicitly

A normal file source is finite: after it plays to the end, GStreamer reports end of stream (EOS). Neither rtmpsink nor the documented gst-launch-1.0 options make the file repeat automatically. In particular, gst-launch-1.0 --loop is not a documented option.

To repeat a single file, implement a controller or application that reacts to EOS and seeks or restarts the source. Decide how that action interacts with the rest of the pipeline: you may retain the output pipeline or deliberately stop and manage it, but the right behavior depends on the media and pipeline. Seeking support and clean transitions are file- and pipeline-dependent, so test the actual file at the loop boundary. The official GStreamer pages reviewed do not establish a universal one-command recipe for looping arbitrary decoded media while keeping one YouTube ingest session alive.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
RasTech Raspberry Pi 5 8GB Kit with Active Cooler and Pi5 Case
  • 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
  • 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
  • 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
  • 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
  • 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.

An application can also schedule a finite list of files and move to the next source. Treat seamless, gap-free transitions as something to implement and validate for that specific playlist—not as a built-in guarantee of the RTMP sink or a generic pipeline description.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test the stream and troubleshoot common failures

  • YouTube does not receive the stream: check that the URL and key are the current values for the selected Live Control Room stream, and that the protocol in the URL matches your configuration. For secure ingest, use the displayed RTMPS endpoint. YouTube’s SSL troubleshooting guidance says to check both protocol and server; port 443 may be an explicit setting when applicable. Prefer the actual endpoint supplied in Live Control Room.
  • GStreamer reports a missing element: run gst-inspect-1.0 for the decoder, encoder, muxer, or sink named in the error. Install the plugin package appropriate to that element from an enabled repository, then inspect it again. Plugin availability varies by installation.
  • The pipeline cannot link elements or negotiate formats: inspect the elements’ pads and capabilities, then confirm that the decoded streams, conversion steps, encoder output, and muxer inputs are compatible. Do not assume that a file’s original audio or video streams can be passed directly to the muxer.
  • The stream reaches YouTube but has poor or unstable health: test with audio and motion representative of the real program, reduce resolution, frame rate, or bitrate if the machine or connection cannot sustain the settings, and leave upload headroom. Compare the result with YouTube’s stream-health messages.
  • The video stops after one play: that is the expected EOS behavior for an ordinary finite source. Add and test explicit application logic to restart or seek the source; the sink does not loop it.
  • You need HDR or a codec outside RTMP support: YouTube documents HLS as an alternative ingest design. HLS requires TS segments, segment lengths of 1–4 seconds, HTTPS POST/PUT, and a rolling playlist with no more than five outstanding segments. It has higher latency than RTMP and is not a drop-in replacement for rtmpsink.

Or let it run in the cloud

If your goal is an always-on YouTube loop rather than building and maintaining a GStreamer controller, StreamNeo is a cloud service for uploaded videos: upload a recording or build a playlist, add your YouTube stream key once, and go live. It keeps the stream running without a computer, OBS, or home connection staying on.

  • Nothing has to stay on at home; the stream runs from the cloud.
  • One flat price per slot for any uploaded quality up to 4K 60fps, with no re-encode or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card.

Monthly: $9.99 per month. See StreamNeo, or start the free day.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$259.95
Bestseller No. 2
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
CanaKit Raspberry Pi 5 16GB Starter Kit PRO - Turbine Black (128GB Edition) (16GB RAM)
Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$419.99
Bestseller No. 3
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
CanaKit Raspberry Pi 5 Essentials Starter Kit (4GB RAM)
CanaKit Raspberry Pi 5 Essentials Starter Kit
$189.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.