go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Loxone Intercom + Unifi Protect

Open pforrmi opened this issue 5 months ago • 18 comments

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.

pforrmi avatar Jul 26 '25 10:07 pforrmi

Yes I confirm the issue here. I can build the app locally and debug it so see where is the issue.

mazzy89 avatar Aug 07 '25 21:08 mazzy89

Better check this discussion https://github.com/AlexxIT/go2rtc/issues/1538

AlexxIT avatar Aug 08 '25 14:08 AlexxIT

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

mazzy89 avatar Aug 08 '25 14:08 mazzy89

It is better to discuss the same problems in one place.

AlexxIT avatar Aug 09 '25 14:08 AlexxIT

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.

mikeseaman3000 avatar Sep 10 '25 15:09 mikeseaman3000

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.

mazzy89 avatar Sep 10 '25 16:09 mazzy89

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.

mikeseaman3000 avatar Sep 10 '25 16:09 mikeseaman3000

@mazzy89 did you find anything else that worked at pushing the Loxone Intercom into UniFi Protect?

Thanks

mikeseaman3000 avatar Sep 11 '25 07:09 mikeseaman3000

As I clearly said no. I've walked away. No much reasons to integrate a quite shitty intercom to protect

mazzy89 avatar Sep 11 '25 07:09 mazzy89

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

AlexxIT avatar Sep 11 '25 12:09 AlexxIT

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.

Image

mikeseaman3000 avatar Sep 11 '25 12:09 mikeseaman3000

What about go2rtc WebUI and VLC?

AlexxIT avatar Sep 11 '25 12:09 AlexxIT

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...

mikeseaman3000 avatar Sep 11 '25 12:09 mikeseaman3000

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"

AlexxIT avatar Sep 11 '25 12:09 AlexxIT

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

mikeseaman3000 avatar Sep 11 '25 14:09 mikeseaman3000

This is a default config line. It shouldn't change anything. You should change it.

AlexxIT avatar Sep 11 '25 14:09 AlexxIT

thanks... I tried multiple configs on the ffmpeg and nothing seems to fix the issue at all. very odd

mikeseaman3000 avatar Sep 11 '25 15:09 mikeseaman3000

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

mikeseaman3000 avatar Sep 11 '25 15:09 mikeseaman3000