GoSecurityHub
Technical Article

What Is RTSP? How Does It Work? The RTSP Protocol in IP Camera Systems

Sistem Yöneticisi19 min read

RTSP (Real Time Streaming Protocol) is a media-stream control protocol used with IP cameras, NVR devices, video management software, and live-streaming systems. How does RTSP work, how is an RTSP address created, which ports does it use, and how does it differ from ONVIF, RTP, and RTMP?

RTSP protokolünün çalışma prensibi, IP güvenlik kameralarında gerçek zamanlı video akışı, sunucu bağlantısı ve bilgisayar üzerinden canlı görüntüleme.

Various network protocols are used to transmit live video from IP camera systems over a network, monitor it centrally, record it, and integrate it with different software. One of the most important of these protocols is RTSP.

RTSP is one of the core technologies that enables IP cameras from different manufacturers, network video recorders (NVRs), video management software (VMS), and AI-powered video analytics platforms to access live media streams.

The RTSP protocol is used in many fields, from professional CCTV systems and industrial imaging applications to remote monitoring systems, people counting, and video analytics solutions.

What Is RTSP?

RTSP (Real Time Streaming Protocol), known in Turkish as Gerçek Zamanlı Akış Protokolü (Real-Time Streaming Protocol), is an application-layer protocol that enables control of audio and video streams delivered over a network.

Its first version was defined in 1998 by the RFC 2326 standard. RTSP version 2.0 was published in 2016 as the RFC 7826 standard.

The RTSP protocol enables a session to be established between a client and a media server and the media stream to be managed.

The core functions of RTSP are:

  • Access a live video stream

  • Establish a media session

  • Start the video stream

  • Pause the stream on supported systems

  • End the media session

  • Specify audio and video stream parameters

  • Select the media transport method to use

  • Enable video integration across different devices and software

RTSP is not a video compression technology in itself. It is a media-control protocol independent of image encoding formats such as H.264, H.265, or MJPEG.

How Does RTSP Work?

RTSP operates on a client-server architecture.

In IP camera systems, the camera usually acts as the RTSP server, while an NVR, VMS, media player, or video analytics software operates as the RTSP client.

The client connects to the camera's RTSP address to establish a media session and request the live video stream.

While RTSP controls the media session, video and audio data are usually carried via RTP (Real-time Transport Protocol). RTCP (RTP Control Protocol) helps share statistics and control information related to media transmission.

RTSP connection steps

Command

Function

OPTIONS

Retrieves the RTSP commands supported by the server.

DESCRIBE

Requests the media stream's properties.

SETUP

Specifies the media transport method and session parameters.

PLAY

Starts the media stream.

PAUSE

Pauses the stream in supported sessions.

GET_PARAMETER

Can query session parameters or be used to keep the session open.

SET_PARAMETER

Enables supported parameters to be changed.

TEARDOWN

Ends the media session.

In a typical IP camera RTSP connection, the client first retrieves the camera's media properties, then specifies the transport method, and starts the video stream with the PLAY command.

Not every IP camera may support all RTSP commands.

What Is the Difference Between RTSP, RTP, and RTCP?

The RTSP, RTP, and RTCP protocols perform different, complementary roles in live media transmission.

Protocol

Full name

Primary function

RTSP

Real Time Streaming Protocol

Controlling the media session

RTP

Real-time Transport Protocol

Transporting audio and video packets

RTCP

RTP Control Protocol

Transmission statistics, timing, and control information

RTSP can be likened to a media player's control mechanism, RTP to the communication channel carrying video and audio, and RTCP to the control mechanism used to monitor transmission performance.

What Is an RTSP Address?

An RTSP address is the connection address used to access a particular video stream on an IP camera or media server.

The general RTSP address format is as follows:

rtsp://username:password@IP-address:port/stream-path

Address component

Description

rtsp://

Protocol used

Username

Camera access account

Password

Camera access password

IP address

Network address of the camera or media server

Port

RTSP service port

Stream path

Specifies the video channel or stream profile to access

Example RTSP address:

rtsp://192.168.1.100:554/Streaming/Channels/101

Some clients support including the username and password in the connection address. However, for security reasons, it is recommended to enter credentials in the client's separate authentication fields whenever possible.

The RTSP address format may vary depending on the camera manufacturer, device model, and software version.

Which Port Does RTSP Use?

The default service port for the RTSP protocol is 554.

Port

Purpose

554

Standard RTSP service port

8554

Alternative RTSP port used in some applications

322

Registered port for secure RTSP over TLS

Dynamic UDP ports

RTP and RTCP media transmission

The RTSP service port can be changed by the user on supported devices.

Establishing the RTSP control connection over port 554 does not mean that all video packets must travel over the same port. The media transport method may vary depending on the TCP or UDP configuration.

What Is the Difference Between RTSP TCP and UDP?

Separately from the RTSP control session, RTP media packets can be transmitted using different transport methods.

RTP over UDP and RTP over RTSP/TCP are commonly used in IP camera systems.

TCP media transmission over RTSP

With the TCP interleaved transport method, RTP and RTCP packets can be carried over the RTSP control connection.

TCP ensures that lost packets are retransmitted and that data is delivered in order.

It can reduce image distortion on networks experiencing packet loss. However, retransmissions may cause latency and video freezes.

UDP media transmission

UDP carries media packets without guaranteeing retransmission.

It can be advantageous in applications where low latency is important. However, packet loss on the network may cause image distortion.

TCP and UDP comparison

Feature

TCP

UDP

Connection type

Connection-oriented

Connectionless

Packet delivery guarantee

Yes

No

Retransmission of lost packets

Yes

No

Latency

May increase depending on network conditions

Generally low

Effect of packet loss

Freezing and latency

Image distortion

Firewall configuration

Generally easier

Additional ports may be required

Multicast support

No

Yes

Use case

NVR, VMS, remote networks

Local networks, low-latency applications

When selecting a transport method for professional CCTV systems, network quality, packet loss, bandwidth, latency tolerance, and the application's technical requirements should all be considered together.

RTSP Addresses by IP Camera Brand

Different IP camera manufacturers may use different RTSP stream paths.

The addresses below are examples of commonly used connection formats. The exact address should be verified against the device model and firmware version.

Hikvision RTSP address

Main Stream:

rtsp://192.168.1.100:554/Streaming/Channels/101

Sub Stream:

rtsp://192.168.1.100:554/Streaming/Channels/102

Dahua RTSP address

Main stream:

rtsp://192.168.1.100:554/cam/realmonitor?channel=1&subtype=0

Sub stream:

rtsp://192.168.1.100:554/cam/realmonitor?channel=1&subtype=1

Hanwha Vision Wisenet RTSP address

First video profile:

rtsp://192.168.1.100:554/profile1/media.smp

Second video profile:

rtsp://192.168.1.100:554/profile2/media.smp

Axis RTSP address

rtsp://192.168.1.100:554/axis-media/media.amp

On Axis devices, different image properties can be requested through supported stream parameters and defined stream profiles.

Uniview RTSP address

Main stream:

rtsp://192.168.1.100:554/media/video1

Sub stream:

rtsp://192.168.1.100:554/media/video2

IP camera RTSP addresses comparison table

Manufacturer

Example main stream path

Example sub stream path

Hikvision

/Streaming/Channels/101

/Streaming/Channels/102

Dahua

/cam/realmonitor?channel=1&subtype=0

/cam/realmonitor?channel=1&subtype=1

Hanwha Vision

/profile1/media.smp

/profile2/media.smp

Axis

/axis-media/media.amp

Depends on the stream profile

Uniview

/media/video1

/media/video2

On NVR devices, RTSP channel numbering may differ from direct IP camera connections.

What Are RTSP Main Stream and Sub Stream?

Modern IP cameras can generally generate multiple independent video streams.

Main Stream – Primary stream

It is generally a high-resolution, high-quality video stream.

Its primary uses include high-quality recording, forensic examination, detailed image analysis, and single-camera monitoring.

Sub Stream – Secondary stream

Compared with the main stream, it generally has a lower resolution and bitrate.

It can be used for viewing on mobile devices, multi-camera viewing, low-bandwidth connections, and suitable video analytics applications.

Third Stream – Tertiary stream

On supported IP cameras, this is an additional video stream that can be configured for different applications independently of the recording and live-view streams.

Feature

Main Stream

Sub Stream

Third Stream

Example resolution

4K

640 × 360

1920 × 1080

Example bitrate

8 Mbps

512 Kbps

2 Mbps

Image quality

High

Low

Configurable

Recording

Common

Optional

Optional

Mobile viewing

High data consumption

Suitable

Suitable

Video analytics

Application-dependent

Application-dependent

Application-dependent

The resolution and bitrate values in the table are examples. Actual values vary depending on the camera model and configuration.

The Relationship Between RTSP and H.264, H.265

RTSP is a media control protocol, while H.264 and H.265 are video compression standards.

An IP camera can encode images in H.264 or H.265 format and provide access to them through an RTSP session.

Technology

Function

RTSP

Media session control

RTP

Transmission of encoded media packets

H.264

Video compression

H.265

More advanced video compression

MJPEG

Creating video from independent JPEG frames

AAC

Audio encoding

G.711

Audio encoding

A successful RTSP connection does not necessarily mean that the client can decode the video.

For example, a VMS or NVR device that does not support H.265 may be unable to display live video even though it establishes an RTSP session.

What Is the Difference Between RTSP and ONVIF?

ONVIF is a set of standards and interfaces intended to enable interoperability among IP-based security devices from different manufacturers.

RTSP, by contrast, focuses on controlling media streams.

Feature

RTSP

ONVIF

Live video access

Yes

Through supported profiles

Automatic device discovery

No

Yes

Camera configuration

Outside the scope of the standard

For supported features

PTZ control

Outside the scope of the standard

On supported devices

Motion detection events

Outside the scope of the standard

In supported profiles

Video analytics events

Outside the scope of the standard

In supported profiles

Recording search and playback

Depends on server support

Under Profile G

Integration across manufacturers

At the media-stream level

More comprehensive

An ONVIF-enabled NVR can query a camera's media profiles and automatically discover the appropriate RTSP stream address.

Therefore, ONVIF and RTSP are complementary technologies rather than alternatives to one another.

Differences Between RTSP, RTMP, HLS, and WebRTC

Different protocols used to transmit live video have been developed to meet different application needs.

Feature

RTSP/RTP

RTMP

HLS

WebRTC

Primary use

IP camera and CCTV

Live streaming

Video distribution over the internet

Real-time communication

Latency

Can be low

Low to moderate

Generally higher

Can be very low

Browser support

Not widely supported natively

Not widely supported natively

Broad, depending on the player

Broad in modern browsers

Use with IP cameras

Common

On some models

Limited

Emerging

Two-way communication

Not a primary purpose

Not a primary purpose

No

Yes

Scaling distribution

Requires additional infrastructure

Via a media server

Well suited to CDN delivery

May require a media server

While RTSP is widely used, particularly in local-network-based CCTV systems, WebRTC can offer significant advantages for low-latency viewing through a browser and two-way communication applications.

How to View an RTSP Stream with VLC Media Player

VLC Media Player is one of the widely used media players that can be used to test video from RTSP-enabled IP cameras.

To test the RTSP connection:

  1. Open the VLC Media Player application.

  2. Open the Media menu.

  3. Select Open Network Stream.

  4. Enter the camera's RTSP address.

  5. Click the Play button.

  6. If prompted, enter the camera's username and password.

In Windows, the network stream window can be opened by pressing Ctrl + N.

Testing the RTSP connection through VLC can help diagnose video display problems between a camera and an NVR or VMS.

Official software address: VLC Media Player

How to Test an RTSP Stream with FFmpeg and FFprobe

FFmpeg is open-source software used to process, record, and convert media streams.

FFprobe enables inspection of the technical properties of a video stream.

The following information can be checked through an RTSP stream:

  • Video codec format

  • Image resolution

  • Frame rate (FPS)

  • Audio codec format

  • Video profile information

  • Number of media streams

  • Connection and decoding errors

Example FFprobe command:

ffprobe -rtsp_transport tcp -show_streams "rtsp://192.168.1.100:554/Streaming/Channels/101"

For devices that require authentication, the appropriate access credentials must also be provided.

Official software address: FFmpeg

How Is RTSP Bandwidth Calculated?

The network traffic generated by an RTSP connection depends primarily on the bit rates of the video and audio streams being transmitted.

The number of cameras, resolution, FPS, compression format, scene activity, and number of simultaneous clients can affect the total network load.

Total Video Bandwidth = Number of Cameras × Average Video Bit Rate

Number of cameras

2 Mbps per camera

4 Mbps per camera

8 Mbps per camera

4

8 Mbps

16 Mbps

32 Mbps

8

16 Mbps

32 Mbps

64 Mbps

16

32 Mbps

64 Mbps

128 Mbps

32

64 Mbps

128 Mbps

256 Mbps

64

128 Mbps

256 Mbps

512 Mbps

128

256 Mbps

512 Mbps

1,024 Mbps

For example, if each of 32 IP cameras transmits video at an average bit rate of 4 Mbps, the total video traffic will be 128 Mbps.

During project design, sufficient capacity should be reserved for audio traffic, network protocol overhead, variable bit-rate spikes, and other network services.

What Are RTSP Unicast and Multicast?

Unicast

A separate media stream is sent to each client.

If a video stream from a camera with a bit rate of 4 Mbps is viewed directly by five different clients using unicast, it can generate approximately 20 Mbps of media traffic on the camera side.

Multicast

It enables the same media stream to be distributed to multiple clients over supported network infrastructure.

It can help use network resources more efficiently in large CCTV projects with many viewing clients.

Multicast implementations should account for technical requirements such as IGMP Snooping, appropriate multicast routing, and network segmentation.

Why Does RTSP Video Latency Occur?

Latency in RTSP video transmission is not caused by the RTSP protocol alone.

The main factors affecting total video latency are:

Source of latency

Description

Camera image processing

Sensor and image processor latency

Video encoding

H.264 or H.265 encoding time

GOP structure

Keyframe intervals and encoding structure

Network latency

Packet transmission time

Packet loss

Retransmission or image distortion

Jitter

Variation in packet arrival times

Client buffer

Holding the stream before playback

Video decoding

Client processor and GPU capacity

Display

Screen and software processing time

For low-latency applications, camera encoding settings, network infrastructure, and client buffering parameters should be optimized together.

Using the RTSP protocol alone does not guarantee a specific latency.

Is RTSP Secure?

Standard RTSP connections do not inherently guarantee encryption of media content.

Authenticating with a username and password also does not mean that video packets are transmitted in encrypted form.

The following security measures should be considered for professional IP camera systems:

  • Do not expose IP cameras' RTSP ports directly to the internet

  • Use a secure VPN infrastructure for remote connections

  • Manage the camera network through a separate VLAN

  • Create strong, unique user passwords

  • Use user accounts with viewing-only permissions

  • Keep camera firmware up to date

  • Set up firewalls and access control lists

  • Disable unused network services

  • Use secure media transport methods on supported devices

  • Do not leave RTSP access credentials exposed in logs or shared links

What Is RTSPS?

RTSPS is a connection method that secures RTSP control communication over TLS.

However, protecting the RTSP control channel with TLS does not mean that RTP media packets carried over a separate UDP channel are also encrypted automatically.

The transport architecture used for media security, including interleaved transport over TLS or secure media technologies such as SRTP, must be assessed separately based on device support.

RTSP Connection Problems and How to Resolve Them

In IP camera systems, RTSP connection problems can stem from network configuration, authentication, codec incompatibility, or insufficient device resources.

Problem

Possible cause

Solution

Unable to establish an RTSP connection

Incorrect IP address or port

Check the network and port settings.

401 Unauthorized

Authentication problem

Check the user credentials and permissions.

403 Forbidden

Insufficient access permissions

Check the RTSP access permissions.

404 Not Found

Incorrect stream address

Verify the manufacturer's RTSP address.

453 Not Enough Bandwidth

Insufficient server resources or bandwidth

Review the stream load and number of connections.

454 Session Not Found

Session is invalid or has been terminated

Re-establish the connection.

461 Unsupported Transport

Unsupported transport method

Change the TCP or UDP setting.

Connected, but no video

Codec incompatibility

Check support for H.264/H.265.

Video freezes

Packet loss or network congestion

Analyze network performance.

Video is delayed

Buffering or encoding latency

Review the camera and client settings.

Main stream works, but substream does not

Substream is disabled or incorrectly configured

Check the Sub Stream settings.

Connection drops after a certain period

Session timeout

Review the keep-alive and network timeout settings.

Why Is the NVR Recording but RTSP Live Video Not Opening?

In projects where IP cameras from different brands are integrated into the same NVR, recording may work even though live video is not displayed.

Possible causes include differences in main- and substream configurations, H.265 codec incompatibility, unsupported video profiles, Smart Codec features, exceeding the NVR's live-view decoding capacity, and selecting an incorrect ONVIF media profile.

For troubleshooting, first test the main-stream and substream addresses separately using VLC or FFprobe.

Then check the resolution, FPS, codec, bitrate, and simultaneous decoding capacity supported by the NVR.

Recording capacity and live-view decoding capacity are not the same technical specification.

Where Is RTSP Used?

The RTSP protocol is used in many professional imaging applications, particularly electronic security systems.

Application area

Role of RTSP

IP camera systems

Live video access

NVR systems

Receiving camera media streams

VMS software

Centralized video management

AI video analytics

Transferring images to analytics software

People-counting systems

Providing video for suitable camera-based analytics

License plate recognition systems

Processing vehicle images

Thermal camera systems

Accessing thermal video streams

Industrial imaging

Monitoring production processes

Smart city systems

Centralized camera integration

Traffic monitoring

Transmitting road and intersection video

Distance education

Receiving live camera video

Healthcare technologies

Media source in secure imaging infrastructures

Robotic systems

Remote video transmission

Retail analytics

Transferring store video to analytics platforms

How Does RTSP-Powered AI Video Analytics Work?

AI-powered video analytics platforms can analyze video frames by connecting to RTSP video streams from supported IP cameras.

This approach makes it possible to develop various analytics applications using existing camera infrastructure.

For example, applications can include human detection, vehicle detection, people counting, area-density analysis, queue analysis, heat maps, object tracking, perimeter security, and monitoring production processes.

However, an IP camera's RTSP support does not mean it is suitable for every video analytics application.

Camera mounting angle, lens characteristics, pixel density, image resolution, FPS, lighting, and image compression settings can directly affect analytics performance.

Differences Between RTSP 1.0 and RTSP 2.0

Feature

RTSP 1

RTSP 2

Standard

RFC 2326

RFC 7826

Publication year

1998

2016

Session management

First-generation structure

Updated structure

Protocol behavior

Some implementation differences

More detailed definitions

Backward compatibility

—

Not directly compatible

Use in the CCTV industry

Common

Depends on device and software support

Although RTSP 2.0 is a more recent standard, RTSP 1.0 continues to be used in many IP cameras and CCTV software.

Professional RTSP Project Design Checklist

The following technical criteria should be checked when integrating an IP camera, NVR, or VMS:

  • RTSP protocol version

  • RTSP service port

  • Main- and substream addresses

  • User access permissions

  • TCP and UDP transport support

  • H.264 and H.265 codec compatibility

  • Resolution and FPS values

  • CBR and VBR bitrate configuration

  • GOP and keyframe interval

  • Simultaneous RTSP connection capacity

  • NVR and VMS decoding capacity

  • Network bandwidth

  • Packet loss and jitter values

  • VLAN and QoS configuration

  • Multicast support

  • Session timeout settings

  • TLS and secure media transmission support

  • ONVIF profile compatibility

  • On-site connection tests and validation

Frequently Asked Questions

What does RTSP stand for?

RTSP is an abbreviation for Real Time Streaming Protocol. In Turkish, it is called Gerçek Zamanlı Akış Protokolü (Real-Time Streaming Protocol).

What is the RTSP port?

The standard RTSP port is 554. Different ports can be configured on supported devices.

Does RTSP work without the internet?

Yes. If the camera and client are on the same local network, RTSP video can be transmitted without an internet connection.

Does RTSP record video?

RTSP is not recording software in itself. Applications such as NVR, VMS, or FFmpeg can record media streams received over RTSP.

Does RTSP support audio transmission?

Yes. Audio streams supported by the camera and client can be transmitted as part of an RTSP session.

Can 4K video be viewed over RTSP?

Yes. The camera, client, and network infrastructure must support the required resolution, codec, and bandwidth.

Are RTSP and ONVIF the same thing?

No. RTSP enables control of media streams, while ONVIF provides broader interoperability between IP security devices.

Can an RTSP connection be opened in a web browser?

Modern web browsers generally do not play RTSP addresses directly. The RTSP stream may need to be converted to WebRTC, HLS, or another browser-compatible media transmission method.

How many devices can view an RTSP stream simultaneously?

This number depends on the camera's hardware capacity, firmware capabilities, bitrate, and simultaneous connection limits.

Does RTSP reduce image quality?

RTSP does not directly determine image quality. Image quality depends on camera resolution, codec, bitrate, compression parameters, and media transmission conditions.

Does RTSP provide two-way audio support?

A standard RTSP camera stream usually transmits media from the camera to the client. Two-way audio may require the device to support ONVIF Audio Backchannel, proprietary protocols, or other suitable communication methods.

Can cameras from different brands be connected to the same NVR using RTSP?

Video from cameras of different brands can be received if the NVR supports manual RTSP connections and the media formats used by the cameras. However, features such as PTZ, motion detection, and smart analytics events may be limited.

Conclusion

RTSP is one of the fundamental network protocols that enables control of live audio and video streams in IP camera systems.

NVR devices play an important role in enabling media integration among video management software, AI-powered video analytics platforms, and centralized security systems.

Professional CCTV projects require correctly configured RTSP addresses, codec compatibility, selection of an appropriate transport method, calculation of network capacity, and establishment of a secure access infrastructure.

RTSP support is an important feature that enables an IP camera to provide video to different systems. However, successful integration requires evaluating not only protocol support but also media formats, network performance, and device technical compatibility.

Technical Resources and Standards

More on the topics covered in this piece

Cookie preferences

Essential storage supports site features and remembers your choice. Consent-based Google analytics depends on your choice and separate activation. Advanced Mode is off by default; if separately enabled, it may send cookieless signals under denied consent. If activated, Umami measures pageviews independently of cookie choices. Read the Cookie Policy

Google analytics and marketing measurement are currently disabled.

Essential — always active

Session security and remembering your cookie preference.

Usage measurement for pages, searches and sponsor interactions; Google Analytics / Google Tag Manager when configured.

Use of advertising-related cookies. Contextual sponsor placements may still appear without this permission.

Preference for sharing user data with Google advertising services. No such transfer occurs unless separately enabled.

Preference for Google ad personalization, independent of analytics permission.

You can change or withdraw your choices using Cookie preferences in the footer.