Information
- Manufacturer: N/A (Generic integration supporting most RTSP devices)
- Product: N/A
- Type: Video
Supported Features
- Video
- Live
- Pass-Through
- Live
Components and Communication
Component | Location | Outgoing communication | Incoming communication |
---|---|---|---|
RTSP Direct Device Plugin | Sureview Device Server | 554 TCP to Video Device | N/A |
External Configuration
- You must find the RTSP Video URL for your particular device from the manufacturer's instructions or documentation. Some known examples are provided below.
- The RTSP Video URL you find must work and play video in ffplay (command line "ffplay.exe rtsp://user:pass@host:port/some/path?param=value")
- The RTSP Video URL must be sending H.264 video in order to use the pass-through video feature. If it is sending any other type of video then it will be transcoded on the server
Sureview Configuration
Host | The address of the RTSP device | |
Port | The RTSP port on the device (default 554) | |
User | Username required to access the RTSP video on the device | |
Password | Password required to access the RTSP video on the device | |
Extra Value |
|
The extra value takes the following format:
RtspUrlEndingForYourDevice option1:value1;option2:value2;...
Where the RTSP URL Ending is the end portion of the RTSP URL for your camera after the host and port i.e. in this example RTSP URL, the ending is bolded:
rtsp://username:password@host:port/some/path?param=value
The RTSP URL Ending can also contain placeholders which will be filled in automatically:
- "{#}" will be filled in with the camera input number
- "{#:ValueForCameraInput1|ValueForCameraInput2|ValueForCameraInput3|...}" will be filled in with the value from the position depending on the camera input number
- "{~}" will be filled in with the Device Extra Value
- "{Q:ValueForLowAndLowest|ValueForMedium|ValueForHighAndHighest}" will be broken up and one of the three provided values will be used depending on the camera quality setting. For example, when set to Highest or High the "ValueForHighAndHighest" will be used. This allows you to request different stream qualities from the camera depending on the network speed at your particular location (i.e. if you are local and on a fast network you can use "Highest" quality which you've set to ask for a HD stream from the camera, and if you're remote on a slow connection you can use "Lowest" quality which you've set to ask for a low bitrate 'internet transmission'-level stream from the camera).
Example Manufacturer RTSP URL Endings
Name | RTSP URL Ending | Comment |
---|---|---|
Avigilon IP camera |
/default{Q:Secondary|Primary|Primary}?streamType=u i.e. from full URL: |
Only has one channel. Not all models support the Secondary stream |
Hikvision IP camera |
/Streaming/Channels/{#}{Q:03|02|01} i.e. from full URL: |
Number on the end is "/CSS" where C=camera number and SS=substream number i.e. 502 = 5th camera, 2nd stream Using "{Q:03|02|01}" means 03 will be used for Lowest and Low, 02 will be used for Medium, and 01 will be used for Highest and High Some models only support 1 substream (so have streams "01" and "02" but not "03"). |
Axis IP camera |
/axis-media/media.amp?videocodec=h264&audio=0&colorlevel=100&camera={#}{Q:&compression=60&resolution=320x240&fps=4|&compression=30&resolution=640x480&fps=8|&compression=0&fps=30} i.e. from full URL: |
Axis allow full customization of the data sent by the device. In the example, if the quality is:
|
Samsung IP camera |
/profile{Q:2|3|4}/media.smp i.e. from full URL: |
The "profile#" relates to the "Video Profiles" set up on the camera (usually defaults to MJPEG=1 and low quality H.264=2) |
The options that can be passed are:
- "probe_size:#" set the number of bytes that will be received in order to find information about the stream. If this is too low then you will get an error that the stream information could not be found and to try increasing the probe size. Note the higher this is the longer delay there will be in receiving video (as all this data has to be received by the integration first). If this parameter is omitted then the integration uses a default value.
- "fmt:FormatName" force the video format i.e. "mpeg4" - this is only required in rare circumstances
- "rtsp_transport:tcp" - use TCP to receive video data from the device instead of the default UDP. UDP is preferred wherever it is available as it allows very high quality video with low latency and low resource use, but sometimes the device does not support modern networking features (port triggering) so UDP is not available and the integration will fall back to using TCP after a delay. If you see a delay in connecting to the camera then try setting this to use TCP right from the start. Note when using TCP the quality of video may be lower (may see dropped frames), the latency may be higher, and the integration may use more CPU.
/Streaming/Channels/{#}{Q:03|02|01} probe_size:20000;rtsp_transport:tcp;fmt:mpeg4
Troubleshooting
Failure to connect
Have you got the correct host, port, user, password and RTSP URL ending for your device and is it online? Test it by combining all those values into a full RTSP URL i.e. rtsp://user:pass@host:port/yoururl?ending and opening it in ffplay as described above in the pre-requisites.
I cannot find the RTSP URL for my device
Contact your manufacturer to find if your device supports RTSP and what the URL is for it. There are also some online resources that list known RTSP URLs for various IP camera manufacturers.
Pausing / Jumping / Slow Video
This is caused by requesting higher bitrate video than can be transferred over the networks between you and the camera, causing you to get behind real time or causing video to have to be thrown away to stop you getting behind real time, appearing as pauses or jumps in the video.
There are a number of things you can try to resolve this:
- Request a lower bitrate (lower resolution and/or framerate and/or encode quality) from the camera until you find a level that works for your network and location (you may find that being nearby the camera allows you to request high bitrate video, but being remote means you need to ask for a lower bitrate stream).
- Most cameras allow quality profiles to be set up (such as a "High" for local users and "Low" for remote users) and you can use the "{Q:}" parameter described above to modify the RTSP URL you are asking when you change the Sureview "Quality" dropdown box.
- Switch to use UDP instead of TCP. UDP is always recommended over TCP because is it is faster and has less overhead and therefore more data can be transferred quicker.
- If you have an old router that does not support stateful UDP routing and therefore can only use TCP then the only option is request a lower bitrate stream from the camera as per #1
High CPU use / Sureview UI says my stream is not passing through
If you either see high CPU use when the worker connects to the device or the Sureview UI says the stream is being "encoded" instead of "passed through" then it means the stream is not H.264 so it cannot be passed through and instead has to be decoded and re-encoded. Check your RTSP URL is correct and that the camera is set to send H.264 when the particular stream you're asking for is requested. For example the Axis has the "&videocodec" parameter which should be set to "h264" instead of "mpeg4"
Comments
0 comments
Please sign in to leave a comment.