keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.59k stars 223 forks source link

support i am not smart enough #356

Closed MHagreis closed 2 months ago

MHagreis commented 4 months ago

Camera

hikvision DS-2CD2042WD-I / noname gives no information

Firmware version of the camera

firmware V5.5.5 build 180111 / encoding V7.3 build 180111

Description

camera is build up ok but due to the camera feed braking on 2 camera's one hikvision one noname but behavure is the same picture shows up and restart at once no data in unifi udm

How to reproduce

2024-02-08T10:43:33.056589065Z 2024-02-08 10:43:33 d25e7c1a3c8f RTSPCam[1] WARNING Previous ffmpeg process for video1 died. 2024-02-08T10:43:33.056844791Z 2024-02-08 10:43:33 d25e7c1a3c8f RTSPCam[1] INFO Spawning ffmpeg for video1 (Unifi key): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://User_name:Pass_word@192.168.2.187:554/channel=0_stream=0.sdp?real_stream" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=Stream_key -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc Controler_IP 7550 2024-02-08T10:43:35.198056572Z Traceback (most recent call last): 2024-02-08T10:43:35.198130267Z File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main 2024-02-08T10:43:35.198139346Z return _run_code(code, main_globals, None, 2024-02-08T10:43:35.198144668Z File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code 2024-02-08T10:43:35.198149796Z exec(code, run_globals) 2024-02-08T10:43:35.198154778Z File "/app/unifi/clock_sync.py", line 167, in 2024-02-08T10:43:35.198160147Z main() 2024-02-08T10:43:35.198164792Z File "/app/unifi/clock_sync.py", line 157, in main 2024-02-08T10:43:35.198169647Z write(read_bytes(source, payload_size)) 2024-02-08T10:43:35.198174331Z File "/app/unifi/clock_sync.py", line 87, in write 2024-02-08T10:43:35.198179199Z sys.stdout.buffer.write(data) 2024-02-08T10:43:35.198183909Z BrokenPipeError: [Errno 32] Broken pipe 2024-02-08T10:43:35.198333166Z Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> 2024-02-08T10:43:35.198352840Z BrokenPipeError: [Errno 32] Broken pipe 2024-02-08T10:43:35.201232635Z av_interleaved_write_frame(): Broken pipe 2024-02-08T10:43:35.201519165Z Last message repeated 1 times 2024-02-08T10:43:35.201616035Z Error writing trailer of pipe:: Broken pipe 2024-02-08T10:43:40.472142002Z 2024-02-08 10:43:40 d25e7c1a3c8f RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2024-02-08T10:43:40.524859190Z ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers 2024-02-08T10:43:40.524961669Z built with gcc 8.3.0 (Alpine 8.3.0) 2024-02-08T10:43:40.525057855Z configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping --disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --disable-debug 2024-02-08T10:43:40.525252608Z libavutil 56. 22.100 / 56. 22.100 2024-02-08T10:43:40.525331296Z libavcodec 58. 35.100 / 58. 35.100 2024-02-08T10:43:40.525407839Z libavformat 58. 20.100 / 58. 20.100 2024-02-08T10:43:40.525483818Z libavdevice 58. 5.100 / 58. 5.100 2024-02-08T10:43:40.525539881Z libavfilter 7. 40.101 / 7. 40.101 2024-02-08T10:43:40.525672580Z libavresample 4. 0. 0 / 4. 0. 0 2024-02-08T10:43:40.525764081Z libswscale 5. 3.100 / 5. 3.100 2024-02-08T10:43:40.525840864Z libswresample 3. 3.100 / 3. 3.100 2024-02-08T10:43:40.525918342Z libpostproc 55. 3.100 / 55. 3.100 2024-02-08T10:43:40.620814524Z 2024-02-08 10:43:40 d25e7c1a3c8f RTSPCam[1] WARNING Previous ffmpeg process for video2 died.

Expected behaviour

camera feed will continue

Screenshots

No response

Additional information

https://github.com/keshavdv/unifi-cam-proxy

get token form unifi dream machine

https://192.168.2.1/proxy/protect/api/cameras/manage-payload

rtsp://"username":"password"@CAMERA_IP:RTSP_PORT

version: "3.5" services:

noname camera

proxy-1: container_name: Cam-Proxy-1 restart: unless-stopped image: keshavdv/unifi-cam-proxy volumes:

---Network Def---

networks: frontend: external: true

xrh0905 commented 4 months ago

Try keshavdv/unifi-cam-proxy:dev as image

MHagreis commented 4 months ago

will try and keep you posted

MHagreis commented 4 months ago

Looks now indeed stable will keep on dev. thank you for your support 👍

Berlusconi13 commented 4 months ago

Try keshavdv/unifi-cam-proxy:dev as image

Do you know where I can check the dev image? On github there‘s no dev branch, just the main

stale[bot] commented 3 months 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.