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.49k stars 154 forks source link

[rtsp @ 0x58d0a683b440] method SETUP failed: 500 Internal Server Error #762

Open LeptOn30 opened 1 month ago

LeptOn30 commented 1 month ago

Hi I'm getting an error trying to connect with my cameras and hope you can help me. Error is:

" [2024-05-29 19:58:58] [DEBUG ] [viseron.components.ffmpeg.stream.camera_2] - Getting stream information for rtsp://:@192.168.254.121:554/onvif1 [2024-05-29 19:58:58] [DEBUG ] [viseron.components.ffmpeg.stream.camera_2] - FFprobe command: ffprobe -hide_banner -loglevel error -print_format json -show_error -show_entries stream=codec_type,codec_name,width,height,avg_frame_rate rtsp://:@192.168.254.121:554/onvif1 [2024-05-29 19:58:58] [ERROR ] [viseron.components.ffmpeg.stream.camera_1] - [rtsp @ 0x60f28653c440] method SETUP failed: 500 Internal Server Error [2024-05-29 19:58:58] [ERROR ] [viseron.components.ffmpeg.stream.camera_1] - rtsp://:@192.168.254.119:554/onvif1: Server returned 5XX Server Error reply [2024-05-29 19:58:58] [ERROR ] [viseron.components] - Domain camera for component ffmpeg is not ready. Retrying in 20 seconds. Error: FFprobe could not connect to stream. Output: {'error': {'code': -1482175992, 'string': 'Server returned 5XX Server Error reply'}} [2024-05-29 19:58:58] [DEBUG ] [viseron.components.webserver.api.handlers] - Routing to CamerasAPIHandler.get_failed_cameras(*args=[], kwargs={}, request_arguments={}) [2024-05-29 19:58:58] [ERROR ] [viseron.components.ffmpeg.stream.camera_2] - [rtsp @ 0x640f488be440] method SETUP failed: 500 Internal Server Error [2024-05-29 19:58:58] [ERROR ] [viseron.components.ffmpeg.stream.camera_2] - rtsp://**:@192.168.254.121:554/onvif1: Server returned 5XX Server Error reply [2024-05-29 19:58:58] [ERROR ] [viseron.components] - Domain camera for component ffmpeg is not ready. Retrying in 20 seconds. Error: FFprobe could not connect to stream. Output: {'error': {'code': -1482175992, 'string': 'Server returned 5XX Server Error reply'}} "

Config file is:

" ffmpeg: camera: camera_1: # This value has to be unique across all cameras name: Varanda - Garagem host: !secret camera_one_host port: 554 path: /onvif1 rtsp_transport: udp username: !secret camera_one_username password: !secret camera_one_password

camera_2:  # This value has to be unique across all cameras
  name: Varanda - Cozinha
  host: !secret camera_two_host
  port: 554
  path: /onvif1
  rtsp_transport: udp
  username: !secret camera_two_username
  password: !secret camera_two_password

logger: default_level: debug

Then add an object detector

darknet: object_detector: cameras: camera_1: # Attach detector to the configured camera_1 above fps: 1 scan_on_motion_only: false # Scan for objects even when there is no motion labels:

You can also use motion detection

mog2: motion_detector: cameras: camera_1: # Attach detector to the configured camera_2 above fps: 1 camera_2: # Attach detector to the configured camera_2 above fps: 1

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

nvr: camera_1: # Run NVR for camera_1 camera_2: # Run NVR for camera_2 "

I don´t have that problem using the command below:

ffmpeg -rtsp_transport udp -i rtsp://admin:@192.168.254.119:554/onvif1 streamfile.mkv

The command above connects and generates the file without any issue.

I would like to thank you in advance for your attention and support.

Cheers,

Guaracy

roflcoopter commented 2 weeks ago

Do you have any special characters in your password?

If so i made some changes in 3.0.0b7 which escapes these special characters

LeptOn30 commented 1 week ago

Actually no I don't I used too but had some problems with ffmpeg and had to change. ;)