To keep an OBS Studio loop stream running overnight on macOS, you need to disable the computer’s sleep and display sleep settings, configure OBS to not auto-stop on dropped frames or disconnects, and ideally run a looped video source that can repeat indefinitely. This article walks you through the exact settings and steps to achieve a stable, unattended stream.
Why OBS Stops or Disconnects Overnight
Most overnight stream failures on macOS come down to three things: the Mac going to sleep, the network connection dropping, or OBS encountering an error and stopping the stream. macOS by default puts the system to sleep after a period of inactivity, which immediately kills the stream. Even if sleep is disabled, the display may turn off, and some network adapters or Wi-Fi connections can drop after long idle periods. Additionally, OBS has a setting that stops the stream if the connection is interrupted for a certain number of seconds — if that’s enabled, a brief network hiccup will end your stream.
Step 1: Keep macOS Awake
Before touching OBS, you must prevent the Mac from sleeping. Open System Settings (or System Preferences on older macOS) and go to Battery (or Energy Saver). For a MacBook, you’ll see two sections: “Battery” and “Power Adapter.” For both, set the “Turn display off” slider to “Never” and uncheck “Put hard disks to sleep when possible.” If you’re on a desktop Mac, the same options appear under Energy Saver — set the computer and display sleep to “Never.”
If you don’t want to change your system-wide settings, you can use a utility like Amphetamine or caffeinate (a built-in macOS command). To use caffeinate, open Terminal and type caffeinate -d — this keeps the display awake until you press Ctrl+C. For a more automated approach, caffeinate -d -i also prevents idle sleep. But for a truly unattended overnight stream, changing the system settings is the most reliable.
Step 2: Configure OBS to Not Stop on Errors
OBS has a feature that automatically stops the stream if the connection is lost for a specified number of seconds. This is meant to avoid a frozen stream, but for an overnight loop, you want it to keep trying to reconnect. In OBS, go to Settings → Advanced. Under the “Network” section, find “Disconnect if streaming for more than” and set it to a high number (like 0, which disables it). Also, uncheck “Enable network optimizations” — this can help with some Wi-Fi issues, though it’s not always necessary. The key is to ensure OBS doesn’t stop the stream on its own.
Additionally, in Settings → Output, set the “Output Mode” to “Advanced” and go to the “Streaming” tab. Here, you can set the “Reconnect Delay” and “Maximum Shutdown Time” — but the most important is to leave the “Stop Stream on Disconnect” option unchecked (if present). In recent OBS versions, this option is not directly visible; instead, OBS will keep trying to reconnect forever unless you set a limit in the Advanced settings. The default behavior is to keep reconnecting, so as long as you don’t have a custom shutdown time, it should be fine.
Step 3: Set Up a Looping Video Source
To have content playing all night, you need a source that loops. The simplest is to use a Media Source with a video file. Add a Media Source to your scene, select your video file, and check the box for “Loop” (or “Restart playback when file ends”). OBS will then play the video in a loop indefinitely. If you have a playlist of videos, you can create a VLC Video Source (if you have the VLC plugin installed) and add multiple files, setting it to loop. Alternatively, you can use a Slideshow source for images, which also has a loop option.
For a more dynamic loop, you could use a browser source with a looping web page, but a simple media file is the most stable. Ensure the video file is not too large — a 1-hour video at 1080p can be several GB, but it will be read from disk, so it’s fine. Just make sure the disk has enough free space and the file isn’t corrupted.
Step 4: Prevent Network Drops
If you’re on Wi-Fi, the connection can drop overnight due to power saving on the Wi-Fi adapter. To minimize this, use an Ethernet cable if possible — it’s far more stable. If you must use Wi-Fi, go to System Settings → Network → Wi-Fi → Details → Hardware and set “Configure IPv4” to “Using DHCP” (default). There’s no direct setting to prevent sleep on Wi-Fi, but you can disable “Power Nap” in System Settings → Battery → Options (or Energy Saver). Power Nap can wake the Mac for background tasks, which might interfere.
Also, check your router’s settings — some routers have a “Wi-Fi sleep” or “green mode” that disconnects idle devices. If you can, disable that for your Mac’s MAC address. For a truly reliable overnight stream, a wired connection is strongly recommended.
Common Problems and Fixes
- Stream stops after a few hours but Mac is awake: Check the OBS log file (Help → Logs → Show Logs). Look for “Disconnected” or “Network” errors. Also, check if your ISP throttles long-lived connections — some do.
- Video freezes but audio continues: This is often a network issue. Lower your bitrate in OBS (Settings → Output → Streaming) to reduce bandwidth. Also, try changing your encoder to “x264” instead of hardware encoding, as it’s more stable on some Macs.
- OBS crashes overnight: This can be due to a memory leak or a plugin. Update OBS to the latest version and disable any third-party plugins. Also, close other apps that might use GPU memory.
- Mac wakes from sleep but stream doesn’t resume: If you use the caffeinate command, it will keep the system awake, but if the Mac sleeps due to a forced sleep (e.g., closing the lid), the stream will stop. Make sure the lid is open or use a clamshell mode with an external display.
Frequently Asked Questions
Can I close the lid of my MacBook and keep streaming?
Yes, but you need to have an external display connected (or a USB-C hub with HDMI) and be on power adapter. With an external display, macOS will stay awake even with the lid closed. Without an external display, closing the lid forces sleep and stops the stream.
Will OBS use a lot of CPU overnight?
It depends on your settings. Streaming at 1080p with x264 will use a few cores. On a modern Mac, this is fine, but it will drain the battery if not plugged in. Always stream while plugged in to avoid shutdown.
How do I make a video loop in OBS without a media file?
You can use a browser source with a looping web page (e.g., a YouTube video set to loop, or a custom HTML page that cycles through images). However, this relies on internet connectivity and may be less stable than a local file.
What bitrate should I use for an overnight stream?
For 1080p, a bitrate of 3500–4500 kbps is typical for Twitch or YouTube. For 720p, 2500–3500 kbps. Lower bitrates are more forgiving on unstable networks. You can set this in Settings → Output → Streaming.
Is it safe to leave my Mac running overnight?
Yes, as long as it’s plugged in and well-ventilated. Macs are designed to run for long periods. Just ensure the fan vents aren’t blocked and the room temperature is moderate.
Alternatives to OBS for Overnight Loops
If OBS is giving you trouble, there are other tools. ffmpeg can stream a looping video to a server with a simple command line. For example: ffmpeg -re -stream_loop -1 -i video.mp4 -c copy -f flv rtmp://your-server. This is very stable and uses fewer resources than OBS. Another option is VLC with its streaming capabilities, though it’s less configurable. However, OBS remains the most flexible for overlays, multiple scenes, and audio mixing.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Apps Not Downloading From Play Store
- Secure a Samsung Galaxy After a Zero-Day Disclosure
- What to Check Before Installing Linux Alongside Windows
- Fix OEM Activation Error 0xc004c060 in Windows 10
- Why Does My App Run One Query for the List and One per Item?
- Fix Google Chrome Has Stopped Working