unifi-cam-proxy
unifi-cam-proxy copied to clipboard
Get broken pipe exceptio
Camera
Dafang (Wyze V3
Firmware version of the camera
running on custom firmware /EliasKotlyar/Xiaomi-Dafang-Hacks
Description
Hi, I managed to get the docker up and running in unraid and it is sporadically updating the video image on the UDM Pro. It is shown as a G3 but strangely with a completely wrong IP address (192.168.1.10 which is nowhere in use in my setup). The camera itself is running under 10.1.100.254.
I see broken ffmpeg messages in the log which are probably the reason the picture is updated sporadically only. When I view the livestream of the camera via vlc it works fine.
Any pointers as to what I can try to get it up and running smoothly?
cheers, Florian
`2023-12-02 23:16:39 63910d932a7e RTSPCam[1] INFO Spawning ffmpeg for video2 (d10LqkTTbP3LsNVk): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=d10LqkTTbP3LsNVk -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 10.1.100.1 7550
[mp3float @ 0x14fef5ec3680] Header missing
2023-12-02 23:16:41 63910d932a7e 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-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-12-02 23:16:42 63910d932a7e RTSPCam[1] WARNING Previous ffmpeg process for video1 died.
2023-12-02 23:16:42 63910d932a7e RTSPCam[1] INFO Spawning ffmpeg for video1 (cQV9TDczEgC67NnO): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=cQV9TDczEgC67NnO -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 10.1.100.1 7550
[mp3float @ 0x1477d144b680] Header missing
2023-12-02 23:16:42 63910d932a7e RTSPCam[1] INFO Processing [GetRequest] message
[mp3float @ 0x5618dcdecd40] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
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-12-02 23:16:44 63910d932a7e RTSPCam[1] INFO Processing [NetworkStatus] message
2023-12-02 23:16:44 63910d932a7e RTSPCam[1] INFO Processing [GetSystemStats] message
[mp3float @ 0x1477cf39a4c0] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
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
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
2023-12-02 23:16:49 63910d932a7e 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-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-12-02 23:16:49 63910d932a7e RTSPCam[1] WARNING Previous ffmpeg process for video2 died.
2023-12-02 23:16:49 63910d932a7e RTSPCam[1] INFO Spawning ffmpeg for video2 (d10LqkTTbP3LsNVk): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=d10LqkTTbP3LsNVk -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 10.1.100.1 7550
[mp3float @ 0x153144652680] Header missing
2023-12-02 23:16:54 63910d932a7e RTSPCam[1] INFO Processing [NetworkStatus] message
2023-12-02 23:16:54 63910d932a7e RTSPCam[1] INFO Processing [GetSystemStats] message
[mp3float @ 0x55a24e0377c0] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
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
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
2023-12-02 23:16:55 63910d932a7e RTSPCam[1] INFO Processing [GetRequest] message
````2023-12-02 23:16:39 63910d932a7e RTSPCam[1] INFO Spawning ffmpeg for video2 (d10LqkTTbP3LsNVk): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=d10LqkTTbP3LsNVk -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 10.1.100.1 7550
[mp3float @ 0x14fef5ec3680] Header missing
2023-12-02 23:16:41 63910d932a7e 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-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-12-02 23:16:42 63910d932a7e RTSPCam[1] WARNING Previous ffmpeg process for video1 died.
2023-12-02 23:16:42 63910d932a7e RTSPCam[1] INFO Spawning ffmpeg for video1 (cQV9TDczEgC67NnO): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=cQV9TDczEgC67NnO -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 10.1.100.1 7550
[mp3float @ 0x1477d144b680] Header missing
2023-12-02 23:16:42 63910d932a7e RTSPCam[1] INFO Processing [GetRequest] message
[mp3float @ 0x5618dcdecd40] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
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-12-02 23:16:44 63910d932a7e RTSPCam[1] INFO Processing [NetworkStatus] message
2023-12-02 23:16:44 63910d932a7e RTSPCam[1] INFO Processing [GetSystemStats] message
[mp3float @ 0x1477cf39a4c0] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
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
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
2023-12-02 23:16:49 63910d932a7e 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-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-12-02 23:16:49 63910d932a7e RTSPCam[1] WARNING Previous ffmpeg process for video2 died.
2023-12-02 23:16:49 63910d932a7e RTSPCam[1] INFO Spawning ffmpeg for video2 (d10LqkTTbP3LsNVk): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=d10LqkTTbP3LsNVk -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 10.1.100.1 7550
[mp3float @ 0x153144652680] Header missing
2023-12-02 23:16:54 63910d932a7e RTSPCam[1] INFO Processing [NetworkStatus] message
2023-12-02 23:16:54 63910d932a7e RTSPCam[1] INFO Processing [GetSystemStats] message
[mp3float @ 0x55a24e0377c0] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
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
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
2023-12-02 23:16:55 63910d932a7e RTSPCam[1] INFO Processing [GetRequest] message
### How to reproduce
restart the docker. consistent behavior.
### Expected behaviour
_No response_
### Screenshots
_No response_
### Additional information
_No response_
Hi, I am getting the same 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 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 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 av_interleaved_write_frame(): Broken pipe Error writing trailer of pipe:: Broken pipe
Same issue here too....
2023-12-13 16:01:05 74eb5f84c024 Reolink[1] INFO Spawning ffmpeg for video1 (3AjUf5hFQ1Keom5e): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://********:*******@192.168.1.*:554//h264Preview_01_main" -c:v copy -bsf:v "h264_metadata=tick_rate=60000/1001" -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=3AjUf5hFQ1Keom5e -f flv - | /usr/local/bin/python -m unifi.clock_sync | nc 192.168.1.* 7550
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
Last message repeated 1 times
Error writing trailer of pipe:: Broken pipe
Likewise with the above issue.
Hello same here ...
Error writing trailer of pipe:: Broken pipe
and also
WARNING Previous ffmpeg process for video2 died.
I got the same Ip for the camera ( 192.168.1.10) that has nothing to do with current setup.
Use the dev branch, i tried that yesterday and it was working.
Use the dev branch, i tried that yesterday and it was working.
are you referring to the docker image image: keshavdv/unifi-cam-proxy:dev
?
Use the dev branch, i tried that yesterday and it was working.
are you referring to the docker image
image: keshavdv/unifi-cam-proxy:dev
?
Yep
Thanks for your efforts. I just pulled the image but I am still facing difficulties with broken pipe. Also i notice that the IP in the unifi setup is still shown as 192.168.1.10.
2023-12-31 04:57:14 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video2 died. 2023-12-31 04:57:14 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video2 (hNN1euzajteYwOLq): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=hNN1euzajteYwOLq -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 2023-12-31 04:57:20 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:20 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:29 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2023-12-31 04:57:30 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:30 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:40 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:40 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:44 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2023-12-31 04:57:47 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2023-12-31 04:57:50 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:50 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:54 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message rtsp://10.1.110.254:8554/unicast: Operation timed out Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> BrokenPipeError: [Errno 32] Broken pipe Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/app/unifi/clock_sync.py", line 179, in <module> main(parse_args()) File "/app/unifi/clock_sync.py", line 156, in main write(read_bytes(source, payload_size)) File "/app/unifi/clock_sync.py", line 28, in write sys.stdout.buffer.write(data) BrokenPipeError: [Errno 32] Broken pipe rtsp://10.1.110.254:8554/unicast: Operation timed out 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 Error closing file pipe:: Broken pipe 2023-12-31 04:58:00 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:00 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:58:10 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:10 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:58:14 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2023-12-31 04:58:14 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video3 died. 2023-12-31 04:58:14 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video3 (qx6ZEOyWJ4WMN7x2): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=qx6ZEOyWJ4WMN7x2 -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 2023-12-31 04:58:16 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2023-12-31 04:58:16 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video1 died. 2023-12-31 04:58:16 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video1 (QYGe5K2k4uX1gEXQ): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=QYGe5K2k4uX1gEXQ -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 2023-12-31 04:58:20 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:20 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] INFO Processing [GetRequest] message 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video2 died. 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video2 (hNN1euzajteYwOLq): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=hNN1euzajteYwOLq -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 rtsp://10.1.110.254:8554/unicast: Invalid data found when processing input 2023-12-31 04:58:30 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:30 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message rtsp://10.1.110.254:8554/unicast: Invalid data found when processing input rtsp://10.1.110.254:8554/unicast: Invalid data found when processing input
Thanks for your efforts. I just pulled the image but I am still facing difficulties with broken pipe. Also i notice that the IP in the unifi setup is still shown as 192.168.1.10.
2023-12-31 04:57:14 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video2 died. 2023-12-31 04:57:14 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video2 (hNN1euzajteYwOLq): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=hNN1euzajteYwOLq -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 2023-12-31 04:57:20 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:20 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:29 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2023-12-31 04:57:30 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:30 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:40 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:40 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:44 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2023-12-31 04:57:47 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message 2023-12-31 04:57:50 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:57:50 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:57:54 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message rtsp://10.1.110.254:8554/unicast: Operation timed out Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> BrokenPipeError: [Errno 32] Broken pipe Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/app/unifi/clock_sync.py", line 179, in <module> main(parse_args()) File "/app/unifi/clock_sync.py", line 156, in main write(read_bytes(source, payload_size)) File "/app/unifi/clock_sync.py", line 28, in write sys.stdout.buffer.write(data) BrokenPipeError: [Errno 32] Broken pipe rtsp://10.1.110.254:8554/unicast: Operation timed out 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 Error closing file pipe:: Broken pipe 2023-12-31 04:58:00 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:00 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:58:10 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:10 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:58:14 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2023-12-31 04:58:14 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video3 died. 2023-12-31 04:58:14 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video3 (qx6ZEOyWJ4WMN7x2): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=qx6ZEOyWJ4WMN7x2 -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 2023-12-31 04:58:16 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2023-12-31 04:58:16 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video1 died. 2023-12-31 04:58:16 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video1 (QYGe5K2k4uX1gEXQ): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=QYGe5K2k4uX1gEXQ -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 2023-12-31 04:58:20 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:20 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] INFO Processing [GetRequest] message 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] INFO Processing [ChangeVideoSettings] message ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] WARNING Previous ffmpeg process for video2 died. 2023-12-31 04:58:24 af24a072b9c4 RTSPCam[1] INFO Spawning ffmpeg for video2 (hNN1euzajteYwOLq): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.1.110.254:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=hNN1euzajteYwOLq -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.1.100.1 7550 rtsp://10.1.110.254:8554/unicast: Invalid data found when processing input 2023-12-31 04:58:30 af24a072b9c4 RTSPCam[1] INFO Processing [NetworkStatus] message 2023-12-31 04:58:30 af24a072b9c4 RTSPCam[1] INFO Processing [GetSystemStats] message rtsp://10.1.110.254:8554/unicast: Invalid data found when processing input rtsp://10.1.110.254:8554/unicast: Invalid data found when processing input
I dont have this broken pipe thing with the dev branch, but there is some weirdness with the camera IP. So i checked the files (main.py) on github, the default is that IP, you can change it with --IP but with Unraid you get some error with you only being able to use that custom IP with user created networks, it worked for me when i used the docker compose manager.
I dont have this broken pipe thing with the dev branch, but there is some weirdness with the camera IP. So i checked the files (main.py) on github, the default is that IP, you can change it with --IP but with Unraid you get some error with you only being able to use that custom IP with user created networks, it worked for me when i used the docker compose manager.
Could you explain what you did?
I am still messing around but this is what works with IP change for me.
services: proxy-1: restart: unless-stopped image: keshavdv/unifi-cam-proxy:dev volumes: - "/mnt/user/appdata/camproxy/client.pem:/client.pem" command: unifi-cam-proxy --host 192.168.0.1 --ip 192.168.0.220 --mac 'XXX' --cert /client.pem --token XXX frigate -s "rtsp://[email protected]:8554/XXX_Camera_sub?video=all&audio=all" --mqtt-host "192.168.0.203" --mqtt-username "admin" --mqtt-password "XXX" --frigate-camera XXX_Camera --snapshot-url "http://192.168.0.204:5000/live/webrtc/api/frame.mp4?src=XXX_Camera"
I have also tested a similar one with just rtsp and not the frigate one, you just need to change after the token to rtsp -s and remove the unnecessary stuff.
I am still messing around but this is what works with IP change for me.
services: proxy-1: restart: unless-stopped image: keshavdv/unifi-cam-proxy:dev volumes: - "/mnt/user/appdata/camproxy/client.pem:/client.pem" command: unifi-cam-proxy --host 192.168.0.1 --ip 192.168.0.220 --mac 'XXX' --cert /client.pem --token XXX frigate -s "rtsp://[email protected]:8554/XXX_Camera_sub?video=all&audio=all" --mqtt-host "192.168.0.203" --mqtt-username "admin" --mqtt-password "XXX" --frigate-camera XXX_Camera --snapshot-url "http://192.168.0.204:5000/live/webrtc/api/frame.mp4?src=XXX_Camera"
I have also tested a similar one with just rtsp and not the frigate one, you just need to change after the token to rtsp -s and remove the unnecessary stuff.
Thanks... I can confirm getting the IP address changed this way successfully.
I still do get broken pipe exceptions and then the ffmpeg process dies. But it seems to pick up afterwards quickly again therefore works decently. I will try with a different camera to ensure there is nothing wrong with the rtsp stream.
Hi there, I have been trying to make a [insert camera model name] on my network and have been having the same issues.
I run on a broken pipe in the same way as some others previously :
2024-01-12 16:37:56 RedactedMachineName RTSPCam[965209] INFO Spawning ffmpeg for video2 (FbtRYZ4Bw0M8y83Q): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "redacted rtsp link" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=FbtRYZ4Bw0M8y83Q -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc redacted_ip 7550
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.10/dist-packages/unifi/clock_sync.py", line 167, in <module>
main()
File "/usr/local/lib/python3.10/dist-packages/unifi/clock_sync.py", line 157, in main
write(read_bytes(source, payload_size))
File "/usr/local/lib/python3.10/dist-packages/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 pipe
So far I have G3 flex working on my UniFi software, so I think that side is working correctly, and I have managed to use ffmpeg to save my stream to an mp4 file without any issues.
Could there be an issue with the way the clock_sync writes the data to UniFi and unify closing the socket?
When I use the dev branch of the docker, the camera shows up as online and gives me a snapshot, but then subsequently crashes Unifi Protect for some reason and I have to restart it. Currently using this as posted above:
version: "3.5"
services:
unifi-cam-proxy:
restart: unless-stopped
image: keshavdv/unifi-cam-proxy:dev
volumes:
- "./client.pem:/client.pem"
command: unifi-cam-proxy --host 10.0.0.1 --ip 10.0.0.84 --mac 'xxx' --model 'UVC G4 PTZ' --cert /client.pem --token xxx frigate -s "rtsp://10.0.0.84:554/stream0?video=all&audio=all" --mqtt-host "10.0.0.139" --mqtt-port 1883 --mqtt-username "xxx" --mqtt-password "xxx" --frigate-camera ptzcam --snapshot-url "http://10.0.0.26:5069/api/ptzcam"
I have some logs here:
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
2024-01-13 01:21:39 b0e10960476e FrigateCam[1] WARNING Previous ffmpeg process for video1 died.
2024-01-13 01:21:39 b0e10960476e FrigateCam[1] INFO Spawning ffmpeg for video1 (VH77C7BMBDIfO8Bh): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://10.0.0.84:554/stream0?video=all&audio=all" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=VH77C7BMBDIfO8Bh -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 10.0.0.1 7550
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeIspSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeOsdSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeAudioEventsSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeSoundLedSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeVideoSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeSmartMotionSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [EnableLogging] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeDeviceSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeDeviceSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeSmartDetectSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [SmartMotionTest] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeVideoSettings] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [UpdateUsernamePassword] message
2024-01-13 01:21:41 b0e10960476e FrigateCam[1] INFO Processing [ChangeVideoSettings] message
2024-01-13 01:21:46 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:21:46 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
2024-01-13 01:21:56 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:21:56 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
2024-01-13 01:22:06 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:22:06 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
2024-01-13 01:22:16 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:22:16 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
2024-01-13 01:22:26 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:22:26 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
2024-01-13 01:22:36 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:22:36 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
2024-01-13 01:22:46 b0e10960476e FrigateCam[1] INFO Processing [NetworkStatus] message
2024-01-13 01:22:46 b0e10960476e FrigateCam[1] INFO Processing [GetSystemStats] message
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, 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
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, 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
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, 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
Error closing file pipe:: Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
Error closing file pipe:: Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
Error closing file pipe:: Broken pipe
2024-01-13 01:22:52 b0e10960476e FrigateCam[1] INFO Connection to 10.0.0.1 was closed.
2024-01-13 01:22:52 b0e10960476e FrigateCam[1] INFO Cleaning up instance
2024-01-13 01:22:52 b0e10960476e FrigateCam[1] INFO Stopping stream video3
2024-01-13 01:22:52 b0e10960476e FrigateCam[1] INFO Stopping stream video2
2024-01-13 01:22:52 b0e10960476e FrigateCam[1] INFO Stopping stream video1
2024-01-13 01:22:52 b0e10960476e Core[1] INFO Backing off connect(...) for 10.0s (True)
Edit: Actually it works now, turns out setting it to a PTZ cam does not work.
Same issue here, using pi5 + UP docker image from here + hikvision cams https://github.com/markdegrootnl/unifi-protect-arm64/issues Tried various configs but i only get screenshots. So was this axed by unifi or what?
Using Bare Metal Ubuntu installation
Same issues here. BrokenPipe errors. If you look at the command line code repeatedly generated by the script:
ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://192.168.190.150:554/Streaming/Channels/2" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=W1lhkzMqd6v6ZXDO -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.19.7 7550
It seems there is first a pipe from ffmpeg to clock_sync.py, which inserts timing info into the stream, then clock_sync.py does a stdout pipe to nc which farms it to the NVR. so, two pipes. If you just make the script pipe the stream to clock_sync.pl and then only do stdout to the screen from clock_sync.py (don't continue the pass to nc), the stream fills the screen with the video data encoding data continuously with no broken pipe error, so it's not on the input encoding side.
You can see this by just running the command line:
ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -stimeout 15000000 -rtsp_transport tcp -i "rtsp://192.168.190.150:554/Streaming/Channels/2" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=W1lhkzMqd6v6ZXDO -f flv - | /usr/bin/python3 -m unifi.clock_sync
(you just take off the final pipe to nc | nc 192.168.19.7 7550)
but if you change it back and pipe the clock_sync.py stream onward to nc, it breaks after one frame.
I think what's going on here is the NVR server starts to receive the flv data via netcat, but senses something weird is up with it, and rejects the connection, thus nc dies, causing the pipe to break between clock_sync.py and nc. Maybe unify changed something in the codec settings of what it's willing to accept as a live incoming stream that rejects it now.
I'm running it on Synology NAS, Unifi protect is on UDM SE and I am only getting snapshot. Even with the dev branch. What I can't figure it out is where I need to put command with arguments, because in my Docker that command don't work
unifi-cam-proxy -H {NVR IP} -i {camera IP} -c /client.pem -t {Adoption token} reolink -u {username} -p {password} -s “main” –ffmpeg-args=‘-c:v copy -bsf:v “h264_metadata=tick_rate=60000/1001” -ar 32000 -ac 1 -codec:a aac -b:a 32k’
This is my log output:
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-
libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora -
-enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enab
le-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --
enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-l
ibsvtav1
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
2024-02-01 20:37:15 keshavdv-unifi-cam-proxy3 RTSPCam[1] WARNING Previous ffmpeg process for video2 died.
2024-02-01 20:37:15 keshavdv-unifi-cam-proxy3 RTSPCam[1] INFO Spawning ffmpeg for video2 (le6l8p4LHsxlo99w): ffmpeg -nostdin -loglevel error -y -avoid_
negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://xxxxx:xxxxxxx@192
.168.1.137:554/h264Preview_01_main" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=le6l8p4LHsxlo99w -f flv - | /usr/local/bin/pyt
hon -m unifi.clock_sync --write-timestamps | nc 192.168.1.1 7550
[flv @ 0x7fb9f1973380] Video codec hevc not compatible with flv
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented
Error initializing output stream 0:1 --
^[a2024-02-01 20:37:18 keshavdv-unifi-cam-proxy3 RTSPCam[1] INFO Processing [GetRequest] message
I'm running it on Synology NAS, Unifi protect is on UDM SE and I am only getting snapshot. Even with the dev branch. What I can't figure it out is where I need to put command with arguments, because in my Docker that command don't work
unifi-cam-proxy -H {NVR IP} -i {camera IP} -c /client.pem -t {Adoption token} reolink -u {username} -p {password} -s “main” –ffmpeg-args=‘-c:v copy -bsf:v “h264_metadata=tick_rate=60000/1001” -ar 32000 -ac 1 -codec:a aac -b:a 32k’
This is my log output:
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924 configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable- libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora - -enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enab le-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus -- enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-l ibsvtav1 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 2024-02-01 20:37:15 keshavdv-unifi-cam-proxy3 RTSPCam[1] WARNING Previous ffmpeg process for video2 died. 2024-02-01 20:37:15 keshavdv-unifi-cam-proxy3 RTSPCam[1] INFO Spawning ffmpeg for video2 (le6l8p4LHsxlo99w): ffmpeg -nostdin -loglevel error -y -avoid_ negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://xxxxx:xxxxxxx@192 .168.1.137:554/h264Preview_01_main" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=le6l8p4LHsxlo99w -f flv - | /usr/local/bin/pyt hon -m unifi.clock_sync --write-timestamps | nc 192.168.1.1 7550 [flv @ 0x7fb9f1973380] Video codec hevc not compatible with flv Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented Error initializing output stream 0:1 -- ^[a2024-02-01 20:37:18 keshavdv-unifi-cam-proxy3 RTSPCam[1] INFO Processing [GetRequest] message
Now that's interesting. I don't use Docker so can't speak for the dev branch version (still waiting for the dev branch command line version for apt install), but it looks like he was trying to change the flv file format based on a change on Protect....
[flv @ 0x7fb9f1973380] Video codec hevc not compatible with flv Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented Error initializing output stream 0:1 -- ^[a2024-02-01 20:37:18 keshavdv-unifi-cam-proxy3 RTSPCam[1] INFO Processing [GetRequest] message
I think this is gonna be dead until someone can figure out the new flv requirements for the new version of Protect.
[flv @ 0x7fb9f1973380] Video codec hevc not compatible with flv
Try to change your camera settings to H264, basically make sure the camera settings is configured to what is recommended by Frigate and Scrypted.
I dont have this broken pipe thing with the dev branch.
[flv @ 0x7fb9f1973380] Video codec hevc not compatible with flv
Try to change your camera settings to H264, basically make sure the camera settings is configured to what is recommended by Frigate and Scrypted.
I dont have this broken pipe thing with the dev branch.
@simclancy What type of camera are u using? Where do you run unifi-camera-proxy?
[flv @ 0x7fb9f1973380] Video codec hevc not compatible with flv Try to change your camera settings to H264, basically make sure the camera settings is configured to what is recommended by Frigate and Scrypted. I dont have this broken pipe thing with the dev branch.
@simclancy What type of camera are u using? Where do you run unifi-camera-proxy?
Bunch of Hikvision and Reolink cameras, i tried the RTSP way before but now i am using through Frigate. Unraid, using docker compose.
Ok, I'm trying the Docker version with the dev branch this weekend. I have zero experience using the Docker containers, but have been doing some reading. I'm on a Mac and would prefer to OSX and the Docker Desktop app. Do I just install the make Docker Desktop, then point to the repository and search for it? where does the docker-compose.yaml file fit in? Is that just for Docker Compose, which I assume is an alternative method of creating a container rather than through the Desktop app?
Ok, I'm trying the Docker version with the dev branch this weekend. I have zero experience using the Docker containers, but have been doing some reading. I'm on a Mac and would prefer to OSX and the Docker Desktop app. Do I just install the make Docker Desktop, then point to the repository and search for it? where does the docker-compose.yaml file fit in? Is that just for Docker Compose, which I assume is an alternative method of creating a container rather than through the Desktop app?
Well you will have to search yourself if the non linux variants of Docker has the same functionalities, i thought it didnt at least on windows. I did post what i used in this thread, just search for that as a reference.
Well you will have to search yourself if the non linux variants of Docker has the same functionalities, i thought it didnt at least on windows. I did post what i used in this thread, just search for that as a reference.
Ok, with docker I was able to pull the dev branch and build the container from the docker-compose.yaml file, and the broken pipe errors have gone away, but the stream now updates, but only every 25 or so seconds. I'm not using frigate, just straight rtsp H264, 1920x1080, 20fps feed from the cam (LTS CMIP3502). Tried adding the IP and MAC flags, still no joy. There's apparently a ton of other builds from other people in the repository, I may try some of those instead. Would really love to get this working as we have 35+ quite nice cams I really am not looking forward to replace just to get them all on a common platform.
Well you will have to search yourself if the non linux variants of Docker has the same functionalities, i thought it didnt at least on windows. I did post what i used in this thread, just search for that as a reference.
Ok, with docker I was able to pull the dev branch and build the container from the docker-compose.yaml file, and the broken pipe errors have gone away, but the stream now updates, but only every 25 or so seconds. I'm not using frigate, just straight rtsp H264, 1920x1080, 20fps feed from the cam (LTS CMIP3502). Tried adding the IP and MAC flags, still no joy. There's apparently a ton of other builds from other people in the repository, I may try some of those instead. Would really love to get this working as we have 35+ quite nice cams I really am not looking forward to replace just to get them all on a common platform.
Where are the other builds? Pretty sure 35 cams is above what is supported if you are just using a UDM Pro
Well you will have to search yourself if the non linux variants of Docker has the same functionalities, i thought it didnt at least on windows. I did post what i used in this thread, just search for that as a reference.
Ok, with docker I was able to pull the dev branch and build the container from the docker-compose.yaml file, and the broken pipe errors have gone away, but the stream now updates, but only every 25 or so seconds. I'm not using frigate, just straight rtsp H264, 1920x1080, 20fps feed from the cam (LTS CMIP3502). Tried adding the IP and MAC flags, still no joy. There's apparently a ton of other builds from other people in the repository, I may try some of those instead. Would really love to get this working as we have 35+ quite nice cams I really am not looking forward to replace just to get them all on a common platform.
Where are the other builds? Pretty sure 35 cams is above what is supported if you are just using a UDM Pro
Oh man, I've got like over 100 cameras total split over 3 UDM PROs. I've already converted most of our extremely old IPS and analog composite ones to Ubiquity cams, but there's nothing wrong with these newer 30+ LTS ones. Also, I'm having a hard time selling them used. Already finding it impossible with the other 70 older ones I've already replaced even when I included the old proprietary NVRs.
And, you can really push the limits depending on resolution. For example, on NVR1 alone I've got (42) G3 Flexs and (2) G4 Domes. All three of my UDM Pros have a full arrays of 8Tb HST drives as well. Granted, most of the cams only record on motion, but the cams on NVR2 and NVR3 record full time but there's less of them on those decks.
What I'd like to do is use probably about 5-6 miniMacs (I've already got a bunch of older i7 2012 units laying around) running unifi-cam-proxy for like 5 cams each, as converters to NVR3.
I saw the other builds simply doing an image search for unifi-cam-proxy in the Docker Desktop App Search Bar.
Heheh... So if you're wondering who's the guy that keeps scooping up all the cameras from the ui store, that would probably be me :) Actually, it's taken me over a year to acquire that many from the store, eBay, etc. This has been a long conversion project.
I would only want that my one Reolink 811A is working on my UDM SE with two other G4 Instant cameras, and you are messing with 100's of them. :)
Today I tried to use my other camera (Foscam G2 FullHD) in camera-proxy, and it's working normally. The real question is why Reolink 4K camera don't want to work?
Not sure if this is the same issue but I've got the camera showing up in the Unifi Protect but its only showing a still image and seemingly refreshing every couple of mins.
`
(reverse-i-search)`tai': ^Cil -f messages
(unifi-cam-proxy) root@debian:/mnt/pve/proxmox_nfs/shared-configs/unifi-cam-proxy# docker logs unifi-driveway-proxy -f
2024-02-09 23:39:25 2659c75680ef RTSPCam[1] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://192.168.121.129:8554/driveway_high" -r 1 -update 1 /tmp/tmpz7xnu6xi/screen.jpg
2024-02-09 23:39:25 2659c75680ef Core[1] INFO Creating ws connection to wss://192.168.100.1:7442/camera/1.0/ws?token=iHKxM5aVwWtZmDzTkeg4WcDrOIMv357Y
2024-02-09 23:39:25 2659c75680ef RTSPCam[1] INFO Adopting with token [iHKxM5aVwWtZmDzTkeg4WcDrOIMv357Y] and mac [AA:BB:CC:00:11:22]
2024-02-09 23:39:25 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_hello] message
2024-02-09 23:39:26 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_paramAgreement] message
2024-02-09 23:39:26 2659c75680ef RTSPCam[1] INFO Processing [StopService] message
2024-02-09 23:39:26 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_hello] message
2024-02-09 23:39:26 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
2024-02-09 23:39:26 2659c75680ef RTSPCam[1] INFO Spawning ffmpeg for video3 (537NDxMuGJC99dxj): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://192.168.121.129:8554/driveway_high" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=537NDxMuGJC99dxj -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 192.168.100.1 7550
2024-02-09 23:39:26 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_paramAgreement] message
2024-02-09 23:39:27 2659c75680ef RTSPCam[1] INFO Processing [ChangeDeviceSettings] message
2024-02-09 23:39:27 2659c75680ef RTSPCam[1] INFO Processing [NetworkStatus] message
2024-02-09 23:39:27 2659c75680ef RTSPCam[1] INFO Processing [GetSystemStats] message
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Spawning ffmpeg for video1 (uICJ25U1DqEZn3O4): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://192.168.121.129:8554/driveway_high" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=uICJ25U1DqEZn3O4 -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 192.168.100.1 7550
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Processing [UpdateFirmwareRequest] message
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Reconnecting...
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Cleaning up instance
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Stopping stream video3
2024-02-09 23:39:28 2659c75680ef RTSPCam[1] INFO Stopping stream video1
2024-02-09 23:39:28 2659c75680ef Core[1] INFO Backing off connect(...) for 2.0s (True)
2024-02-09 23:39:30 2659c75680ef Core[1] INFO Creating ws connection to wss://192.168.100.1:7442/camera/1.0/ws?token=iHKxM5aVwWtZmDzTkeg4WcDrOIMv357Y
2024-02-09 23:39:30 2659c75680ef RTSPCam[1] INFO Adopting with token [iHKxM5aVwWtZmDzTkeg4WcDrOIMv357Y] and mac [AA:BB:CC:00:11:22]
2024-02-09 23:39:30 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_hello] message
2024-02-09 23:39:30 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_paramAgreement] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [StopService] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_hello] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [ChangeDeviceSettings] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [NetworkStatus] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [GetSystemStats] message
2024-02-09 23:39:31 2659c75680ef RTSPCam[1] INFO Processing [ubnt_avclient_paramAgreement] message
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, in write
sys.stdout.buffer.write(data)
BrokenPipeError: [Errno 32] Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
Error closing file pipe:: Broken pipe
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, in write
sys.stdout.buffer.write(data)
BrokenPipeError: [Errno 32] Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
Error closing file pipe:: Broken pipe
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeIspSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeOsdSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeAudioEventsSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeSoundLedSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeSmartMotionSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [EnableLogging] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeDeviceSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeDeviceSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [SmartMotionTest] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [AudioAgentChangeTuning] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [UpdateUsernamePassword] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
2024-02-09 23:39:36 2659c75680ef RTSPCam[1] INFO Processing [ChangeAudioEventsSettings] message
2024-02-09 23:39:37 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] WARNING Previous ffmpeg process for video1 died.
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] INFO Spawning ffmpeg for video1 (uICJ25U1DqEZn3O4): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://192.168.121.129:8554/driveway_high" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=uICJ25U1DqEZn3O4 -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 192.168.100.1 7550
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] INFO Processing [NetworkStatus] message
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] INFO Processing [GetSystemStats] message
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] INFO Processing [ChangeVideoSettings] message
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] WARNING Previous ffmpeg process for video3 died.
2024-02-09 23:39:39 2659c75680ef RTSPCam[1] INFO Spawning ffmpeg for video3 (537NDxMuGJC99dxj): ffmpeg -nostdin -loglevel error -y -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -timeout 15000000 -rtsp_transport tcp -i "rtsp://192.168.121.129:8554/driveway_high" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamName=537NDxMuGJC99dxj -f flv - | /usr/local/bin/python -m unifi.clock_sync --write-timestamps | nc 192.168.100.1 7550
2024-02-09 23:39:40 2659c75680ef RTSPCam[1] INFO Processing [GetRequest] message
2024-02-09 23:39:40 2659c75680ef RTSPCam[1] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://192.168.121.129:8554/driveway_high" -r 1 -update 1 /tmp/tmpz7xnu6xi/screen.jpg
2024-02-09 23:39:40 2659c75680ef RTSPCam[1] WARNING Snapshot file /tmp/tmpz7xnu6xi/screen.jpg is not ready yet, skipping upload
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, in write
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
sys.stdout.buffer.write(data)
BrokenPipeError: [Errno 32] Broken pipe
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/app/unifi/clock_sync.py", line 179, in <module>
main(parse_args())
File "/app/unifi/clock_sync.py", line 156, in main
write(read_bytes(source, payload_size))
File "/app/unifi/clock_sync.py", line 28, in write
sys.stdout.buffer.write(data)
BrokenPipeError: [Errno 32] Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
Error closing file pipe:: Broken pipe
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
Error closing file pipe:: Broken pipe
screen recording -> https://capture.dropbox.com/Q9xUXriwlgVeccUX