seydx / homebridge-camera-ui

Homebridge plugin for RTSP Cameras with HSV, motion detection support, Image Rekognition, Web UI to manage/watch streams and WebApp support
MIT License
638 stars 92 forks source link

Ffmpeg: Can not determine stream codecs, probe timed out #621

Closed Galaxy4151 closed 1 year ago

Galaxy4151 commented 2 years ago

Issue When I start camera.ui and try to stream my RTSP stream I get the error: "Can not determine stream codecs, probe timed out"

Logs [7/30/2022, 4:42:23 PM] [CameraUI] Initializing camera.ui with PID: 17388 [7/30/2022, 4:42:23 PM] [CameraUI] Configuring server... [7/30/2022, 4:42:23 PM] [CameraUI] Camera: Configuring unbridged accessory... [7/30/2022, 4:42:23 PM] [CameraUI] Camera: Setting up accessory... [7/30/2022, 4:42:23 PM] [CameraUI] Accessories refreshed and config.json saved! [7/30/2022, 4:42:23 PM] Camera 118D is running on port 61806. [7/30/2022, 4:42:23 PM] Please add [Camera 118D] manually in Home app. Setup Code: 873-29-932 [7/30/2022, 4:42:26 PM] [CameraUI] Configuring socket... [7/30/2022, 4:42:26 PM] [CameraUI] Configuring database... [7/30/2022, 4:42:26 PM] [CameraUI] Configuring event controller... [7/30/2022, 4:42:27 PM] [CameraUI] Configuring motion controller... [7/30/2022, 4:42:27 PM] [CameraUI] Configuring camera controller... [7/30/2022, 4:42:27 PM] [CameraUI] Camera: Setting up camera, please be patient... [7/30/2022, 4:42:27 PM] [CameraUI] Camera: Probe stream: C:\Program Files\ffmpeg\bin\ffmpeg.exe -analyzeduration 0 -probesize 5000 -i rtsp://localhost:556/live [7/30/2022, 4:42:37 PM] [CameraUI] WARNING Camera: Can not determine stream codecs, probe timed out [7/30/2022, 4:42:37 PM] [CameraUI] Camera: {"ffmpegVersion":"5.1-full_build-www.gyan.dev","probe":true,"timedout":true,"audio":[],"video":[],"bitrate":"? kb/s","mapvideo":"","mapaudio":""} [7/30/2022, 4:42:37 PM] [CameraUI] Starting interface... [7/30/2022, 4:42:37 PM] [CameraUI] camera.ui v5.0.27 is listening on port 8085 (HTTP) [7/30/2022, 4:42:51 PM] [Homebridge UI] [homebridge-camera-ui] Incoming Request: /interfaceConfig [7/30/2022, 4:45:37 PM] [Homebridge UI] [homebridge-camera-ui] Terminating child process... [7/30/2022, 4:45:37 PM] [Homebridge UI] [homebridge-camera-ui] Child process ended [7/30/2022, 4:45:39 PM] [Homebridge UI] [homebridge-camera-ui] Incoming Request: /interfaceConfig [7/30/2022, 4:45:40 PM] [Homebridge UI] [homebridge-camera-ui] Incoming Request: /cameras [7/30/2022, 4:45:40 PM] [Homebridge UI] [homebridge-camera-ui] Arjun's Room Camera: Probe stream: C:\Program Files\ffmpeg\bin\ffmpeg.exe -analyzeduration 0 -probesize 5000 -i rtsp://localhost:556/live [7/30/2022, 4:45:50 PM] [Homebridge UI] [homebridge-camera-ui] Arjun's Room Camera: Can not determine stream codecs, probe timed out [7/30/2022, 4:45:50 PM] [Homebridge UI] [homebridge-camera-ui] Arjun's Room Camera: {"ffmpegVersion":"5.1-full_build-www.gyan.dev","probe":true,"timedout":true,"audio":[],"video":[],"bitrate":"? kb/s","mapvideo":"","mapaudio":""} [7/30/2022, 4:45:54 PM] [Homebridge UI] [homebridge-camera-ui] Incoming Request: /startStream [7/30/2022, 4:45:54 PM] [Homebridge UI] [homebridge-camera-ui] Arjun's Room Camera: Stream command: C:\Program Files\ffmpeg\bin\ffmpeg.exe -hide_banner -loglevel error -i rtsp://localhost:556/live -f mpegts -vcodec mpeg1video -s 1280x720 -b:v 299k -r 60 -bf 0 -preset:v ultrafast -threads 1 -an -q 1 -max_muxing_queue_size 9999 - [7/30/2022, 4:46:15 PM] [Homebridge UI] [homebridge-camera-ui] Terminating child process... [7/30/2022, 4:46:15 PM] [Homebridge UI] [homebridge-camera-ui] Child process ended

Environment

Galaxy4151 commented 2 years ago

Config "name": "CameraUI", "port": 8085, "atHomeSwitch": false, "logLevel": "debug", "mqtt": { "active": false, "tls": false, "port": 1883 }, "http": { "active": false, "port": 7272, "localhttp": false }, "smtp": { "active": false, "port": 2727, "space_replace": "+" }, "ftp": { "active": false, "useFile": false, "port": 5050 }, "ssl": { "active": false }, "options": { "videoProcessor": "C:\Program Files\ffmpeg\bin\ffmpeg.exe" }, "cameras": [ { "name": "Camera", "privacySwitch": false, "motion": false, "motionTimeout": 15, "unbridge": true, "hsv": false, "prebuffering": true, "prebufferLength": 4, "hksvConfig": { "source": "-i rtsp://localhost:556/live", "maxFPS": 60, "audio": false }, "videoConfig": { "source": "-i rtsp://localhost:556/live", "subSource": "-i rtsp://localhost:556/live", "stillImageSource": "-i rtsp://localhost:556/live", "maxFPS": 60, "vcodec": "copy", "acodec": "libfdk_aac", "audio": false, "debug": true }, "smtp": { "email": "Camera" }, "videoanalysis": { "active": false }, "mqtt": {} } ], "platform": "CameraUI" }

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

centurion6x commented 1 year ago

@Galaxy4151 I also encountered the same issue. did you came across a solution?

iurycarlos commented 1 year ago

me too! same issue here. Is this project still alive?

Galaxy4151 commented 1 year ago

i gave up

iurycarlos commented 1 year ago

I bought a NVR :)

mrkspflr commented 7 months ago

Hey there! might be helpful to some ppl: I think I found a solution to this topic / can confirm this works (at least for me, my nvr now does what it should since 3days or so…) I had a bunch of old Eufy Indoor Cams lying around and also ran into this issue, but it seems that it’s related to the initially preconfigured RTSP auth method (digest). … If you change the authentication method for the RTSP stream from Digest to Basic (within the Eufy mobile app…) it works. Change the auth from digest to basic, setup your Eufy cams within camera.ui or whatever NVR you use (… ideally also fully block internet access from the lan ip’s of the cameras so that no eufycloud-related-cve affects you). 🤙

:sunglasses:

ps: the rtsp url for my cam, was without the :554 port so it looks like: “source”:"-re -i rtsp://PASSWORD@192.168.LANIP/live0