kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
708 stars 88 forks source link

Issue while verifying the camera settings: invalid Content-Base #132

Closed CaptainCommuter closed 10 months ago

CaptainCommuter commented 10 months ago

In the latest version of the agent when verifying the connection, the error "Something went wrong while verifying the camera settings: invalid Content-Base" occurs. This works OK with the November docker release and is running on Raspberry Pi and a S3VC IP camera using H264

cedricve commented 10 months ago

Thanks for reporting @CaptainCommuter, we are using a new RTSP library. Which camera are you using? Can you an url ?

cedricve commented 10 months ago

can you share the RTSP url you are using? Are there other RTSP urls you can test out?

CaptainCommuter commented 10 months ago

Thanks for responding. The camera is a generic one from SV3C (www.sv3c.com) A series and the RTSP urls are: rtsp://ipcam01/stream0 for the main stream and rtsp://ipcam01/stream1 for the sub-stream. None work and unfortunately that's all there is.

cedricve commented 10 months ago

The error is thrown here: https://github.com/bluenviron/gortsplib/blob/main/client.go#L73-L88 I expect the RTSP url is not able to be parsed with our new library. Can you share the full log?

if len(cb) != 1 {
    return nil, fmt.Errorf("invalid Content-Base: '%v'", cb)
}

ret, err := base.ParseURL(cb[0])
if err != nil {
    return nil, fmt.Errorf("invalid Content-Base: '%v'", cb)
}

I'm wondering if you use any special characters in the password? The RTSP url should work with following format (regex). https://github.com/bluenviron/gortsplib/blob/main/pkg/base/url.go#L18-L45

CaptainCommuter commented 10 months ago

OK your comment about the password was along the right lines. In fact, there was no authentication (so no user or password) in the RTSP URL. Once I set that up it now works.

cedricve commented 10 months ago

Ok that's great news, but it should work without password as well (not advised though).