felipecrs / hass-expose-camera-stream-source

Allows to import Home Assistant cameras into go2rtc and Frigate
MIT License
91 stars 3 forks source link

Stream unavailable #38

Closed lilp69 closed 1 month ago

lilp69 commented 1 month ago

Hi. I have not access to the stream for my camera Woox R4252. I succed to integrate it in Tuya Integration (I've stream access with this entity camera.r4252_smart_outdoor_camera). I've installed Frigate Integration (5.3.0/0.13.2-6476f8a by Frigate), I access to camera sensors like cat count, person count, but stream is unavailable (entity camera.r4252_smart_outdoor_camera_2). I've installed Frigate in HACS (v5.3.0) and install hass-expose-camera-stream-source. Restart my HA. Here my conf : `Connection à MQTT mqtt: host: 192.168.1.35 port: 1883 client_id: XxX topic_prefix: XxX user: XxX password: XxX

Choix des caméras go2rtc: streams: r4252_smart_outdoor_camera:

Objets à suivre objects: Optional: list of objects to track from labelmap.txt (default: shown below) track:

motion: Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below) Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive. The value should be between 1 and 255. threshold: 60

Optional ui: Optional: Set the default live mode for cameras in the UI (default: shown below) live_mode: mse Optional: Set a timezone to use in the UI (default: use browser local time) timezone: Europe/Paris Optional: Use an experimental recordings / camera view UI (default: shown below) use_experimental: False Optional: Set the time format used. Options are browser, 12hour, or 24hour (default: shown below) time_format: browser Optional: Set the date style for a specified length. Options are: full, long, medium, short Examples: short: 2/11/23 medium: Feb 11, 2023 full: Saturday, February 11, 2023 (default: shown below). date_style: short Optional: Set the time style for a specified length. Options are: full, long, medium, short Examples: short: 8:14 PM medium: 8:15:22 PM full: 8:15:22 PM Mountain Standard Time (default: shown below). time_style: medium Optional: Ability to manually override the date / time styling to use strftime format https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html possible values are shown above (default: not set) strftime_fmt: "%Y/%m/%d %H:%M"

Detecteur Google Coral detectors: coral: type: edgetpu device: usb deepstack: api_url: http://192.168.1.136:32168/v1/vision/detection type: deepstack api_timeout: 0.1 seconds

snapshots: enabled: true and configuration file Frigate expose_camera_stream_source:`

But I've this error : 2024-07-29 14:01:14.796108761 [2024-07-29 16:01:14] frigate.video ERROR : r4252_smart_outdoor_camera: Unable to read frames from ffmpeg process. 2024-07-29 14:01:14.796668997 [2024-07-29 16:01:14] frigate.video ERROR : r4252_smart_outdoor_camera: ffmpeg process is not running. exiting capture thread... 2024-07-29 14:01:24.799854180 [2024-07-29 16:01:24] watchdog.r4252_smart_outdoor_camera ERROR : Ffmpeg process crashed unexpectedly for r4252_smart_outdoor_camera. 2024-07-29 14:01:24.799857600 [2024-07-29 16:01:24] watchdog.r4252_smart_outdoor_camera ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2024-07-29 14:01:24.799859275 [2024-07-29 16:01:24] ffmpeg.r4252_smart_outdoor_camera.detect ERROR : [tcp @ 0x55dc430de200] Connection to tcp://127.0.0.1:8554?timeout=5000000 failed: Connection refused 2024-07-29 14:01:24.799860819 [2024-07-29 16:01:24] ffmpeg.r4252_smart_outdoor_camera.detect ERROR : rtsp://127.0.0.1:8554/r4252_smart_outdoor_camera?video: Connection refused 2024-07-29 14:01:24.814281260 [2024-07-29 16:01:24] frigate.video ERROR : r4252_smart_outdoor_camera: Unable to read frames from ffmpeg process. 2024-07-29 14:01:24.815048799 [2024-07-29 16:01:24] frigate.video ERROR : r4252_smart_outdoor_camera: ffmpeg process is not running. exiting capture thread... 2024-07-29 14:01:34.807475067 [2024-07-29 16:01:34] watchdog.r4252_smart_outdoor_camera ERROR : Ffmpeg process crashed unexpectedly for r4252_smart_outdoor_camera. 2024-07-29 14:01:34.807478707 [2024-07-29 16:01:34] watchdog.r4252_smart_outdoor_camera ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2024-07-29 14:01:34.807480486 [2024-07-29 16:01:34] ffmpeg.r4252_smart_outdoor_camera.detect ERROR : [tcp @ 0x55dd39e54200] Connection to tcp://127.0.0.1:8554?timeout=5000000 failed: Connection refused 2024-07-29 14:01:34.807482073 [2024-07-29 16:01:34] ffmpeg.r4252_smart_outdoor_camera.detect ERROR : rtsp://127.0.0.1:8554/r4252_smart_outdoor_camera?video: Connection refused 2024-07-29 14:01:34.822117123 [2024-07-29 16:01:34] frigate.video ERROR : r4252_smart_outdoor_camera: Unable to read frames from ffmpeg process. 2024-07-29 14:01:34.822605962 [2024-07-29 16:01:34] frigate.video ERROR : r4252_smart_outdoor_camera: Unable to read frames from ffmpeg process. 2024-07-29 14:01:34.822861583 [2024-07-29 16:01:34] frigate.video ERROR : r4252_smart_outdoor_camera: ffmpeg process is not running. exiting capture thread... 2024-07-29 14:01:44.818402787 [2024-07-29 16:01:44] watchdog.r4252_smart_outdoor_camera ERROR : Ffmpeg process crashed unexpectedly for r4252_smart_outdoor_camera. 2024-07-29 14:01:44.820543030 [2024-07-29 16:01:44] watchdog.r4252_smart_outdoor_camera ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2024-07-29 14:01:44.820546229 [2024-07-29 16:01:44] ffmpeg.r4252_smart_outdoor_camera.detect ERROR : [tcp @ 0x55db1ed33200] Connection to tcp://127.0.0.1:8554?timeout=5000000 failed: Connection refused 2024-07-29 14:01:44.820547849 [2024-07-29 16:01:44] ffmpeg.r4252_smart_outdoor_camera.detect ERROR : rtsp://127.0.0.1:8554/r4252_smart_outdoor_camera?video: Connection refused 2024-07-29 14:01:44.830577878 [2024-07-29 16:01:44] frigate.video ERROR : r4252_smart_outdoor_camera: Unable to read frames from ffmpeg process. 2024-07-29 14:01:44.830581132 [2024-07-29 16:01:44] frigate.video ERROR : r4252_smart_outdoor_camera: ffmpeg process is not running. exiting capture thread...

felipecrs commented 1 month ago

Run the get_stream_source.sh in terminal, then try to play the output in VLC. Check if it works.

lilp69 commented 1 month ago

How to ? Don't find the .sh file

lilp69 commented 1 month ago

Big mistake on my part. I had downgraded Go2RTC manually. And when migrating from the Rpi to the VM, I hadn't updated the Go2RTC package to the correct version.

felipecrs commented 1 month ago

That's cool, I'm happy it worked for you.

And this was the script I was referring to:

https://github.com/felipecrs/hass-expose-camera-stream-source/blob/master/custom_components/expose_camera_stream_source/get_stream.sh

You can run it manually with:

bash /config/custom_components/expose_camera_stream_source/get_stream.sh camera.my_camera

On Terminal or VS Code add-on.