# Integrating RTSP Camera Streams in .NET Applications

Video Capture SDK .Net VideoCaptureCoreX VideoCaptureCore

# Setting Up Standard RTSP Camera Sources

Implementing RTSP camera streams in your .NET applications provides flexible access to network cameras and video streams. This powerful capability allows real-time monitoring, surveillance features, and video processing directly within your application.

For additional connection options and alternative protocols, please reference our detailed IP cameras documentation which covers a wide range of camera integration approaches.

// Create RTSP source settings object
var rtsp = await RTSPSourceSettings.CreateAsync(new Uri("url"), "login", "password", true /*capture audio?*/);

// Set source to the VideoCaptureCoreX object
VideoCapture1.Video_Source = rtsp;

# Optimizing for Low-Latency RTSP Streaming

Low latency is critical for many real-time applications including security monitoring, interactive systems, and live broadcasting. Our SDK provides specialized configurations to minimize delay between capture and display.

Our SDK includes a dedicated mode specifically engineered for low-latency RTSP streaming. When properly configured, this mode typically achieves latency under 250 milliseconds, making it ideal for time-sensitive applications.

// Create the source settings object.
var settings = new IPCameraSourceSettings();

// Configure IP address, username, password, etc.
// ...

// Set RTSP LowLatency mode.
settings.Type = IPSourceEngine.RTSP_LowLatency;

// Set UDP or TCP mode.
settings.RTSP_LowLatency_UseUDP = false; // true to use UDP, false to use TCP

// Set source to the VideoCaptureCore object.
VideoCapture1.IP_Camera_Source = settings;

For optimizing performance in VideoCaptureCoreX, utilize the standard RTSP source with custom latency parameters to achieve your desired balance between smoothness and real-time response.

# Implementation Examples and Reference Applications

These sample projects demonstrate practical RTSP implementation patterns and can serve as starting points for your own development. Reviewing these examples will help you understand best practices for RTSP integration.

# Troubleshooting RTSP Connections

When working with RTSP cameras, you may encounter connectivity issues related to network configuration, firewall settings, or authentication. Here are key factors to consider:

  • Verify network connectivity between your application and the camera
  • Ensure correct authentication credentials are provided
  • Check if firewalls are blocking required ports (typically 554 for RTSP)
  • Consider using TCP instead of UDP if experiencing packet loss
  • Test camera streams with VLC or similar tools to isolate application-specific issues