How I optimized my RTSP camera

Settings that have been found to work well in general. These settings have been tested with a number of different cameras such as Grandstream, Amcrest, Foscam, Hikvision and Reolink.

You will need to access the camera's internal settings. This can either be done through the web browser or through a third party tool like an ONVIF Device Manager. Once you have access find and change these option to the settings shown as follows.

  • Framerate (FPS) :
    • High : Between 10 to 15
    • Low : Between 2 to 5
  • H264 Profile : Baseline or Main
  • I-frame interval :
    • Set to Match your set FPS or as lowest number possible. (FPS is the first value mentioned in this list)
    • Knowing how to tune this is important for keeping low processing power and Recording based on an Event, like Motion.
  • Bit Rate Type :
    • VBR : For Good Network Conditions
    • CBR : For Bad Network Conditions, Broken images from streams
    • Some cameras do not allow changing this. Instead they may offer different Stream URLs to access VBR or CBR video streams, like Reolink.
  • Bit Rate :
    • If camera is a 2MP (Megapixel) and below : Between 256kbps and 1Mbps
    • 2MP to 5MP : Between 1Mbps and 2.5Mbps

For the Connection section I used:

  • RTSP Transport : TCP

If you are having connection issues try setting Automatic to No and RTSP Transport to UDP.

For the Input section I used:

  • When you have optimal network conditions :
    • Analyzation Duration : 0
    • Probe Size : 32
  • When you don't have optimal network conditions :
    • Analyzation Duration : 1000000
    • Probe Size : 1000000

For the Stream  section I used:

For the Record section I used:

  • Video Codec : copy
  • Audio Codec : AAC or No Audio

For  Global Detector Settings section I used:

  • Send Frames : Yes
  • Save Events to SQL : Yes (if you want to view the marks in Power Video Viewer)
  • Feed-in Image Width : 640
  • Feed-in Image Height : 480
  • How to Record : Traditional Recording
  • Trigger Record : Yes
  • Recording Timeout : 2

For Motion Detection section I used:

  • Use Built-In : yes
  • Indifference : Varies based on camera view point
  • Full Frame Detection or Regions

For Traditioanl Recording section I used in combination with  Global Detector Settings:

  • Video Codec : copy
  • Audio Codec : AAC or No Audio
  • Segment Length :  2 (creates 5 second buffer)
  • HLS List Size : 3 to 10

Be aware audio recording is illegal in some regions of the world. Please contact your local law enforcement if you are unsure.

43 Cameras with only Stream and Recording, No Detection Engines enabled. 45% CPU Utilization .

The Jetson Nano required a power adapter with more amps. A barrel jack 5V 10A adapter was used for this test.

How to Troubleshoot a Camera in Shinobi

Experiencing artifacts and smearing? Check out  "Stop smearing or broken streams with CBR streams instead of VBR" . The didn't help with smearing? Check out " Ways to resolve smearing, smudging, streaking, melting, and artifacts ".

If you don't have the camera's internal options easily accessible to you then with an ONVIF Device Manager you can edit them.

Windows ONVIF Device Manager

Recently Shinobi has made improvements to ONVIF device management, you may select ONVIF from the top left menu and scan for cameras on the network, additionally you can have Shinobi add them all at the same time.


All content is property of their respective owners.