On Ubuntu, install FFmpeg with APT, create a concat-demuxer playlist, and run FFmpeg with -stream_loop -1 before the playlist input to repeat it indefinitely. Then send the output to the RTMPS URL and stream key from YouTube Live Control Room. The loop keeps the encoder sending; it does not guarantee uninterrupted service or a full archive of a 24/7 broadcast.
Install FFmpeg on Ubuntu
Ubuntu’s package repositories are the standard installation route. The available FFmpeg version depends on your Ubuntu release and enabled repositories, so verify what was installed rather than assuming a particular version.
-
Refresh APT’s package information:
sudo apt update -
Install FFmpeg:
sudo apt install ffmpeg -
Check the installed build:
ffmpeg -version
Prepare a playlist file
FFmpeg’s concat demuxer reads a text file containing the media files in playback order. Create a file such as playlist.txt in the directory where you will run FFmpeg:
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
file '/absolute/path/to/video-01.mp4'
file '/absolute/path/to/video-02.mp4'
file '/absolute/path/to/video-03.mp4'
Replace the example paths with the real paths to your files. Using absolute paths avoids ambiguity about the working directory. Keep each path on its own line and quote paths containing spaces.
Choose stream copy or re-encoding
Stream copy avoids encoding the media again, but it is appropriate only when the files’ streams are compatible. If clips differ in properties such as codec, resolution, frame rate, or audio layout, re-encoding to a consistent output is safer than assuming the files will join cleanly. A playlist alone does not guarantee seamless transitions.
Get the YouTube ingest URL and stream key
-
Open YouTube Live Control Room and configure the live stream.
-
Copy the stream URL and stream key shown for the stream. YouTube may show the ordinary RTMP URL by default; use the interface’s RTMPS option or reveal path to obtain the RTMPS URL when available. Prefer RTMPS for encrypted transport.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
-
Treat the key as a password. Do not put the real key in a public article, screenshot, source-controlled script, or shared terminal history. If it is exposed, reset it in Live Control Room.
YouTube’s current live-stream encoder guidance lists RTMP/RTMPS ingest, H.264, H.265 (HEVC), or AV1 video, AAC or MP3 audio, and constant bitrate (CBR). Confirm the supported choices and URL in your own Live Control Room because platform settings can change.
Run FFmpeg and loop the playlist
Use the URL and key copied from YouTube rather than relying on a hard-coded endpoint. The following is a command template, not a tested command: replace the placeholders with the exact values shown in Live Control Room. Do not publish or share a version containing your real key.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt
-c:v libx264 -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M
-pix_fmt yuv420p -r 30 -g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100
-f flv 'rtmps://YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'
In this example, -stream_loop -1 is placed before the playlist input because it applies to that input; -re reads the files at their native playback rate rather than pushing them as fast as possible. The video settings illustrate a 720p/30 fps H.264 target only if your source and output are configured for that resolution; set the output resolution explicitly when needed with an appropriate filter such as -vf scale=1280:720. The example does not set resolution automatically.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
The 5 Mbps video rate and 128 Kbps stereo audio rate in this template are YouTube recommendations for 1080p/30 fps H.264 video and stereo audio, respectively, consulted on 2026-10-03. If you use those values, adjust the output resolution and frame rate to match. YouTube’s H.264 recommendations are 3 Mbps minimum and 8 Mbps recommended for 720p at 30 fps, and 5 Mbps minimum and 14 Mbps recommended for 1080p at 30 fps. These are platform recommendations, not measurements of your connection.
YouTube recommends CBR and a keyframe interval of about two seconds, not exceeding four seconds. At 30 fps, -g 60 requests a 60-frame GOP, or about two seconds; if you change frame rate, adjust the GOP accordingly. YouTube recommends testing upload capacity; your sustained upload must accommodate the encoded stream reliably. Check YouTube’s current encoder settings before choosing a resolution or bitrate.
Test before relying on a continuous stream
-
Start the command and watch FFmpeg’s output for input errors, encoder errors, or repeated connection failures.
-
Check Live Control Room’s stream health and confirm that the preview has both picture and sound before making the stream public.
Recommended Free Tools
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #4
SaleUGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
-
Test transitions between playlist items. A process that remains open does not prove every file will decode or join correctly.
-
Keep the Ubuntu host and its network available for the entire session. FFmpeg’s loop option repeats the input; it does not restart a crashed process or recover a dropped YouTube connection automatically.
Keep Ubuntu running for 24/7 operation
A continuously running FFmpeg process needs a machine and network connection that remain available. You can use an existing Ubuntu computer or an optional hosted server. Before choosing a host, check sustained outbound RTMPS policies, bandwidth charges, reliability, and—if re-encoding—available CPU or GPU capacity. No particular host or cost is established here.
Plan for monitoring and recovery rather than treating the loop flag as an uptime guarantee. Watch FFmpeg’s process and YouTube stream health, and decide how you will respond if either reports a failure. A basic terminal session does not provide automatic restart or reconnection.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Copyright, YouTube rules, and archive limits
Only stream media you have the rights to broadcast. YouTube may apply copyright rules to live content, and permission to use a recording does not necessarily cover every song, performance, or visual in it. Review rights for all playlist items before going live; the copyright safety checklist can help organize that review.
Streaming continuously and retaining a replay are separate concerns. YouTube’s encoder guidance says streams under 12 hours are automatically archived; it does not promise that one continuous 24/7 broadcast will be archived in full. If replay retention matters, plan a recording or shorter-session strategy rather than relying on a full-day archive.
Or let it run in the cloud
If you do not want an Ubuntu computer at home to stay on, StreamNeo runs an uploaded-video YouTube stream from the cloud: upload a recording or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; your uploaded video streams at its original quality up to 4K 60fps for one flat price per slot, and StreamNeo automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. See StreamNeo for details, then start the free first day.
Quick 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.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →




