roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.76k stars 179 forks source link

RTSP Not working with Yoosee Camera #695

Closed noblerboy2004 closed 10 months ago

noblerboy2004 commented 11 months ago

Hello team,

I use latest viseron on centos 9. I tried to add RTSP URL but not working. URL: rtsp://admin:123456789abc@14.233.86.163:554/onvif1

This url working well with VLC. When trying with Viseron, the web show error: FFprobe could not connect to stream. Output: {'error': {'code': -1482175992, 'string': 'Server returned 5XX Server Error reply'}}

Please help to resolve.

Thank you.

roflcoopter commented 11 months ago

Could you paste your config here? I suspect you might need to tweak your settings a bit

noblerboy2004 commented 11 months ago

Could you paste your config here? I suspect you might need to tweak your settings a bit

Hi Sir,

Thank you for your quick response. The config:

Thanks for trying out Viseron!

This is a small walkthrough of the configuration to get you started.

There are far more components and options available than what is listed here.

See the documentation for the full list of configuration options.

Start by adding some cameras

ffmpeg: camera: viseron_camera: # This value has to be unique across all cameras name: 44NTH host: 14.233.86.163 path: /onvif1 port: 554 protocol: rtsp rtsp_transport: tcp username: !secret cam3_username password: !secret cam3_password width: 1280 height: 720 fps: 5 codec: h264 audio_codec: null stream_format: rtsp ffprobe_loglevel: debug

online_camera:  # This value has to be unique across all cameras
  name: Camera 1
  host: 88.53.197.250
  path: /axis-cgi/mjpg/video.cgi
  port: 80
  stream_format: mjpeg
  fps: 30
  recorder:
    idle_timeout: 1
    codec: h264

mog2: motion_detector: cameras: viseron_camera: fps: 30 online_camera: fps: 30

darknet: object_detector: cameras: viseron_camera: fps: 30 scan_on_motion_only: true labels:

To tie everything together we need to configure one more component.

nvr: viseron_camera: online_camera:

Now you can restart Viseron and you should be good to go!

online_camera is working well. viseron_camera has problem with rtsp with error below: [2023-12-25 08:43:20] [ERROR ] [viseron.components.ffmpeg.stream.viseron_camera] - [rtsp @ 0x55a4d308f900] Nonmatching transport in server reply [2023-12-25 08:43:20] [ERROR ] [viseron.components.ffmpeg.camera.viseron_camera] - Frame reader process has exited [2023-12-25 08:43:20] [ERROR ] [viseron.components.ffmpeg.stream.viseron_camera] - rtsp://:@14.233.86.163:554/onvif1: Invalid data found when processing input

Thank you.

noblerboy2004 commented 11 months ago

Hi Sir,

I tried to debug error with command: "ffmpeg -hide_banner -loglevel debug -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -timeout 5000000 -c:v h264 -rtsp_transport tcp -i rtsp://admin:123456789abc@14.233.86.163:554/onvif1 -f segment -segment_time 5 -reset_timestamps 1 -strftime 1 -c:v copy /segments/viseron_camera/xx.mp4 -f rawvideo -pix_fmt yuv420p pipe:1 "

Response below.

image

Please help to check. Thank you.

bsyomov commented 10 months ago

Response below.

It may be camera rtsp bug. Try to use udp transport: rtsp_transport: udp in camera settings.

roflcoopter commented 10 months ago

Seems to be an issue with your cameras implementation of RTSP: https://stackoverflow.com/questions/66280861/ffmpeg-nonmatching-transport-in-server-reply-but-openrtsp-works

Nothing that can be done on Viserons side sadly :(

LeptOn30 commented 5 months ago

Hi guys my problem appears to be similar (same product) but on viseron logs I can see something odd, like: [viseron.components.ffmpeg.stream.camera_1] - rtsp://:@gmail.com:@192.168.254.119:554/Streaming/Channels/101/: Server returned 400 Bad Request. where it shows : it should be my username which are farely configured: username: !secret camera_one_username password: !secret camera_one_password The proof is that my password appears on the log, unprotected I must say (really a security issue for you guys to solve)... Any toughts? Thanks in advance fo ryour attention and support