Skip to content
streamneo.
Setup Guides13 min read

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

Loop prerecorded video in OBS on Ubuntu, connect to YouTube Live and plan for monitoring and the 12-hour archive limitation.

sn.
StreamNeoPublished 5 October 2026
Worth sharing?

To run prerecorded video as a 24/7 YouTube stream from Ubuntu, add the file to OBS as a looping Media Source, connect OBS to your YouTube stream, then watch the stream health in Live Control Room. For several files, OBS’s VLC Video source can play a looping playlist, but playback looping does not create separate YouTube broadcasts or guarantee recovery if the encoder stops.

The important planning point is the archive: YouTube says streams under 12 hours are automatically archived. That is not a promise that one continuous 24-hour broadcast will be archived, so decide whether uninterrupted viewing, saved segments, or both matter before choosing how long each broadcast should run.

Install OBS on Ubuntu

OBS Studio is available for Linux, and the OBS Project’s Ubuntu installation guide describes installing through its PPA and apt. The commands shown there are:

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

Treat those commands as instructions to check, not a timeless guarantee that they are right for every Ubuntu and OBS combination. The guide gives Ubuntu 18.04 or newer as its baseline, while OBS’s later version guidance notes that OBS Studio 33 no longer supports Ubuntu 24.04. Check the current OBS documentation for your exact Ubuntu release and the version available from the package source before putting a channel into production. Avoid assuming that an older installation article means the newest OBS release supports your operating system.

OBS also has system requirements beyond having a Linux desktop. Its requirements page calls for OpenGL 3.3 support and an X window system or Wayland. The OBS Project cautions that basic compatibility does not prove a computer can stream or record adequately. Encoding a video, rendering scenes and maintaining a stable network connection are separate demands; test the actual content and settings on the machine you plan to use.

After installation, open OBS and run its configuration prompts if offered. Set up a simple scene rather than adding overlays before playback works. If you will show only a video, a single source in a single scene is easier to inspect when something goes wrong. Keep a copy of the source video somewhere other than a removable drive that might be disconnected, and check that the account running OBS can read it.

For first-time YouTube streaming, allow time for channel enablement. YouTube’s encoder instructions say that enabling live streaming for the first time can take up to 24 hours. Do not make the first attempt just before an event or overnight run: test the complete path from video playback to public viewing in advance.

Loop one video with Media Source

For one prerecorded file, use OBS’s Media Source. In the Sources box, add a Media Source, give it a name that identifies the content, and choose the local video file. In its properties, enable Loop. OBS describes Media Source and its looping option in the source guide. Resize or fit the source in the preview so the image fills the intended canvas, then check that no desktop or empty margins appear around it.

The Media Source approach is the simplest when the same video should repeat indefinitely. A devotional channel might use one prepared bhajan programme, while a study channel might replay a fixed focus session. The loop setting controls the source’s playback; it does not tell YouTube to create a new live event at a particular time. Nor does it restart OBS or reconnect the encoder if the computer loses power or the network fails.

Before connecting YouTube, play the source in OBS and observe at least one file ending and returning to its beginning. Check that the image does not turn black unexpectedly and that any audio returns with it. Listen on the computer rather than relying only on the moving audio meter. If the video has no sound by design, make that a deliberate choice rather than discovering silence after going live.

Use a file path that will remain stable. If you move, rename or replace the video after configuring the source, OBS may no longer find it. A practical test is to restart OBS and confirm the source still loads; this catches a common difference between a setup that works in the current session and one that can be reopened later. For more on the content and scheduling side of a loop, see this guide to using OBS to loop study videos on YouTube Live in India.

Use a playlist for multiple videos

If the stream should move through several prerecorded files, add a VLC Video source rather than creating a separate scene for every clip. OBS’s VLC source accepts a playlist and offers a Loop Playlist option. VLC must be installed separately, and OBS notes that 64-bit OBS needs 64-bit VLC. Consult the OBS VLC Video documentation for the current source requirements and controls.

Add the files in the order you want them played and enable Loop Playlist. Confirm whether the playlist should play in sequence or use shuffle, if that control is available in your installed version. Decide what viewers should see between files: a short black transition may be acceptable for a music station, while a news loop or shop display may need deliberate transitions or a holding card. Preview the hand-off between two different clips, not just each clip in isolation.

A playlist makes it easier to refresh individual items without combining them into one large file, but it introduces more points to check. Confirm every file is present and readable, and check that different aspect ratios do not leave unexpected borders. If clips have different loudness, a smooth playlist can still sound uneven. Listen to the transition and adjust source audio levels or prepare consistent audio before the broadcast.

There is a useful distinction between a playlist and a broadcast schedule. OBS’s VLC source loops media; it does not schedule a YouTube event, label each segment, or decide when the live broadcast should end. If the point is to rotate content for a calendar event, plan that schedule separately. The blog’s guide to scheduling a YouTube playlist stream around Indian public holidays covers that planning problem.

Connect OBS to YouTube Live

In YouTube Studio, open Live Control Room and create or select the stream you intend to use. YouTube provides a stream URL and a stream key for encoder-based streaming. In OBS, open Settings, choose Stream, select the available YouTube service or a custom service as appropriate, and enter the requested connection details. YouTube explains the encoder workflow in its Live stream with an encoder help page.

Treat the stream key like a password. Anyone with it may be able to send a broadcast to the associated channel, so do not paste it into a public document, share it in a screenshot, or include it in a public support request. If you think it has been exposed, replace or reset it in YouTube Studio and update OBS with the new key. Keep a private record of which OBS profile uses which channel rather than relying on memory when several channels are involved.

If you are setting up a scheduled stream, follow the sequence shown in Live Control Room. Start the encoder in OBS and wait for YouTube to receive the preview; then use the Go live control when the event is ready to begin. For other stream configurations, YouTube’s instructions may handle the transition differently, so follow the on-screen state rather than assuming that pressing Start Streaming in OBS always makes the viewing page public immediately. Starting the encoder sends content to YouTube; check the event status and viewer-facing page as well.

Before a real broadcast, test with representative footage and audio. A static title card is not a good test of a video with motion or a music programme with continuous sound. Check that the preview is framed correctly, the intended audio is present, and the stream is going to the right channel. YouTube advises testing the stream and checking its health; leave enough time to correct a wrong scene, key or event before viewers arrive.

Choose ingest and encoder settings

For a basic OBS-to-YouTube setup, RTMP or RTMPS is the usual encoder path. YouTube recommends H.264, constant bitrate (CBR), and a two-second keyframe interval for RTMP/RTMPS, with the interval not exceeding four seconds. Consult YouTube’s live encoder settings for its current recommendations and the complete settings context. RTMPS encrypts the connection to Google’s servers, according to YouTube’s guidance, so choose it when it is available in the workflow you are configuring.

Set resolution and bitrate for the output you actually need and the upload connection you can sustain. A high setting is not automatically better if it results in dropped frames or unstable delivery. YouTube provides recommended settings for different output targets; use the current table rather than copying a bitrate from an unrelated setup. A wired connection can reduce one source of wireless variability, but it does not make the internet connection immune to interruption.

Watch the OBS status indicators during the test. Dropped frames can point to network delivery problems; encoding lag can suggest that the machine is struggling to encode; rendering lag can indicate pressure on scene composition or graphics. The exact remedy depends on which indicator changes. Lowering output demands, simplifying scenes or resolving a network issue may help, but do not change several settings at once: make one adjustment and retest so you know what mattered.

HLS is another YouTube ingestion method, and YouTube documents support for it with compatible encoders, including OBS. Its configuration is more involved, including segment and playlist requirements, and YouTube notes higher latency than RTMP. Unless your workflow specifically requires HLS or a feature that depends on it, RTMP/RTMPS is the simpler starting point for a straightforward prerecorded loop. Compare the protocols based on the workflow rather than treating them as interchangeable labels.

Start the stream and monitor it

Once the source, encoder and event are ready, start streaming in OBS and open the corresponding event in Live Control Room. Confirm that YouTube is receiving a preview and that the stream health indicator is acceptable before asking viewers to join. Open the public watch page separately if possible; this checks the viewer experience rather than only what the encoder is sending.

Monitoring should include more than the first few minutes. Check playback at a later point, especially across a Media Source loop or playlist transition. Verify that audio is still present, the image has not frozen, and OBS remains connected. If someone can share the duty, agree who checks the channel and how they will contact you if the stream stops; an unattended computer is not the same as a monitored broadcast.

Keep the Ubuntu machine’s power and sleep behaviour in mind. A laptop that suspends when its lid closes, an automatic reboot, a desktop session ending, or a system update prompt can interrupt OBS. Configure the machine deliberately for the intended operating period and test the setting, while retaining a sensible way to apply security updates outside the broadcast. Do not disable updates indefinitely just to avoid interruption; schedule them and restart-test before the next long run.

OBS can reconnect after some interruptions, depending on the cause and settings, but that is not a substitute for checking. Local power loss, a crashed process, an expired or changed stream key, or a failed internet connection may need human intervention. If you need a stream to continue while your own computer is off, StreamNeo removes the specific burden of keeping this OBS machine running by turning an uploaded video into a YouTube broadcast, but you still need to plan the broadcast and its archive behaviour.

For a local Ubuntu setup, write down a short recovery checklist: confirm power and internet, reopen OBS, check the selected scene and source, verify the correct event and key, then inspect Live Control Room. Keep credentials private and make the checklist available to the person actually on call. If your priorities are different—such as running a local machine versus using a remote playout approach—this comparison of an old laptop and a VPS for a 24/7 YouTube music stream can help frame the operating trade-offs.

Plan around the 12-hour archive boundary

The archive limitation deserves a decision before you start. YouTube’s encoder help says that all streams under 12 hours are automatically archived. Its documentation does not make that guarantee for one uninterrupted broadcast lasting 24 hours or more. YouTube also warns that DVR rewind may be limited or unavailable for streams longer than 12 hours. A live picture continuing to play and a complete replay becoming available are different outcomes.

If viewers mainly need a continuous live channel, one long broadcast may fit the viewing goal, but you should not tell them to expect a complete archive from it. If saved replays matter, consider whether separate broadcasts shorter than the documented boundary better match your needs. Ending and starting broadcasts can create interruptions, require someone or something to manage each transition, and may give viewers separate watch pages. The cited guidance does not establish a fully automatic, reliable OBS recipe for rotating a continuous broadcast into guaranteed archive segments.

A practical decision table makes the trade-off visible:

Priority Broadcast approach to consider What to verify
Continuous viewing matters most Keep a continuous broadcast if the setup can be monitored Do not assume the full 24-hour stream will be archived; check DVR behaviour and the resulting event in Live Control Room
Replay segments matter Plan separate broadcasts that stay under YouTube’s stated archive threshold Confirm how each event is created and ended, what viewers see at transitions, and whether the archive appears as expected
Both matter Test a planned rotation before relying on it for a public channel Check whether transitions create gaps, separate watch pages and usable archives; the available OBS loop controls do not manage this by themselves

Test the intended duration and hand-off on the actual channel or an appropriate test event before depending on it. Check the resulting stream and archive in YouTube Studio rather than inferring success from OBS showing that it sent video. Keep a local copy of original files if you need to preserve the source material; that is separate from YouTube’s archive of a live event.

If your channel is built around recurring content, decide who owns the end-of-broadcast action, who starts the next event and how the audience will be directed to it. Do not describe a playlist loop as a 24-hour archive strategy. For devotional programming, the guide to streaming a 24/7 kirtan channel with a cloud relay discusses a different operating approach; the same need to distinguish continuous playback from saved broadcasts still applies.

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 OBS loop a video continuously?

Yes. Add the local file as an OBS Media Source and enable Loop in its properties. That repeats playback, but it does not create new YouTube events or guarantee that OBS will recover from a computer or network failure.

Can OBS loop several prerecorded videos?

Yes. Use a VLC Video source with a playlist and enable Loop Playlist. VLC must be installed, and the playlist files and transitions should be tested in OBS before you go live.

Will YouTube archive a 24-hour livestream automatically?

Do not rely on that. YouTube states that streams under 12 hours are automatically archived, and does not extend that guarantee to a continuous 24-hour broadcast; DVR may also be limited or unavailable beyond 12 hours.

Do I need to keep Ubuntu running for OBS to stream?

For a local OBS broadcast, the computer running OBS needs to stay on, awake and connected while it sends the stream. If you need the broadcast to run with your computer switched off, use a workflow designed to keep the video going without that local machine, and still verify what YouTube does with the broadcast and archive.

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 ↗