Loxone Intercom + Unifi Protect
Hi, just found the project and wanted to integrate my loxone intercom stream to unifi protect.
Found this article here: https://loxwiki.atlassian.net/wiki/spaces/LOXEN/pages/2517499917/Integrating+Loxone+Intercom+Video+into+UniFi+Protect+via+go2rtc
I configured everything like described, I'm able to stream it by VLC but can't see the stream in unifi when I added the camera manually as 3rd party onvif camera.
Here's my config I used:
streams:
http_mpjpeg: "http://10.0.10.17/mjpg/video.mjpg#header=Authorization: Basic bxxxxxxxxxxx1"
rtsp:
listen: ":8554" # RTSP Server TCP port, default - 8554
# username: "admin" # optional, default - disabled
# password: "pass" # optional, default - disabled
default_query: "video&audio" #
Hope someone could help me ....
EDIT: I'm using HomeAssistant as Addon.
Yes I confirm the issue here. I can build the app locally and debug it so see where is the issue.
Better check this discussion https://github.com/AlexxIT/go2rtc/issues/1538
Before closing the issue you should ask whether that discussion has been followed by the participants and those attempts been made. In my case surely I have checked and the proposed solutions did not apply to this case. I would invite to re-open the discussion and keep it open until a solution for this specific case has been found. Thank you
It is better to discuss the same problems in one place.
Hello. How did you solve the above question. I have seemingly got the same issue. Able to configure in Unifi Protect, but the stream does not play and is therefore just showing a captured image.
Unfortunately I haven't. the maintainer of this repo thought that it would be better to discuss this issue in a different discussion. Unfortunately he forgot that no one there has Loxone and it is experiencing this exact issue. The issues there are completely unrelated to the Loxone issue we as Loxone users are experiencing. At the end I gave up and walked away of this project. It does not worth my time and effort.
That is a shame mazzy89. I have managed to get the Loxone Intercom working in VLC Player via RTSP. However when i go into Unifi Protect, for some reason I have been unable to get a live stream. If anyone can help with this, thats greatly appreciated. I cannot see a solution at this stage with Unifi Protect.
@mazzy89 did you find anything else that worked at pushing the Loxone Intercom into UniFi Protect?
Thanks
As I clearly said no. I've walked away. No much reasons to integrate a quite shitty intercom to protect
If you think that the problem is in the brand of the intercom - then it really can be discussed here.
From the first config I see that the codec is MJPEG. I agree that if a camera only supports this codec, it's pretty shitty.
Indeed, go2rtc can receive MJPEG as input and output it as RTSP. And it's quite possible that Unifi doesn't support this.
You need something like this. This is transcoding MJPEG to H264. I'm not sure if I wrote the authorization correctly. I hope it works.
ffmpeg:
http_auth: '-fflags nobuffer -flags low_delay -headers "Authorization: Basic ..." -i {input}'
streams:
camera1: ffmpeg:http://10.0.10.17/mjpg/video.mjpg#video=h264#hardware#input=http_auth
Wow... @AlexxIT, This worked for me. Thats Brillinat. I now have a live stream video however part of it is now pixelated. Any ideas?
Just editting this... I now realise only the live video is pixelated... The recorded video is fine. How Weird.
What about go2rtc WebUI and VLC?
Yep... Absolutely fine in VLC and WEBUI... It just seems to be Unifi Protect.... I am getting recording to show the video clearly, but live video is like the above...
You can try to remove #hardware. Or you will have to write your own transcoding command.
Google about ffmpeg and try to play with this params:
ffmpeg:
h264: "-c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p"
Would something like this work? When i change the H264 it doesnt seem to change anything
ffmpeg:
http_auth: '-fflags nobuffer -flags low_delay -headers "Authorization: Basic XXXXX" -i {input}'
h264: "-c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuvj420p"
streams:
loxone: ffmpeg:http://IPAddress/mjpg/video.mjpg#video=h264#input=http_auth
This is a default config line. It shouldn't change anything. You should change it.
thanks... I tried multiple configs on the ffmpeg and nothing seems to fix the issue at all. very odd
Well after many many attempts. I have got it working. Thanks for the help AlexxIT. I used the following.
preload:
ffmpeg:
http_auth: '-fflags nobuffer -flags low_delay -headers "Authorization: Basic XXXXXXX" -i {input}'
h264: "-c:v libx264 -g 12 -profile:v baseline -level:v 3.1 -preset:v superfast -tune:v psnr -pix_fmt:v yuv420p"
streams:
loxone: ffmpeg:http://IPAddress/mjpg/video.mjpg#video=h264#input=http_auth