You can run a continuous YouTube stream from Ubuntu without a desktop: FFmpeg sends the media to YouTube over RTMPS, while systemd can start and restart the local encoder process. You still need to check YouTube’s stream health; a running Linux process alone does not prove that viewers are receiving a healthy broadcast.
What you need before you start
- An Ubuntu server or virtual machine (VM) that can stay online and reach YouTube’s ingest service.
- FFmpeg built with support for your input, chosen encoder and RTMPS. Ubuntu packages and other FFmpeg builds can differ, so check the capabilities of the one you install.
- A media file or other input that the Ubuntu host can read. This walkthrough uses prerecorded media; adapt the input options for your source.
- A YouTube Live stream with its RTMPS URL and stream key from Live Control Room.
- Enough sustained upload capacity for your chosen video and audio bitrates, plus headroom.
This is a command-line workflow, not a guide to every camera-capture or hardware-encoding setup. YouTube’s encoder guidance and FFmpeg’s documented real-time input and FLV muxing patterns provide the basis for the configuration below. YouTube encoder settings · FFmpeg protocol documentation
As an Amazon Associate I earn from qualifying purchases.
Choose a host and a stream profile
Existing Ubuntu machine or cloud VM
An existing, always-on Ubuntu machine avoids renting a host, but depends on its power, internet connection and your ability to access it and recover from failures. A rented cloud VM may suit someone who does not want to leave a home computer running, but compare recurring cost, sustained outbound bandwidth, reliability and access to logs before choosing one. The sources available here do not establish provider-specific prices or uptime guarantees. Ubuntu cloud-hosting example
Choose output settings your connection can sustain
YouTube’s encoder guidance, checked in 2026, recommends H.264 bitrates of 8 Mbps for 720p30 and 14 Mbps for 1080p30. It lists 3 Mbps and 5 Mbps as the respective minimums. At 60 fps, its H.264 recommendations are 8 Mbps for 720p60 and 17 Mbps for 1080p60, with minimums of 3 Mbps and 6 Mbps. These are YouTube settings recommendations, not performance measurements for a particular Ubuntu host or network. Choose a rate your actual sustained upload can support with headroom, and test it before relying on the stream.
#1 Best Overall
- 🔥【Built in OpenClaw & AI Productivity】Beelink SER9 Pro mini PC with built-in Ubuntu system, pre installed openclaw, which can clears your inbox, sends emails, manages your calendar, and checks you in for flights. The large model is a cloud based model, Instant access toa wide range ofmodels anytime. Seamlessly connect to leading large models including Qwen, MiniMax, GPT-4o, and Gemini, etc. Quickly build diverse intelligent workflows and instantly turn AI collaboration into practice. All computations run in the cloud, while your mini PC simply receives results. This ensures zero impact on performance, allowing work and entertainment to run simultaneously without interruption.
- 🔥【Powerful Performance & AI Voice】Beelink SER9 Pro mini pc equips with AMD Processor Ryzen 7 H 255(8C/16, up to 4.9GHz). Built on advanced 4nm process technology, the processor features "Zen 4" Latest CPU architecture and RDNA 3 graphics, delivering exceptionalperformance for both work and play. The Built-in microphone is powered by an Al chip that supports smart audio pickup, which enables it to effectively separate voice command from background noise. 360° barrier-free voice recognition within 5 meters. The picked up audio is processed by an AI chip, making recorded vocals sound more natural and authentic.
- 🔥【Large Capacity Storage & Quiet】The AI Mini PC comes with 24GB LPDDR5X high frequency memory, which can deliver you the smoothest experience in Al computing. There are also Dual M.2 PCle 4.0 x4 SSD slots under the hood, supporting up to 8TB of fast internal storage. Multitask working can be performed smoothly, and all your necessary software applications can be accommodated in this small machine. Beelink Mini PC uses MSC2.0 cooling system, air intake at the bottom and air dissipation at the back achieve high efficiency heat dissipation. The SER9 Pro operates at a noise level of as low as "32dB", so you can simply enjoy undisturbed gaming in peace.
- 🔥【Multiple Interfaces & Dual-Speakers】Beelink Mini PC has a 2.5Gbps Ethernet LAN (RJ-45, Network interface speed up to 2.5Gbps bandwidth rate), 2.4Gbps WiFi6(802.11ax, stronger capacity of resisting disturbance), and built-in Bluetooth 5.2, high-speed wireless connection makes you step ahead. And 2*USB3.2 ports(10Gbps), 2*USB2.0 480Mbps ports, 1*HDMI port, 1*DP port, 1*USB-C port(USB4 40Gbps), 1*USB-C 10Gbps port and 2*Audio Jack, 1*DC Jack, thus offering the user even greater versatility in use. Built-in dual-speakers can offer sound with high volume, and powerful impact. Without the need for external audio equipment, the SER9 Pro can bring you an immersive audio experience all by itself.
- 🔥【Lifetime After-Sales Service】Beelink has been dedicated to R&D AI Mini PC for many years. All Beelink AI Mini PC have passed strict inspection before shipping. The accessories include 1 x User Manual, 1 x HDMI Cable, and 1 x Power Adapter. If you have any questions, please don’t hesitate to contact us. We are 100% guaranteed to solve your problems. We offer lifetime technical support, a 3 year warranty, and 24/7 after-sales service. All of our products obtained FCC, RoHS, and CE Certifications.
YouTube recommends constant bitrate (CBR), a 2-second keyframe interval, and says not to exceed 4 seconds. It lists a maximum frame rate of 60 fps, H.264, H.265 (HEVC) and AV1 video, and AAC or MP3 audio. For stereo audio, its guidance lists 44.1 kHz and 128 kbps. Check YouTube’s current settings page when configuring a different resolution, codec or frame rate. YouTube says, “We recommend streaming to YouTube Live with RTMPS, a secure extension to the popular RTMP streaming video protocol.” YouTube encoder settings and bitrates
Prepare YouTube Live and protect the stream key
- Open YouTube Live Control Room and create or schedule the live stream.
- Copy the RTMPS server URL and stream key for that stream. YouTube may show an ordinary RTMP URL by default; retrieve the RTMPS URL specifically.
- Treat the stream key as a password. Do not publish it, commit it to source control, or expose it in public logs or screenshots. Avoid putting a real key in a command that may be saved in shell history.
YouTube’s guidance explains how to find the RTMPS URL and use it with the stream key. If you see an SSL error after confirming the server URL is correct, YouTube says to try port 443. YouTube: stream with an encoder
Install and check FFmpeg on Ubuntu
Install FFmpeg using the package source appropriate for your Ubuntu release or use a build whose capabilities you have checked. The exact available encoders and protocols vary between builds, so do not assume a package includes every option. Check the installed version and its available encoders and protocols before writing the final command:
Recommended Free Tools
ffmpeg -version
ffmpeg -encoders
ffmpeg -protocols
Confirm that the media file is readable by the account that will run FFmpeg. Use an absolute file path in a service command, and check that the selected input, encoder and RTMPS protocol are available in this build.
Send a prerecorded file to YouTube
For a local prerecorded file, FFmpeg’s documented pattern uses -re to read input in real time and the FLV muxer for an RTMP-family endpoint. The following is a template, not a tested Ubuntu-specific command. Replace the placeholders, including the URL and key, and choose an encoder available in your FFmpeg build:
ffmpeg -re -i /absolute/path/to/video.mp4
-c:v libx264 -preset veryfast -b:v 8M -minrate 8M -maxrate 8M -bufsize 16M
-r 30 -g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100 -ac 2
-f flv "rtmps://YOUR_YOUTUBE_RTMPS_URL/YOUR_STREAM_KEY"
This example targets a 720p30-style H.264 stream at 8 Mbps video, with a two-second GOP at 30 fps, and stereo AAC audio at 128 kbps and 44.1 kHz. It does not scale the input to 720p: the output dimensions depend on the source unless you add a suitable filter. Check the actual output resolution and YouTube’s current guidance. For 1080p30 H.264, YouTube’s recommended video bitrate is 14 Mbps; update the encoder settings only if the host’s sustained upload can support it. The bitrate options shown request a constant rate from the encoder, but validate the resulting stream and YouTube’s health messages rather than assuming a command guarantees a compliant ingest.
Use the RTMPS URL and key exactly as provided for your stream. Do not paste a live key into a shared shell session, documentation, or public service file. FFmpeg’s protocol documentation describes the real-time input and FLV muxing approach; YouTube’s encoder guidance supplies the target settings. Neither source certifies this particular command for every Ubuntu build or media file. FFmpeg protocol documentation
Loop a file or build a playlist
Looping one file
To repeat a single file, FFmpeg offers input looping options, but looping behavior depends on the format and timestamps. Test the transition at the end of the file: watch for a gap, frozen image, missing audio or sync drift before leaving it unattended. A local loop does not restart the broadcast in YouTube; it continues sending media within the same encoder process.
Rank #2
- 【AI Productivity Era 】Beelink SER9 Pro 255 Mini PC features a built-in Ubuntu system and comes pre-installed with OpenClaw,Extensive Skills and Integrations Supports12 major application scenarios, including productivity tools,development assistance,lifestyle services, marketing operations,Al& LLMs, DevOps, browser automation,social media integrations,andmore
- 【Beelink SER9 Pro 255 Mini PC 】Beelink SER9 AMD Ryzen 7 255 Mini PC, 8C/16T,Base Speed 3.8GHz/Max 4.9GHz,L3 Cache 16MB Built on advanced 4nm process technology Mini Computers, The processor features Zen 4 CPU architecture and RDNA 3 graphics, AMD Radeon 780M 12 cores 2600MHz, Smooth Performance for Running AAA Titles, and high resolution provide you with an immersive gaming experience, delivering exceptional, performance for both work and play
- 【24G LPDDR5X +1TB PCIe4.0 SSD】SER9 Pro Mini PC comes with 24GB LPDDR5X 6400MT/s High Frequency Memory, gaming and multimedia entertainment.There are also Dual M.2 PCle 4.0 x4 SSD slots under the hood, supporting up to 8TB of fast internal storage. Beelink SER9 Mini Computer delivers ultra-smooth software startup and operation. MSC2.0 cooling system for efficient heat dissipation, operates at a low noise level of 32 dB, so you can just enjoy the peace and quiet without
- 【4K 240Hz Triple display】Beelink Ryzen 7 H 255 Mini Desktop Computers, Triple display HDMI 2.1+DP1.4 + full-function USB4 interface Supporting 4K high-definition display,HDMI & DisplayPort Support up to 4K 240Hz providing a high refresh rate for smoother gaming visuals. Wi-Fi 6 (2.4 Gbps), Bluetooth 5.2 ensure stable connections.adapts to office, streaming, smart home, and entertainment setups
- 【Built-in MIC/Dual Speakers/AI Voice PC】Beelink SER9 Pro H 255 The built-in Microphone chip enables 360° voice recognition within 5 meters and enhances audio clarity through realistic AI voice processing.The built-in dual speakers deliver high volume and realistic vocals, enhanced by DSP and amplifier-driven frequency division processing. Without the need for external audio equipment, the SER9 Pro brings you immersive audio experiences straight out of the box
Playing a playlist
For multiple videos, construct a playlist or concat input suited to those files and verify durations, timestamps, transitions and audio/video synchronization. There is no single universal playlist command established here: files with different codecs, frame rates, dimensions or audio layouts may need normalization or a different concat method. Test the complete sequence, including the transition from the final item back to the first, before using it continuously.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Run FFmpeg under systemd
systemd can launch the encoder at boot and restart its process after an exit. That supervision is separate from YouTube’s ingest health: repeated local restarts cannot correct an unsupported codec, insufficient bitrate or other platform-side problem.
- Create a dedicated, unprivileged Linux account for the stream and grant it read access to the media and any configuration it needs.
- Store the stream key in a restricted configuration or environment file readable only by the service account and administrators. Do not put secrets in a broadly readable unit file.
- Create a systemd service that runs FFmpeg with the tested command, an absolute media path, and restart behavior appropriate for the host. Configure it to start after the network is available.
- Reload systemd, enable the service at boot and start it. Use
systemctl statusandjournalctlfor local state and logs; verify that the key is not exposed in output you share. - After any change to media, command options or key, restart the service and check both its logs and YouTube’s receiving status.
Service names and unit details depend on how you configure the host. The important distinction is that a service manager can keep trying to run a local process, while YouTube’s stream status and health indicators tell you whether usable video is arriving. YouTube LiveStreams API: status and health
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Verify the stream and troubleshoot failures
Test with representative audio and motion before leaving the stream running. YouTube advises testing the stream and monitoring its health messages. Check the local FFmpeg process and logs as well as YouTube’s status and health indicators; the API documents stream states including active, ready and inactive, and health information that can identify configuration issues.
| Symptom | What to check | Next step |
|---|---|---|
| SSL error or connection timeout | Confirm that the endpoint is the RTMPS URL for this stream and that the FFmpeg build supports RTMPS. | If the server URL is correct and the SSL error remains, YouTube says to try port 443. Check the service logs for connection errors. |
| YouTube reports unsupported or missing audio/video | Check codec support, whether both expected media streams are present, audio channel count, bitrate and keyframe interval. | Adjust the output to YouTube’s current encoder guidance, then restart and verify the receiving health status. |
| YouTube reports no or sparse incoming video | The documented videoIngestionStarved condition means too little video is arriving and can cause viewer buffering. |
Inspect FFmpeg logs, host CPU load and sustained network upload as likely diagnostic areas; the condition alone does not identify which one caused a particular failure. |
| The service is active but the viewer-facing stream is unhealthy | A running systemd unit only establishes local process state, not successful, healthy YouTube ingest. | Check YouTube’s stream status and health messages, then fix the reported ingest or media issue rather than relying on repeated process restarts. |
| The stream stops at a file or playlist boundary | Check input looping, timestamps, duration handling and audio/video synchronization for those specific files. | Test the full sequence and its return to the beginning; change the input or playlist method if the transition is not clean. |
YouTube LiveStreams API health details
Copyright, reused content and long-running broadcasts
Only stream media you have the rights or permissions to use. A technically valid RTMPS connection does not establish that a video, song or other material is authorized for a YouTube broadcast. Review YouTube’s current copyright and monetization policies for your content and channel before scheduling a continuous stream. Repeated or reused material may also raise channel-policy questions separate from encoder configuration; the sources linked above establish ingest settings, not whether a particular channel or playlist complies.
The sources cited here do not establish a maximum continuous-broadcast duration or how YouTube will retain an archive or VOD from a very long stream. Check current YouTube Help for those behaviors rather than assuming an always-on encoder means an indefinitely available archive.
Or let it run in the cloud
If you want continuous prerecorded playback without maintaining an Ubuntu host or FFmpeg service, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams the uploaded quality up to 4K 60fps at one price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly is $9.99 per month. It plays uploaded videos rather than going live from a camera, and supports YouTube only. Start your free StreamNeo day.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteQuick Recap
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.




