Skip to main content

Creating a local RTMP source

There are several ways to integrate an RTMP source into an Eyeson session.

For production environments, RTMP sources are typically provided by dedicated applications or services. During development, however, a local RTMP source is useful for testing, debugging, and reviewing video layouts without requiring a separate external source.

This guide describes several options for creating a local RTMP source:

  • FFmpeg - A lightweight command-line solution
  • OBS Studio - A flexible solution for configuring custom scenes and layouts
  • Larix Screencaster - A mobile solution for streaming a device screen or camera

FFmpeg source

FFmpeg is a complete, cross-platform solution for recording, converting, and streaming audio and video. When using FFmpeg to capture a camera, you must specify the exact device name as it is registered with your operating system.

1. List Available Devices

Run the appropriate command for your operating system to identify the available hardware devices and their names.

ffmpeg -list_devices true -f dshow -i dummy
Example response
[in#0 @ 000001e87d428500] "HD Pro Webcam C920" (video)
[in#0 @ 000001e87d428500] Alternative name "@device_pnp_\\?\usb#vid_046d&..."
[in#0 @ 000001e87d428500] "Integrated Webcam" (video)
[in#0 @ 000001e87d428500] Alternative name "@device_pnp_\\?\usb#vid_0c45&..."
[in#0 @ 000001e87d428500] "Microphone (2- Shure MV7)" (audio)
[in#0 @ 000001e87d428500] Alternative name "@device_cm_{33D9A762-90C8-11D..."

2. Stream Webcam to RTMP Server

After identifying the camera, use the corresponding command for your operating system to publish the video stream to the local RTMP server.

ffmpeg -f dshow -i video="Integrated Camera" -c:v libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p -f flv rtmp://127.0.0.1:1935/live/localrtmp

The following options can be adjusted to control the encoding and streaming behavior:

  • -preset ultrafast: Reduces CPU usage to the absolute minimum so your computer doesn't lag.
  • -tune zerolatency: Removes any frames-buffering delay. This ensures your local service receives the webcam feed with less than a 1-second delay.
  • -pix_fmt yuv420p: Standardizes the video color pixel format so almost any RTMP engine can decode it without crashing.

3. Including Audio (Optional)

If audio is required, include an audio device in the FFmpeg input and configure the audio codec and bitrate as shown below.

ffmpeg -f dshow -i video="Integrated Camera":audio="Microphone Name" -c:v libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p -c:a aac -b:a 128k -f flv rtmp://127.0.0.1:1935/live/localrtmp

OBS stream

OBS Studio is an open-source application for video recording and live streaming. It provides a convenient interface for configuring scenes and can be used to stream an entire layout or an individual scene directly to a local RTMP endpoint.

  1. Navigate to Settings > Stream inside OBS Studio.
  2. Select Custom... from the Service dropdown option menu.
  3. Configure the destination routing values using the exact strings below:
    • Server: rtmp://127.0.0.1:1935/live (Do not add a trailing slash)
    • Stream Key: localrtmp
  4. Click Apply, click OK, and then hit Start Streaming.
IPv4 Note

If OBS returns a connection error, verify that you are using the explicit IPv4 loopback address 127.0.0.1 rather than localhost to avoid network routing handshake drops.

Larix screen

Larix Broadcaster is a mobile application for iOS and Android that supports streaming a mobile device's screen or camera over RTMP. It is particularly useful for testing remote-device layouts while developing in a local environment.

  1. Ensure your mobile device is connected to the same local Wi-Fi network as your development computer.
  2. Find the Local IP Address of your computer (e.g., 192.168.1.50). By running:
ipconfig
Look for
Wireless LAN adapter Wi-Fi:
IPv4 Address. . . . . . . . . . . : 192.168.1.50
  1. Open Larix Broadcaster, tap the gear icon to open Settings, and select Connections.
  2. Create a new connection profile using the target format:
    • URL: rtmp://127.0.0.1:1935/live/localrtmp
  3. Save the profile, return to the main viewfinder interface, and tap the Start button and select an app or entire screen to begin broadcasting.