Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streaming not working in 1.21.3 #199

Closed
jurajs5 opened this issue Mar 8, 2022 · 230 comments
Closed

streaming not working in 1.21.3 #199

jurajs5 opened this issue Mar 8, 2022 · 230 comments
Assignees
Labels

Comments

@jurajs5
Copy link

jurajs5 commented Mar 8, 2022

no streaming in version 1.21.3

snapshots are there, but streaming is KO
in proxy site, looks like all is ok, but in unifi UDM pro - there is no video, 3dost all the time (loading)

  • tried rtsp coding - KO
  • tried hikvsion coding - KO

Camera:

  • hikvision
@eltomato89
Copy link

Same problem here! Screenshots do work, but no video stream.
Reolink RLC-410-5MP
Already tried readopting ..

2022-03-08 10:09:12 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Core[1] INFO Creating ws connection to wss://172.20.10.1:7442/camera/1.0/ws?token=Qk8IHpfFVlgWhuQmOQ09FEOgFwcnokE3
2022-03-08 10:09:12 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Adopting with token [Qk8IHpfFVlgWhuQmOQ09FEOgFwcnokE3] and mac [EC:71:DB:BA:1B:3D]
2022-03-08 10:09:12 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Connecting to motion events API: http://172.20.60.20/api.cgi?cmd=GetMdState&user=[user]&password=[password]
2022-03-08 10:09:12 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_hello] message
2022-03-08 10:09:12 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_hello] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_paramAgreement] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_paramAgreement] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [StopService] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeIspSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeIspSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeOsdSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeSoundLedSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeSmartMotionSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [EnableLogging] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeDeviceSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeDeviceSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [SmartMotionTest] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [UpdateUsernamePassword] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:09:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:09:14 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [UpdateFirmwareRequest] message
2022-03-08 10:09:14 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Reconnecting...
2022-03-08 10:09:14 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Cleaning up instance
2022-03-08 10:09:14 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Core[1] INFO Backing off connect(...) for 2.0s (True)
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Core[1] INFO Creating ws connection to wss://172.20.10.1:7442/camera/1.0/ws?token=Qk8IHpfFVlgWhuQmOQ09FEOgFwcnokE3
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Adopting with token [Qk8IHpfFVlgWhuQmOQ09FEOgFwcnokE3] and mac [EC:71:DB:BA:1B:3D]
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Connecting to motion events API: http://172.20.60.20/api.cgi?cmd=GetMdState&user=[user]&password=[password]
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_hello] message
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_hello] message
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_paramAgreement] message
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ubnt_avclient_paramAgreement] message
2022-03-08 10:09:16 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [StopService] message
2022-03-08 10:09:17 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeDeviceSettings] message
2022-03-08 10:09:17 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:09:17 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeIspSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeOsdSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeAudioEventsSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeSoundLedSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeSmartMotionSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [EnableLogging] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeDeviceSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeDeviceSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [SmartMotionTest] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [UpdateUsernamePassword] message
2022-03-08 10:09:22 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [ChangeVideoSettings] message
2022-03-08 10:09:23 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:09:23 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:09:24 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[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-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
2022-03-08 10:09:24 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Spawning ffmpeg for video1 (lzdb1tDNhFXaPSUE): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://[user]:[password]@172.20.60.20:554//h264Preview_01_main" -c:v copy -vbsf "h264_metadata=tick_rate=60000/1001" -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=lzdb1tDNhFXaPSUE -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 172.20.10.1 7550
2022-03-08 10:09:24 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[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-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
2022-03-08 10:09:24 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Spawning ffmpeg for video3 (YcMABRI5Qqhkv1ty): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://[user]:[password]@172.20.60.20:554//h264Preview_01_main" -c:v copy -vbsf "h264_metadata=tick_rate=60000/1001" -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=YcMABRI5Qqhkv1ty -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 172.20.10.1 7550
2022-03-08 10:09:33 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:09:33 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:09:39 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[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-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
2022-03-08 10:09:39 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Spawning ffmpeg for video2 (mt1I7zmnsRr9H1Sj): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://[user]:[password]@172.20.60.20:554//h264Preview_01_main" -c:v copy -vbsf "h264_metadata=tick_rate=60000/1001" -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=mt1I7zmnsRr9H1Sj -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 172.20.10.1 7550
2022-03-08 10:09:43 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:09:43 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:09:44 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:09:44 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:09:53 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:09:53 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:09:59 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:09:59 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:10:03 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:10:03 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:10:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:10:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:10:17 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:10:17 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:10:23 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:10:23 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:10:30 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:10:30 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:10:33 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:10:33 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:10:42 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:10:42 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:10:43 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:10:43 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:10:53 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:10:53 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:10:58 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:10:58 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:11:03 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:11:03 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:11:10 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:11:10 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]
2022-03-08 10:11:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:11:13 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:11:23 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [NetworkStatus] message
2022-03-08 10:11:23 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetSystemStats] message
2022-03-08 10:11:27 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Processing [GetRequest] message
2022-03-08 10:11:27 unifi-cam-proxy-haustuer-79c4b5b7c9-xnh8w Reolink[1] INFO Grabbing snapshot: http://172.20.60.20/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=6PHVjvf0UntSLbyT&user=[user]&password=[password]

@eltomato89
Copy link

Also .. I dont know if this is connected to the problem, but I found a stacktrace after restarting the unifi protect application on my udm pro:

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 157, 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
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 157, 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

@xsasx
Copy link

xsasx commented Mar 9, 2022

hopefully it will be fixed soon cause 1.21.3 is out now since 1 hour official

@keshavdv
Copy link
Owner

Finally got the update and looking for a fix. At the moment, it doesn't look like an easy one, so I'd suggest disabling auto-update and downgrading if you rely on the proxy for important cameras.

@pgeremia
Copy link

Seeing same thing on my setup. I mean right now there are NO cameras to buy from Unifi so this is our only option. :-/

@tboyce021
Copy link

tboyce021 commented Mar 11, 2022

What's the latest version of protect that should work? I tried back to 1.19.2 but kept getting the same error. Do I need to downgrade the entire unifi-os on the udm pro since I updated to 1.11.4?

@lcasale
Copy link
Contributor

lcasale commented Mar 11, 2022

1.21.2 works

@tphipps
Copy link

tphipps commented Mar 13, 2022

Identical issue here. 4 x Hikvision cameras working perfectly with Protect v1.21.2, only low-res screenshots with v1.21.3 and seeing the identical crash as @eltomato89 above. Reverting to Protect v.1.21.2 got the cameras back online.

To save time for others looking for how to revert, ssh into the UDM-Pro and:

apt-get update
apt-get install --reinstall --allow-downgrades unifi-protect=1.21.2 -y

@DebauchedSloth
Copy link

Same here with Amcrest / Dahua cams.

@frieck
Copy link

frieck commented Mar 16, 2022

Any updates?
I am having the same problem with Dahua

@tsspmq
Copy link

tsspmq commented Mar 17, 2022

A few posts up he said it wasn't going to be easy to fix, so I would stay on 1.21.2 (if you have access) as long as it takes if you need them. Nothing in .3 is really exciting enough to upgrade anyway.

@lcasale
Copy link
Contributor

lcasale commented Mar 23, 2022

FYI this is still broken in Protect 1.21.4 incase anyone was curious on upgrading.

@FrancescoFdd5
Copy link

Same Issue

@ChronoBrake
Copy link

Any chance it will be resolved or Ubiquiti killed that project :/ ?
@keshavdv

@DReffects
Copy link

Ah damn, should have looked in here first... going mad for weeks now because the cameras froze for no apperant reason. Changed switches, cables, firmware... oh my...

My Dahua cams always worked for one up to four days, then died in a way that only a loss of power could revive them. no access via webinterface was possible. switching to protect 1.21.2 now for testing.

@DReffects
Copy link

1.21.2 seems to work for the past 4 hours but only without seperate screenshot URL. I hope the cameras stay on.

@ChronoBrake
Copy link

New version 1.23.4 with changelog:
Fix an issue that prevents G3 cameras from streaming and recording until they are restarted.
https://community.ui.com/releases/UniFi-Protect-Application-1-21-4/b0c494ef-a768-4aae-8ac1-e70851de4290

Maybe it's be a bug? Somebody can check it's be resolved on new Protect version?

@FrancescoFdd5
Copy link

Maybe it's be a bug? Somebody can check it's be resolved on new Protect version?

Still not work in 1.21.4

@pgeremia
Copy link

Same here. 1.21.4 only snapshots are working. I have not had any time to debug but maybe I will see what I can find over the next few days. Has anyone looked at 1.21.3 release notes to get a clue what may have changed? I will check that too.

@benmprojects
Copy link

Identical issue here. 4 x Hikvision cameras working perfectly with Protect v1.21.2, only low-res screenshots with v1.21.3 and seeing the identical crash as @eltomato89 above. Reverting to Protect v.1.21.2 got the cameras back online.

To save time for others looking for how to revert, ssh into the UDM-Pro and:

apt-get update
apt-get install --reinstall --allow-downgrades unifi-protect=1.21.2 -y

This works perfectly. Thanks!

@FrancescoFdd5
Copy link

Any updates?

@EasternIndustries-IT
Copy link

EasternIndustries-IT commented Apr 5, 2022

So Just an update for me I updated the console to 2.3.15 (NOT THE PROTECT APP ) and my cameras stopped working :/ . I'm getting a streamname: = nlkjljoilkljkljjijj898yo invalid arguments

Proxy1_1  | [NULL @ 0x55fdda3c95c0] Unable to find a suitable output format for 'streamname=C1wrNdvUWdyPHU4G'
Proxy1_1  | streamname=C1wrNdvUWdyPHU4G: Invalid argument
Proxy1_1  | 2022-04-05 23:31:00 4e9f6e056c18 RTSPCam[1] INFO Processing [GetRequest] message
Proxy1_1  | 2022-04-05 23:31:00 4e9f6e056c18 RTSPCam[1] INFO Processing [ChangeVideoSettings] message
Proxy1_1  | ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
Proxy1_1  |   built with gcc 8.3.0 (Alpine 8.3.0)
Proxy1_1  |   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
Proxy1_1  |   libavutil      56. 22.100 / 56. 22.100
Proxy1_1  |   libavcodec     58. 35.100 / 58. 35.100
Proxy1_1  |   libavformat    58. 20.100 / 58. 20.100
Proxy1_1  |   libavdevice    58.  5.100 / 58.  5.100
Proxy1_1  |   libavfilter     7. 40.101 /  7. 40.101
Proxy1_1  |   libavresample   4.  0.  0 /  4.  0.  0
Proxy1_1  |   libswscale      5.  3.100 /  5.  3.100
Proxy1_1  |   libswresample   3.  3.100 /  3.  3.100
Proxy1_1  |   libpostproc    55.  3.100 / 55.  3.100
Proxy1_1  | 2022-04-05 23:31:01 4e9f6e056c18 RTSPCam[1] WARNING Previous ffmpeg process for video2 died.
Proxy1_1  | 2022-04-05 23:31:01 4e9f6e056c18 RTSPCam[1] INFO Spawning ffmpeg for video2 (C1wrNdvUWdyPHU4G): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://admin:eXXX@192.168.30.XXX:554/cam/realmonitor?channel=1&subtype=0" -f lavfi -i anullsrc -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k> -metadata streamname=C1wrNdvUWdyPHU4G-f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 192.168.30.10 7550

Config
unifi-cam-proxy --host 192.168.30.10 -i 192.168.30.43 --mac 'F4:FA:4C:39:E4:49' -c /client.pem -t KsnCXmmwlTY3iqAtA73j6FVFzt6DeGeq dahua -u admin -p eAstern23 --ffmpeg-args="-f lavfi -i anullsrc -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k">

@keshavdv
Copy link
Owner

keshavdv commented Apr 6, 2022

I've made some progress trying to understand the new entirely custom video feed, but haven't quite been able to figure out which bits are necessary just yet. Thank you for your patience!

@DReffects
Copy link

. Thank you for your patience!
THANK YOU!!

If I can assist in any way let me know

@poldim
Copy link

poldim commented Apr 9, 2022

Getting a similar error

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 157, 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
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipepipe:: Broken pipe

@EasternIndustries-IT
Copy link

So Im not sure if this has anything to do with a broken pip error. But since the update of the controller only not the app. I can no longer reach the unvr or protect by the specified ports

192.168.XXX.XXX:7443
192.168.XXX.XXX:7080

So I assume the port mapping for the UNVR has changed the ports listed below

7080 - HTTP Web UI & API

7443 - HTTPS Web UI & API

7444 - Camera firmware updates from controller

7447 - RTSP via the controller

7550 - Streaming to UFP

7442 - Camera management

@keshavdv
Copy link
Owner

Update: I've been able to make progress and get basic streaming working again in 1.21.4, but it will take me a few days to get things in good enough shape to ship a fix and push a new version.

@ksorokin
Copy link

ksorokin commented Apr 20, 2022

Thank you for your effort to get things back.
While you're shaping up the things, could you please share some details on the root cause? Just curious, I spent some time to investigate the issue, but not enough :)

@keshavdv
Copy link
Owner

If somebody doesn't get to it sooner, I can try this out in a few days! If you'd like, you should be able to clone this repo, create and activate a virtualenv, 'pip install -e .' within this repo and then run the UniFi-cam-proxy command. At this point, any changes you make to the clock_sync script should take effect.

@ptorsten
Copy link

ptorsten commented Aug 27, 2023 via email

@redalert11
Copy link

@ptorsten when poking around in the unifi protect software. I found some references to “Live flv” . Does this mean anything to you?

@Nayruden
Copy link

Nayruden commented Aug 27, 2023 via email

@ptorsten
Copy link

ptorsten commented Aug 27, 2023 via email

@redalert11
Copy link

That seems to only be applicable to rtmp, unless I'm missing something.

it can be FLV as well. if I compare what port we are using to what unifi-protect is looking for in /srv/unifi-protect/data/ems.json (line 103). it references that unifi-protect is looking for Live-FLV.
image

ill see if can figure out how to try it. I found at test implementation here.

@phillijw
Copy link

phillijw commented Aug 29, 2023

On my fork I'm seeing that the live view is almost exactly 50% speed from what it should be. The timestamps in code however look fine. I tried adjusting fps to see if there was some frame rate component but I didn't notice any change.

@evilworm
Copy link

evilworm commented Aug 29, 2023

I took a stab at it but I'm not sure how to test this:

        # Get timestamp to inject into clock sync tag                                       
        low_high = header[4:8]                                                              
        ts_lower = low_high[:3]                                                             
        ts_higher = low_high[3] #extension. Only used if >0                                 
                                                                                            
        if ts_higher == 0:                                                                  
            combined = low_high[:3]                                                         
        else:                                                                               
            combined = bytes([low_high[3]]) + low_high[:3]                                  
                                                                                            
        timestamp = struct.unpack(">i", combined)[0]

Then the trailer function I adjusted to remove the * 100 because I think that was probably an incorrect correction for the bad timestamp calculation. It's possible the * 1000 may not be necessary as well:

def write_timestamp_trailer(is_packet, ts):               
    # Write 15 byte trailer                               
    write(make_ui8(0))                                    
    if is_packet:                                         
        write(bytes([1, 95, 144, 0, 0, 0, 0, 0, 0, 0, 0]))
    else:                                                 
        write(bytes([0, 43, 17, 0, 0, 0, 0, 0, 0, 0, 0])) 
                                                          
    write(make_ui32(int(ts * 1000))) 

Anyone able to try this out somehow?

Tried this on my hikvision ... seems to work. Before this my video was getting out of sync pretty quicky, now it seems to stay within 1 second of the actual time. The only thing I changed was combined = low_high[:3] + b'0' otherwise it was complaining about not able to unpack because buffer required 4 bytes (I literally don't know what I did... don't work with python, just randomly added b'0' in hope that it would shut up about the error lol).

@cefoster0
Copy link

cefoster0 commented Aug 29, 2023

edited, didn't see evilworm's full comment. now only warning I'm getting is "filtered_messages() is deprecated and will be removed in a future version. Use messages() together with Topic.matches() instead."

great job everyone working on this.

@phillijw
Copy link

FYI my testing is happening on this branch. I still don't think I have it nailed down yet: https://github.com/phillijw/unifi-cam-proxy/commits/main

@phillijw
Copy link

I took a stab at it but I'm not sure how to test this:

        # Get timestamp to inject into clock sync tag                                       
        low_high = header[4:8]                                                              
        ts_lower = low_high[:3]                                                             
        ts_higher = low_high[3] #extension. Only used if >0                                 
                                                                                            
        if ts_higher == 0:                                                                  
            combined = low_high[:3]                                                         
        else:                                                                               
            combined = bytes([low_high[3]]) + low_high[:3]                                  
                                                                                            
        timestamp = struct.unpack(">i", combined)[0]

Then the trailer function I adjusted to remove the * 100 because I think that was probably an incorrect correction for the bad timestamp calculation. It's possible the * 1000 may not be necessary as well:

def write_timestamp_trailer(is_packet, ts):               
    # Write 15 byte trailer                               
    write(make_ui8(0))                                    
    if is_packet:                                         
        write(bytes([1, 95, 144, 0, 0, 0, 0, 0, 0, 0, 0]))
    else:                                                 
        write(bytes([0, 43, 17, 0, 0, 0, 0, 0, 0, 0, 0])) 
                                                          
    write(make_ui32(int(ts * 1000))) 

Anyone able to try this out somehow?

Tried this on my hikvision ... seems to work. Before this my video was getting out of sync pretty quicky, now it seems to stay within 1 second of the actual time. The only thing I changed was combined = low_high[:3] + b'0' otherwise it was complaining about not able to unpack because buffer required 4 bytes (I literally don't know what I did... don't work with python, just randomly added b'0' in hope that it would shut up about the error lol).

FYI I think b'0' should actually be bytes([0]) or b'\x00' otherwise it treats it as the ascii character zero

@phillijw
Copy link

@keshavdv I'm trying to understand the mpma tag but I can't find any docs about this. Can you tell me what this is?

            data["sp"] = FLVObject()
            data["sp"]["cur"] = 1500000
            data["sp"]["max"] = 1500000
            data["sp"]["min"] = 1500000
            data["t"] = 75000.0
            packet_to_inject = create_script_tag("onMpma", data, 0)

@keshavdv
Copy link
Owner

These are all new custom script tags that were added in Protect 2.x and aren't described anywhere, I think these are some latency related metrics and don't seem to have any effect on the time stamp skew problem. I chose values from a test stream and haven't been able to identify what that are used for within the UI

@ptorsten
Copy link

ptorsten commented Aug 29, 2023 via email

@phillijw
Copy link

I've done a few checks of how far out the cam timestamp is from the protect timeline (during playback) and every time I am getting something almost exactly close to a ratio of 2.85:1 such that 10min on the timeline equates to 3.5min on the recording (10 / 3.5 = 2.85). Basically the recording is playing in slo-mo.

Anyone have raw data (wireshark?) that shows several examples of the trailer being sent along with real-time timestamps to compare against?

@ptorsten
Copy link

ptorsten commented Aug 29, 2023 via email

@keshavdv
Copy link
Owner

I'll share some dumps later today, but I've seen similar behavior except different cameras have a different "ratio" which makes me think a part of it is tied to elements of the stream itself (e.g. fps) and isn't just off by some set value.

@ptorsten
Copy link

ptorsten commented Aug 29, 2023 via email

@ptorsten
Copy link

ptorsten commented Aug 29, 2023 via email

@phillijw
Copy link

phillijw commented Aug 29, 2023

On my branch I pushed a change to log the framerate and duration and width/height of the video. Unfortunately it's not sending anything useful at the moment:
{'duration': 0.0, 'width': 1920.0, 'height': 1080.0, 'videodatarate': 0.0}

There is more data available but, for me, framerate is not there for some reason.

@evilworm
Copy link

after some more testing of @phillijw patch:

  1. viewport video works as expected
  2. iphone app live view video freezes after about 4 seconds and only app restart helps
  3. web live view of video does not work, only blurred screenshot is visible
  4. playback in web does not work, just shows "unable to load requested video" when seeking
  5. playback in app does not work either

FYI I'm running dockerized version from :dev branch with --ffmpeg-args="-c:v copy -ss 0:01".
Tried without the -c:v copy, but does not seem to work ... also puts too much strain on the cpu (I'm on qnap NAS with AMD cpu / no video acceleration)

@cefoster0
Copy link

I'm having the same experience and evil worm. basically does not work.

@stale
Copy link

stale bot commented Oct 1, 2023

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.

@stale stale bot added the stale label Oct 1, 2023
@stale stale bot closed this as completed Oct 5, 2023
@vr6syncro
Copy link

still not working

@rgobbel
Copy link

rgobbel commented Oct 6, 2023

Confirmed, still not working. Please reopen this.

@cmille34
Copy link

cmille34 commented Nov 6, 2023

Anyone still actively working on this anymore?

@ptorsten
Copy link

ptorsten commented Nov 6, 2023 via email

@fwest57
Copy link

fwest57 commented May 3, 2024

Has support for unifi-cam-proxy stop working under the latest Protect 3.0.26? I was able to add an Amcrest cam, but the live feed frame rate is very slow. Plus it will not record to the NVR at all. It may have to do with the cam model set to unknown. Have not been able to get it to recognize a unifi model cam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests