How to format the RTSP URL for IP Camera Source

Last Updated: Jul 26, 2017 11:14PM HKT
Figuring out how to format the correct format for the RTSP for IP Camera source can be difficult. Thankfully, we have this guide to show you what each parameter means in order to help you configure your RTSP URL.

The format of the URL for RTSP source is:

 

rtsp://[username[:password]@]ip_address[:rtsp_port]/server_URL[?param1=val1[&svrparam2=val2]...[&paramN=valN]]

 

Parameters of the URL for RTSP source and optional parameters in brackets are described below. Please note that in many cases the word "server" could be freely interchanged with the word "IP camera". Every IP camera has an RTSP server built into the camera:

 

ip_address

Typically, the RTSP servers use DHCP to obtain an IP address automatically. The servers usually provide a utility for detecting the server's IP address. This can be in the usual Ipv4 format (xx.xx.xx.xx), or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer.

 

rtsp_port (Optional)

The port number on which the server is listening for RTSP commands. The port must be a number from 1 to 65535. RTSP port (554) is default

 

username (Optional) / password (Optional)

For servers that use authentication, you can pass a username and a password as part of the connection URL.

 

server_URL

Each RTSP server has its own relative server URL, so you need to consult the server's manual to obtain it.

 

paramN=valN (Optional)

Extra parameters on this context are server parameters which can be used to control compression, video size, etc. See the following examples for such parameters

 

H264/ AAC (AXIS camera example) Please note this URL will not work for testing
rtsp://root:incertpass@ipcam.yourdomain.com/axis-media/media.amp?videocodec=h264&audiocodec=aac

 

MJPEG / G711 (AXIS camera example) Please note this URL will not work for testing
rtsp://root:incertpass@ipcam.yourdomain.com/axis-media/media.amp?videocodec=jpeg&audiocodec=g711

The extra server parameters will vary between servers vendors, so consult the user manual of your server.

 

NOTE: XSplit also supports the special source parameter ( \rtsp_transport:udp) to force the connection mode of the source to udp instead of tcp which is default and recommended. see example:

rtsp://root:incertpass@ipcam.yourdomain.com/axis-media/media.amp?videocodec=h264&audiocodec=aac&\rtsp_transport:udp (please note this URL will not work for testing)

Contact Us

Thank you for visiting our support center.

You can contact us by clicking the chat icon on the lower-right corner of this page.

We are available during the hours shown below.

Support working hours:

00:00 - 09:00 & 13:00 - 24:00 UTC + 8 Monday to Friday