Fix OBS Black Screen When Playing Encoded Video
In this article
If OBS Studio shows a black screen when you try to play an encoded video file (like an MP4 or MKV) in a media source, the issue is usually a codec or GPU decoding conflict. This guide walks you through the most reliable fixes, from changing OBS's video decoder settings to re-encoding the file itself. You'll need access to OBS Studio's Settings menu and, in some cases, a free video conversion tool.
What You'll Need
- OBS Studio installed (any recent version)
- The video file that shows a black screen
- Optional: A video converter like HandBrake or VLC (to re-encode the file)
- Administrator rights on your computer (for some fixes)
Step-by-Step
- Check the media source settings. In OBS, right-click the media source that shows black, select Properties, and make sure Local File is checked and the correct file path is loaded. If you see a red X or an error, the file may be corrupted or unsupported.
- Change the hardware decoding setting. Go to Settings > Advanced. Under the Video section, find Hardware Decoding (or Video Decoder in older versions). Set it to Disable (or Software). Click Apply and OK. This forces OBS to use CPU decoding instead of GPU, which often fixes black screens caused by incompatible codecs.
- Restart the media source. After changing the decoder, click the eye icon next to the media source to hide it, then click it again to show it. If it still shows black, toggle the source off and on by clicking the visibility icon twice.
- Update your GPU drivers. Outdated or corrupted graphics drivers are a common cause. Visit your GPU manufacturer's website (NVIDIA, AMD, Intel) and download the latest driver for your model. Install and restart your computer.
- Re-encode the video file. If the above fails, the video codec (like HEVC/H.265 or AV1) may not be fully supported by OBS's decoder. Use a free tool like HandBrake or VLC to convert the file to a more compatible format: H.264 in an MP4 container. In HandBrake, choose the Fast 1080p30 preset, select your file, and start encoding. Then add the new file to OBS.
- Run OBS as administrator. Right-click the OBS shortcut and select Run as administrator. This can resolve permission issues with hardware acceleration.
- Disable hardware acceleration in OBS (if using browser sources). If the black screen is from a browser source playing a video, go to Settings > Advanced and uncheck Enable Browser Source Hardware Acceleration. Restart OBS.
Common Mistakes
- Forgetting to restart OBS after changing decoder settings. Some changes require a full restart to take effect.
- Assuming the file is fine just because it plays in VLC. VLC bundles its own codecs, while OBS relies on system codecs. A file can play in VLC but still fail in OBS.
- Using a media source for a network stream. If you're trying to play a URL, make sure the Input field has the correct URL and that the network is stable.
- Not checking the audio. Sometimes the video is fine but the audio track is missing, making it appear black. Check the audio mixer in OBS to see if audio is being received.
Tips
- Keep OBS and your GPU drivers updated regularly to avoid codec compatibility issues.
- If you frequently work with HEVC or AV1 files, consider installing the K-Lite Codec Pack (or similar) to add system-wide codec support.
- Test with a short, standard MP4 file (H.264) to isolate whether the issue is with the file or OBS settings.
- Use the Preview button in the media source properties to see if the video plays there; if it does, the issue is with the scene setup, not the file.
Troubleshooting
If the black screen persists after trying all steps:
- Check the OBS log. Go to Help > Log Files > Show Log Files. Open the latest log and look for errors mentioning "decoder", "codec", or "media". This can point to the exact problem.
- Try a different media source type. Instead of a Media Source, use a VLC Video Source (if you have VLC installed) or a Display Capture of a separate video player window. This is a workaround, not a fix, but it can get you streaming.
- Test with a different video file. If a known-good MP4 works, the problem is with the original file's encoding. Re-encode it with a different tool or settings.
- Reset OBS settings. Back up your scenes, then go to Settings > General and click Reset Settings (or rename the
obs-studiofolder in%APPDATA%to force a fresh config). This is a last resort.
Frequently Asked Questions
Why does the video play fine in a regular player but not in OBS?
OBS uses system codecs and its own decoder, which may not support every format. VLC and similar players bundle their own codecs, so they can play almost anything.
What is the most compatible video format for OBS?
H.264 video in an MP4 container with AAC audio is the safest choice. It works on virtually all systems without extra codecs.
Do I need to re-encode the video if I change OBS's decoder?
Not always. Disabling hardware decoding often fixes black screens. Only re-encode if the software decoder also fails.
Can I use a video with a transparent background (like a green screen) in OBS?
Yes, but it must be encoded with an alpha channel (e.g., ProRes 4444 or WebM with VP9). Standard H.264 MP4s don't support transparency.
Why does the video show black only in the preview but not in the stream?
This can happen if your GPU is overloaded or if the preview is using a different rendering mode. Try disabling the preview and streaming directly to see if the output is correct.
Is there a way to force OBS to use a specific codec?
OBS doesn't let you force a codec for media sources. You can only choose between hardware and software decoding. For more control, you'd need to re-encode the file.