DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
DocumentaryTube
24/7 streaming

How to Run a 24/7 YouTube Stream on Ubuntu with Prerecorded Videos

A practical Ubuntu guide to looping prerecorded video in OBS, connecting to YouTube Live, choosing stable encoder settings, and understanding the 12-hour archive limit.

By DocumentaryTube Team 6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To loop prerecorded video in a YouTube live stream from Ubuntu, use OBS Studio: add a Media Source and enable Loop, or use a VLC Video source for a playlist. Connect OBS to YouTube with the stream URL and stream key, configure an encoder profile your internet connection can sustain, then monitor stream health in YouTube Live Control Room. The key limitation: YouTube says streams under 12 hours are automatically archived; it does not promise automatic archiving for a single 24-hour broadcast.

Before you begin

  • An Ubuntu computer that can run OBS and remain powered on and connected for the length of the stream. OBS notes that basic system compatibility does not guarantee adequate streaming performance; see its system requirements.
  • OBS Studio installed from a package source compatible with your Ubuntu release and OBS version.
  • A prerecorded video stored locally, or VLC installed if you plan to use a playlist.
  • A YouTube channel enabled for live streaming. YouTube says first-time live streaming enablement can take up to 24 hours, so set it up in advance.

Install OBS on Ubuntu

The OBS Project’s Linux installation article gives the following commands for Ubuntu:

sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt install obs-studio

That article, dated 2021, states Ubuntu 18.04 or newer as its baseline. Treat that as dated installation guidance, not confirmation that a particular current OBS release supports your Ubuntu version. In an announcement dated June 19, 2026, the OBS Project said OBS Studio 33 would no longer support Ubuntu 24.04. Check the OBS version and package source against the project’s current information before installing or upgrading; the available guidance does not establish a complete current Ubuntu-release compatibility matrix. The OBS Project’s Linux installation instructions describe the PPA approach.

Set up the prerecorded video in OBS

Loop one video

  1. Open OBS and select the scene where the video should appear.
  2. In Sources, select + and choose Media Source.
  3. Name the source, then choose the local video file in its properties.
  4. Enable Loop and save the source settings.
  5. Confirm in the OBS preview that the video appears, its audio is present at a suitable level, and playback restarts when it reaches the end.

OBS documents common local formats including MP4, TS, MOV, FLV, MKV, AVI, GIF and WebM. The OBS Media Sources guide explains the source options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

Loop a playlist

  1. Install VLC before adding the source. OBS’s VLC Video source requires VLC; 64-bit OBS requires 64-bit VLC.
  2. In OBS, add a VLC Video source to the scene.
  3. Configure the playlist with the videos you want played. Set the order or shuffle behavior to suit the programme.
  4. Enable Loop Playlist (on by default in OBS’s documented source) and check the preview to confirm that playback advances and repeats as intended.

Use a single Media Source for a straightforward repeat of one file; choose VLC Video when the stream should cycle through several files. These playback settings control what OBS plays, not YouTube broadcast creation, archive segments or unattended recovery.

Connect OBS to YouTube Live

  1. In YouTube Studio, open Live Control Room and create or select the stream.
  2. Copy the stream URL and stream key shown for that stream.
  3. In OBS, open the streaming settings, select the available YouTube service integration or configure the server and stream key manually, and enter the copied details.
  4. Keep the stream key private. Anyone with it may be able to connect an encoder to your stream.
  5. Start streaming in OBS. YouTube says starting the encoder sends content and creates a watch page. For a scheduled stream, wait for the preview in Live Control Room and select Go live there when ready.

Follow YouTube’s encoder setup instructions for the current Live Control Room flow. Labels and available integration options may vary; use the stream URL and key displayed for your own stream rather than reusing old credentials.

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.

Choose stable encoder settings

For the standard OBS-to-YouTube workflow, YouTube recommends RTMP or RTMPS ingestion, H.264 video, constant bitrate (CBR) and a 2-second keyframe interval; do not exceed 4 seconds. RTMPS encrypts the connection to Google’s servers. YouTube does not prescribe one universal resolution or bitrate for every creator: choose settings appropriate to the output you want and the upload capacity your connection can sustain.

  • In OBS’s output and video settings, choose H.264 and CBR for the stream where those controls are available.
  • Set the keyframe interval to 2 seconds, and make sure it is no greater than 4 seconds.
  • Select a resolution and bitrate that remain stable on your actual upload connection. A high setting that fluctuates or drops frames is a worse fit than a lower, steady output.
  • Test with representative video motion and audio before the intended broadcast. Check YouTube’s stream-health indicators while the encoder is sending.

See YouTube’s live encoder settings for supported ingestion and setting guidance. YouTube also documents HLS ingestion, including OBS as a supported encoder. HLS requires TS segments of 1–4 seconds, a rolling playlist with no more than five outstanding segments, and HTTPS POST/PUT; it has higher latency than RTMP. It is an alternative for compatible workflows, not the simplest default for a basic loop.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.

Plan around YouTube’s 12-hour archive limit

YouTube Help states that streams under 12 hours are automatically archived. Its guidance does not promise automatic archiving for one uninterrupted stream lasting 12 hours or longer. YouTube also says DVR rewind may be limited or unavailable for streams longer than 12 hours. If an archive matters, do not assume that OBS looping alone creates dependable archive segments or handles YouTube broadcast rotation.

Decide whether your priority is an uninterrupted live feed, reliably archived shorter broadcasts, or both. If you need separate archives, ending and starting distinct broadcasts may be necessary, but the cited guidance does not establish a fully automatic, reliable OBS rotation recipe. Verify what appears in Live Control Room and on the channel after your own broadcasts. See YouTube’s live stream DVR guidance alongside its encoder guide.

Rank #4
Sale
UGREEN 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common problems

OBS cannot add or play the video

  • Check that the local file path is correct and that the file is accessible to the Ubuntu account running OBS.
  • For a VLC Video source, confirm VLC is installed and its architecture matches OBS (64-bit VLC for 64-bit OBS).
  • Try a locally stored file in a documented common format, then confirm playback in the OBS preview before going live.

The video plays once and stops

  • For a Media Source, open its properties and enable Loop.
  • For a VLC Video playlist, enable Loop Playlist and confirm there is more than one intended playlist entry if you expect a sequence.

YouTube does not receive the OBS stream

  • Confirm that the server URL and stream key are copied from the correct stream in Live Control Room and entered in OBS without extra characters.
  • Check that the channel is enabled for live streaming; first-time enablement can take up to 24 hours.
  • Start the encoder and watch YouTube’s preview and stream-health status. For scheduled broadcasts, use Go live in Live Control Room after the preview appears.

The stream is unstable or reports poor health

  • Check upload capacity and stability, then lower the bitrate or output resolution if the connection cannot sustain the chosen settings.
  • Verify H.264, CBR and a 2-second keyframe interval (never over 4 seconds) for the recommended RTMP/RTMPS workflow.
  • Test with representative audio and video motion, and continue monitoring stream health while live.

The broadcast is live but there is no dependable full-length archive

  • Check the broadcast duration: the automatic-archive statement applies to streams under 12 hours, not a guaranteed 24-hour stream.
  • For streams longer than 12 hours, account for potentially limited or unavailable DVR rewind.
  • If archived segments are essential, plan separate broadcasts and verify the resulting archives rather than relying on the media loop to segment a YouTube stream.

Or let it run in the cloud

If your goal is a prerecorded YouTube channel that keeps running without leaving an Ubuntu PC on, StreamNeo is the cloud option: upload your video or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos from the cloud; it does not stream from a camera. Nothing has to stay on at home, and it automatically recovers if YouTube drops the stream. Every slot streams your upload as made, up to 4K 60fps, at one flat price per slot. The first day is free with no card. Monthly is $9.99 per month.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

Start your free first day with StreamNeo.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Screening Room

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.