How to Set Up Local Live Streaming with OBS and MediaMTX on OnSign Players

Learn to configure local live streaming using OBS and MediaMTX on OnSign Players for seamless broadcast experiences.

Some digital signage deployments require displaying a continuous live video feed from a local source, such as an HDMI or USB capture device, rather than an internet-hosted stream. This guide explains how to set up a local streaming pipeline using OBS Studio and MediaMTX, allowing the live signal to be distributed to one or more OnSign Players running on the same Windows machine. It also covers how to configure automatic startup so the streaming pipeline is restored after each system reboot.


How It Works

The pipeline consists of three stages running locally on the same Windows machine:

  • Capture — OBS Studio captures the video signal from the connected HDMI or USB capture device.
  • Relay — OBS sends the signal via RTMP to MediaMTX, a lightweight local media server. MediaMTX then makes the stream available as an HLS feed at http://localhost:8888/live/stream/index.m3u8.
  • Playback — The OnSign Player loads the local HLS stream through the Streaming Video Link app, in the same way it would load an external stream.

Because the video source remains on the local machine, the setup can operate without an internet connection. However, MediaMTX, OBS, and the OnSign Player must all be running on the same Windows machine.

Once setup_autostart.bat has been successfully configured, restarting or closing the OnSign Player does not interrupt the live stream. MediaMTX continues running as a Windows Service, while OBS continues streaming independently in the background. When the Player starts again, it can reconnect to the stream that is already being served.

Note: MediaMTX runs as a Windows Service with a watchdog configured through NSSM, which automatically restarts MediaMTX if it crashes. OBS and the OnSign Player do not have the same protection. If either application closes unexpectedly or fails, it must be restarted manually or the machine must be rebooted.

 

Configuration Steps

  1. Install OBS Studio and confirm that the OnSign Player is installed and licensed on the same Windows machine.
  2. Connect the video capture device to the machine using USB or HDMI.
  3. Download and extract the MediaMTX configuration package provided as a ZIP file.
  4. Run mediamtx.exe manually once and allow it through any Windows security prompt. This confirms that MediaMTX runs correctly before configuring it for automatic startup.
  1. Configure the autostart script. Right-click setup_autostart.bat and open it with Notepad. If Edit is not displayed directly in the context menu, select Open with and choose Notepad.
  2. In the CONFIGURATION section, replace the placeholder values with the actual paths to the MediaMTX, OBS Studio, and OnSign Player executables.

Note: If the deployment uses only one Player, do not leave the placeholder paths for Players 2, 3, or 4 as <add_path>. These unedited placeholders can cause the script to return an error. Either enter a valid executable path or comment out the corresponding line by adding :: at the beginning.

 
  1. Save the script, then right-click setup_autostart.bat and select Run as administrator. A confirmation message will appear when MediaMTX has been successfully installed as a service and the scheduled tasks have been created.
  1. Configure OBS Studio. Open OBS and go to File → Settings → Stream.
  1. Configure the following fields:
  • Service: Custom...
  • Server: rtmp://127.0.0.1:1935/live
  • Stream Key: server
  1. Add the capture device as an OBS source. In the Sources panel, click +, select Video Capture Device, choose Create new device, and click OK. Select the connected capture device as the source. The live video feed should appear in the OBS preview.

 

 

  1. Configure the Streaming Video Link app in OnSign. Go to the Content page, click New → Player Plugin, filter by Web & Media, and select Streaming Video Link.
  1. Enter the local stream URL in the app's URL field: http://localhost:8888/live/stream/index.m3u8
  1. Save the app and publish it to the desired Player.
  2. Start the stream in OBS. Click Start Streaming in OBS. The stream must be active for the OnSign Player to receive the live feed.

The stream must be displayed:


  • Test the complete pipeline manually before relying on the autostart configuration. Start MediaMTX, click Start Streaming in OBS, and open the OnSign Player to confirm that the live feed is displayed.
  • Validate the autostart configuration. Once the pipeline works correctly when started manually, reboot the Windows machine and confirm that MediaMTX, OBS, and the OnSign Player start automatically and that the live feed is restored.

Troubleshooting

  • The Player shows a blank screen after reboot, but works when tested manually: The likely cause is that MediaMTX or OBS has not finished starting before the Player attempts to load the stream. Resolution: Increase the scheduled task delays for the OBS and Player autostart tasks, giving each component enough time to initialize before the next one starts.
  • setup_autostart.bat closes immediately after briefly appearing, with no visible error: Double-clicking the file causes the Command Prompt window to close automatically when the script exits, including when an error occurs. Resolution: Run the script from an already-open Command Prompt as Administrator instead of double-clicking it. This keeps any error messages visible for troubleshooting.
  • OBS displays "Failed to connect to server" when attempting to stream: MediaMTX may not be running yet, or the Server and Stream Key values configured in OBS may not match those specified in this guide. Resolution: Confirm that the MediaMTX service is running, then verify the OBS Stream settings.
  • One or more additional Players do not launch automatically: The executable paths in setup_autostart.bat may still contain placeholders or point to an incorrect user folder. Resolution: Open the script in Notepad and verify that each Player path points to an existing OnSign TV Player.exe file.
  • The live feed goes down during a session and does not recover automatically: OBS may have crashed, been closed, or lost its capture signal after login. Unlike MediaMTX, OBS does not have a watchdog configured to relaunch it automatically. Restarting the Player will not resolve the issue because the Player is not the source of the problem. Resolution: Restart OBS manually or reboot the computer to restore the stream. If the issue occurs frequently, monitor the streaming pipeline to identify the underlying cause.