keshavdv / unifi-cam-proxy

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

Unable to record #338

Closed lindonm closed 8 months ago

lindonm commented 9 months ago

Camera

Swann DVR4-4580V

Firmware version of the camera

V8.1.0-20211207

Description

I set up the proxy today, using a Portainer stack to view my 4 Swann camera system.

The live feed works mostly fine - I can see my 4 cameras (they all appear as G3 Bullets).

I can see that 17GB of my storage has been used, however on the dasbhoard there are no detections, and "Earliest Recording" is blank.

If I go to the individual camera I can see a "live' view, it's refresh time is pretty bad (like every 20 seconds) but that may be a local issue. There are 3 dots flashing in the bottom left corner.

Here is the status of one of the cameras:

If I go to the playback tab, it initially shows the live view, the video quality is quite poor and there is a blue bar flashing across the bottom of the video. If I try to go back in time (even just 15 seconds) I get an error "Unable to load requested video" with a button to try again. if I go back to live view, it starts working again.

All cameras as set to record "always".

I set this up as an experiment, the proxy is not running on my local network so there is quite a bit of latency as the camera data is being pushed out to a VPN client (where I had Portainer already set up, hence I just chucked it on there to see what would happen) and then pushed back to the Unify Dream SE on my local network - Could this be the cause?

How to reproduce

No response

Expected behaviour

No response

Screenshots

2023-10-01 00_04_06-Playback _ UDM SE 2023-10-01 00_03_32-Playback _ UDM SE

Additional information

No response

lindonm commented 9 months ago

Additional information, I can see the following in the container logs:


2023-10-03 03:46:23 6160d05909c2 RTSPCam[1] WARNING Previous ffmpeg process for video1 died.
2023-10-03 03:46:23 6160d05909c2 RTSPCam[1] INFO Spawning ffmpeg for video1 (xA8iKstesf1S8mv1): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://user:password@192.168.1.181:554/ch02/1" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=xA8iKstesf1S8mv1 -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 192.168.1.1 7550
2023-10-03 03:46:27 6160d05909c2 RTSPCam[1] INFO Processing [NetworkStatus] message
2023-10-03 03:46:27 6160d05909c2 RTSPCam[1] INFO Processing [GetSystemStats] message
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/app/unifi/clock_sync.py", line 167, in <module>
    main()
  File "/app/unifi/clock_sync.py", line 161, in main
    write(read_bytes(source, payload_size))
  File "/app/unifi/clock_sync.py", line 87, in write
    sys.stdout.buffer.write(data)
BrokenPipeError: [Errno 32] Broken pipe
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
2023-10-03 03:46:31 6160d05909c2 RTSPCam[1] INFO Processing [GetRequest] message
2023-10-03 03:46:37 6160d05909c2 RTSPCam[1] INFO Processing [NetworkStatus] message
2023-10-03 03:46:37 6160d05909c2 RTSPCam[1] INFO Processing [GetSystemStats] message
2023-10-03 03:46:42 6160d05909c2 RTSPCam[1] INFO Processing [ChangeVideoSettings] message
ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8.3.0 (Alpine 8.3.0)
  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-asm --disable-debug
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
2023-10-03 03:46:43 6160d05909c2 RTSPCam[1] WARNING Previous ffmpeg process for video2 died.

2023-10-03 03:46:43 6160d05909c2 RTSPCam[1] INFO Spawning ffmpeg for video2....
(repeats)
stale[bot] commented 8 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.

EduardoSantanaSeverino commented 1 month ago

I have the same problem, I can see that 17GB of my storage has been used, however on the dashboard there are no detections, and "Earliest Recording" is blank. and 192.168.1.10 is the IP.