Decode error when connect to RTSP camera streams

kirito168

n3wb
Jun 6, 2024
3
2
US
Hi,

I encountered a problem connecting to RTSP camera streams through NVR's IP address. The device is on the same local network (192.168.0.xxx).

I use the following URL to connect to the main & sub-streams of the cameras using OpenCV:
rtsp:/USER_NAME:PASSWORD@NVR_IP:554/Streaming/Channels/101

Although it does connect to the camera, it gives me a bunch of errors with no frame generated. Occasionally it does output a frame but it is all grayed out and video artefacts.

Code:
 main  [h264 @ 0x7f4c4712a0] non-existing PPS 1 referenced
 main  [h264 @ 0x7f4c4712a0] decode_slice_header error
 main  [h264 @ 0x7f4c4712a0] no frame!
 main  [h264 @ 0x7f4c4836d0] decode_slice_header error
 main  [h264 @ 0x7f4c4836d0] no frame!
 main  [h264 @ 0x7ec8103360] non-existing PPS 1 referenced
 main  [h264 @ 0x7ec8103360] decode_slice_header error
 main  [h264 @ 0x7ec8103360] no frame!
 main  [h264 @ 0x7ec970f100] non-existing PPS 1 referenced
 main  [h264 @ 0x7ec970f100] decode_slice_header error
 main  [h264 @ 0x7ec970f100] no frame!
 main  [h264 @ 0x7f4f6e8280] non-existing PPS 1 referenced
 main  [h264 @ 0x7f4f6e8280] decode_slice_header error
 main  [h264 @ 0x7f4f6e8280] no frame!

I also tried to open the streams using VLC but it just stuck at the loading screen (does not display any error message). Tried to change video settings as well (switch h265 to h264, changing bitrate & resolution, ...etc) but no luck so far. Any help would be much appreciated, Thanks!
 
Either trying to find out why is not working when it should work out of the box, why don't just use camera direct ip address?

Or perhaps upgrade firmware on your nvr, could be its bugged on current version.
 
Found the issue, need to disable stream encryption under Network > Advanced Configuration > Platform Access.

Is it possible to enable this while using OpenCV to get the camera streams?
 
  • Like
Reactions: trempa92
Most of the frame is grayed out but it shows something when there is any motion happening.
 

Attachments

  • Screenshot 2024-06-06 at 9.15.46 AM.png
    Screenshot 2024-06-06 at 9.15.46 AM.png
    292.6 KB · Views: 5
  • Like
Reactions: trempa92