Skip to content
streamneo.
Streaming Settings13 min read

Can OBS Stream Pre-Recorded Videos to YouTube While the PC Is Locked?

Learn what a Windows lock screen changes for OBS, how to verify a looping YouTube stream, and what settings and monitoring it needs.

sn.
StreamNeoPublished 7 October 2026
Worth sharing?

OBS can stream a pre-recorded video to YouTube while Windows is locked, but you should treat that as something to test on the PC you plan to use, not a universal guarantee. A lock screen is different from sleep, signing out, or switching to another Windows user, and those states can produce different results.

For a 24/7 playlist, the key question is not only whether the stream starts, but whether the PC keeps rendering and sending a moving picture and sound for hours. Set the output deliberately, leave the computer awake and connected, then verify the feed from another device after locking it.

Set a 720p30 output first

A modest, consistent output is a sensible starting point for a long-running playlist. In OBS, open Settings → Video and set the output resolution to 1280 × 720 and the common FPS value to 30. This is 720p30: 720-line output at 30 frames per second. It gives you a clear baseline to test without asking the encoder to produce a higher-resolution or higher-frame-rate feed than your material needs.

Set the canvas and output resolution with care. The canvas is the space OBS uses to arrange sources; the output resolution is what it sends to YouTube. If your video has a different aspect ratio, check the preview for black bars, cropping, or stretching rather than assuming OBS will frame it as intended. A devotional video in a wide format, for example, may need a logo or still background to fill the sides when placed in a 16:9 scene.

Add the file through an OBS Media Source and confirm the path points to the intended video. The OBS Media Sources guide documents local media playback, supported formats, and options such as looping. Enable Loop if the file should begin again at the end. Also decide what should happen when playback ends and when the source is activated; those choices affect whether a playlist visibly restarts or leaves a blank scene.

Before starting a public broadcast, watch the scene in OBS. Check that the video advances, the right audio source is present, and the whole frame is visible. If you are building a channel identity around a persistent mark, this guide to keeping a station logo visible on a 24/7 YouTube stream is relevant to scene layout as well as branding.

Choose the codec and bitrate

For an H.264 starting point at 720p30, YouTube's encoder recommendations are a video bitrate of 4 Mbps, H.264 video, and a keyframe interval of two seconds. Treat that as a documented starting configuration, not a promise that every network or scene needs exactly that rate. In OBS, the H.264 encoder may be listed as a hardware or software option depending on your computer; the important part is to select H.264 for the video stream and configure the stream bitrate deliberately.

The bitrate sent from OBS to YouTube is an encoder-stream setting. It is not the same thing as YouTube's recommendations for uploading a finished video file. An upload is a file YouTube processes after you send it; an encoder stream is a live feed that has to keep arriving while the broadcast is on. Do not take an upload-video recommendation and paste it into OBS without checking that it applies to live encoding.

YouTube publishes its current encoder guidance in Create a YouTube live stream with an encoder. Read the table for the resolution, frame rate, and codec you intend to use, because recommendations are tied to those choices. The 4 Mbps figure above is for the stated 720p30 H.264 starting point; it is not an instruction to send that rate for every format or a separate rule for a 24/7 playlist.

A static lofi scene and a video with quick movement may not encode identically at a given bitrate. Start from YouTube's recommendation, inspect the stream health indication in YouTube Studio, and watch the resulting picture for blockiness or other visible problems. If you change resolution or frame rate, revisit the relevant recommendation rather than assuming that the old rate remains suitable. You can also use the checklist for preparing a video file for a 24/7 YouTube stream before you build a long loop around it.

Use CBR and a two-second keyframe interval

Set rate control to CBR, or constant bitrate, for the live encoder where that setting is available. CBR aims to keep the outgoing video bitrate steady instead of allowing it to vary widely with scene complexity. That steadiness makes bandwidth planning more straightforward: you can estimate the sustained load and test whether the connection can carry it continuously.

Set the keyframe interval to two seconds, matching YouTube's H.264 recommendation. A keyframe is a complete reference image; the frames between keyframes can describe changes relative to earlier images. The interval is not the same as the frame rate. At 30 frames per second, a two-second interval corresponds to a group of frames between reference images, but you do not need to manually calculate that if OBS accepts the interval in seconds.

OBS labels can vary by encoder and version. If the control is expressed in seconds, enter two seconds; if it is expressed in frames, consult the encoder's setting and ensure it corresponds to the same interval at your chosen frame rate. Avoid changing several advanced encoder controls at once. Make one change, test the stream, and note what you changed so that you can return to a known-good setup.

These settings support an encoder feed, but they do not establish that a locked PC will keep rendering. A stream can have an appropriate codec and keyframe interval yet still fail because Windows sleeps, the session changes, the source stops playing, or the connection drops. Configuration is one part of the setup; an unattended test and a way to notice a failure are separate requirements.

Allow upload headroom

The outgoing stream has to travel from your home or workplace connection to YouTube continuously. A connection that can briefly reach the configured bitrate may still be a poor choice if other devices are using it, the Wi-Fi signal varies, or the upload capacity falls during busy periods. Aim for stable upload capacity above the stream's total outgoing bitrate, leaving room for variation and other traffic rather than treating the encoder target as the connection's entire capacity.

Do not confuse that headroom with a universal fixed multiple. The practical margin depends on the line, household or business use, and whether the computer is on Wi-Fi or a wired connection. If the connection is shared with video calls, cloud backups, or other uploads, those activities can compete with OBS. A large upload in the middle of a broadcast can be more consequential than a one-off speed-test result suggests.

For a first test, stop other heavy uploads and use an Ethernet connection if it is practical. If you must use Wi-Fi, put the PC where it has a reliable signal and test at the time the channel will normally run. A connection that behaves well in the afternoon should not be assumed to behave the same way overnight if other people or devices use it differently then.

The bitrate is not a viewer-delivery guarantee. YouTube receives the encoder feed and prepares playback for viewers; your outgoing upload capacity is the part under your control at the source. If viewers report buffering, that does not by itself prove that OBS lacks upload headroom. Keep the source connection, YouTube's stream-health information, and viewer-side playback as distinct parts of diagnosis. For a broader connection troubleshooting example, see how to reduce YouTube Live buffering for viewers in India.

Include audio in bandwidth planning

The video bitrate is not the full outgoing stream. Audio also uses bandwidth, even when the picture is a still image or a slowly moving ambience scene. Set the audio encoder to a format and bitrate that YouTube supports for live encoding, then include that audio contribution when judging the total load on the connection. Do not plan as if a video target were the complete figure.

Check the audio path in OBS rather than relying only on the preview. The Media Source may carry audio from the video file, while other scene sources can add a microphone, music bed, or desktop sound. In the mixer, confirm that the intended source is active and that unintended sources are muted. Play a short section and listen on another device; meters moving in OBS show signal, but they do not prove the audience hears the right mix.

For devotional or radio-style programming, a loop that reaches its end can expose an audio problem even when the video appears to restart. Listen across a loop boundary. Confirm that the soundtrack does not cut off early, overlap unexpectedly, or continue over a blank picture. If the video contains no audio, decide whether silence is the intended result or whether the scene needs a separate audio source.

When estimating upload demand, combine the configured video and audio rates and leave connection headroom above them. Network overhead and changing conditions mean that a speed test exactly equal to the combined target is not a dependable operating plan. This is why a sustained test matters more than a single peak reading.

Test the sustained connection

Use a staged test before trusting an overnight run. First, start the stream while logged in to the Windows session that owns OBS. Confirm in YouTube Studio that it is receiving a live feed and that the video moves and audio is present. The YouTube encoder guide describes connecting an encoder and checking the live control room; use the current instructions there rather than relying on remembered menu names.

Then leave the stream running long enough to expose ordinary interruptions in your setting. Keep the PC on power, keep the network connected, and prevent sleep and hibernation during the planned broadcast. A screen lock hides the desktop but does not necessarily put the computer to sleep. Conversely, a computer can sleep after the screen has gone dark even if you intended only to lock the session.

Once the stream is stable, lock Windows without signing out or changing to another user. From a phone or another computer, check the YouTube viewer output or Studio preview. Look for continuing motion, listen for audio, and make sure the feed has not frozen on a single frame. Do this on the actual machine, with the same graphics drivers, power plan, and OBS setup you expect to use. Documentation reviewed for this question does not guarantee that every Windows PC will continue encoding under every lock configuration.

If it freezes, separate the possible causes instead of repeatedly changing bitrate. Check whether the computer slept, whether the OBS session was signed out or switched away from, whether the Media Source stopped, and whether YouTube reports an incoming connection problem. OBS community reports describe problems after switching Windows users and discuss screen-sleep behaviour, but those reports are not proof that every same-session lock will fail. They are a reason to test the specific state you intend to rely on.

A useful test log can be simple: note the time you started, when you locked the PC, what you saw remotely, and whether the source reached its loop point. If the stream fails, repeat with one variable changed, such as keeping the screen awake while leaving the session locked. This makes a distinction between the lock itself and sleep or source playback, and avoids treating an unexplained one-time success as proof of an all-night workflow.

Monitor the 24/7 stream and choose the dependency

An always-on playlist needs ongoing observation, not just a successful start. YouTube Studio can show whether the encoder feed is being received, but a dashboard that you never check cannot alert you in practice. Arrange a periodic check from another device, especially after the stream starts, after the first loop boundary, and after any Windows, OBS, driver, or network change. Check for moving video and expected sound rather than relying only on a status label.

Keep the Windows session that runs OBS signed in. Do not switch users or sign out while expecting that session to continue. Set the machine not to sleep or hibernate during the stream, connect it to power, and keep the network interface from disconnecting. On a laptop, closing the lid may trigger a power action even if the display is otherwise locked, so inspect the relevant power settings and test the lid state only if you plan to use it.

If a connection drop or OBS problem is likely, decide in advance who will notice and what they can do. A restart procedure might mean checking the encoder connection, restarting OBS, and confirming that Studio receives a moving feed again. The practical point is that a playlist can repeat perfectly in OBS while the outbound stream is already gone. This Wirecast restart guide is about a different encoder, but its recovery-planning question is useful: who detects the drop and how is the broadcast restored?

For a small channel that can tolerate occasional intervention, using OBS on a PC may be the right trade-off: it uses equipment you already have and lets you control the scene directly. Its weakness for unattended use is dependence on that computer, Windows session, power state, and local connection. A separate encoder avoids dependence on the interactive PC session, but it adds hardware to set up and maintain. YouTube's encoder guidance identifies standalone hardware such as the AJA HELO Plus as an option for scheduling prerecorded media without a computer; check the manufacturer's current product information and workflow before purchasing.

If you need a stream to continue without leaving your own computer responsible for playback and encoding, StreamNeo removes that particular PC-session dependency: you upload a video, provide the YouTube stream key, and the broadcast runs without your computer staying on. It is a YouTube-only workflow, so it does not suit someone who needs a local OBS scene or a output. Compare the dependency you are removing against what you still need to monitor, including the YouTube channel, source video, and audience playback.

Approach What keeps the stream going Main trade-off
OBS on the locked PC The Windows session, OBS, media source, power and connection Uses existing equipment, but must be tested on that exact PC and monitored
Standalone encoder Dedicated encoder and its configured media workflow Avoids reliance on an interactive PC session, but requires a separate device and setup
Cloud video workflow The selected cloud service's playback and YouTube connection Removes the need to leave your own PC encoding, but depends on the service's workflow and YouTube access

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

Will OBS keep streaming if I lock my PC?

It may, if you only lock the same Windows session and the PC stays awake, connected, and running OBS. The available documentation does not promise this for every computer, so verify it by checking the moving feed from another device after the lock.

Does OBS stop when Windows sleeps?

Sleep is not the same as locking the screen: it can pause or interrupt the computer's work, including the stream. Prevent sleep and hibernation during the planned broadcast, and test the power settings you will actually use.

How do I loop a prerecorded video in OBS?

Add the file as a Media Source, confirm its path, and enable the source's Loop setting if you want it to repeat. Watch a complete end-to-start transition and listen across it before leaving the playlist unattended.

What if the stream must not depend on my PC session?

Compare a standalone encoder, which YouTube identifies as a way to schedule prerecorded media without a computer, with a cloud workflow that fits your channel. Check current availability and requirements before purchasing hardware or relying on any service, and keep monitoring the YouTube feed either way.

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 Streaming Settings guides ↗ · All topics ↗