Installing homebridge-camera-ffmpeg

How can I install homebridge-camera-ffmpeg in hassio:

My goal is to make my foscam IP cameras display in HomeKit

1 Like

Having the exact same issue here. I’m able to get a image in my Hass.io setup, but no such luck via Homebridge.

What do you mean - get an image? I haven’t even gotten that far. Can you describe what you’ve done so far?

I followed the instructions and was able to add the camera to my Home app, but it just showed a camera with an “X” through it and no image.

The thing that took me forever to figure out is that homebridge doesn’t just automatically add in your camera. You have to actually click the “+” then “add accessory” and there will be a camera there to add.

“I followed the instructions” - can you share a link to the instructions and explain how you installed it on hassio?

Have you installed any Homebridge Plugins with the Hassio add on?

Actually, I can’t figure out how to install that. I added the URL as an add-on store repository and nothing showed up in HASSIO.

OK, I think I’m figuring it out. I think you need to add to the packages and plugins section of the hassio home bridge config. Like this:

{
  "log_level": "info",
  "avahi_interfaces": "",
  "avahi_hostname": "",
  "avahi_domainname": "local",
  "enable_ipv6": false,
  "packages": [
    "ffmpeg"
  ],
  "init_commands": [],
  "plugins": [
    "homebridge-camera-ffmpeg"
  ]
}

Got it working. Here are the steps:

  1. Set packages and plugins sections in your Homebridge config:
{
  "log_level": "info",
  "avahi_interfaces": "",
  "avahi_hostname": "",
  "avahi_domainname": "local",
  "enable_ipv6": false,
  "packages": [
    "ffmpeg"
  ],
  "init_commands": [],
  "plugins": [
    "homebridge-camera-ffmpeg"
  ]
}
  1. Add each camera in the config.json platforms section. Parameters differ per camera model. For some examples:
    1. https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki/Tested-Configuration
    2. https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki
{
	"name": "Living Room (Blue Iris)",
	"videoConfig": {
		"source": "-re -i http://{{BLUE_IRIS_IP}}:{{PORT}}/mjpg/{{CAMERA_NAME}}?user={{USERNAME}}}}&pw={{PASSWORD}}",
		"stillImageSource": "-f mjpeg -i http://{{BLUE_IRIS_IP}}:{{PORT}}/image/{{CAMERA_NAME}}?user={{USERNAME}}}}&pw={{PASSWORD}}",
		"maxStreams": 2,
		"maxWidth": 1280,
		"maxHeight": 720,
		"maxFPS": 30
	}
}
  1. Restart homebridge and add the camera accessory in the IOS home app
2 Likes

can you share your configuration.json i have i Syntax Error i just to see how the config should be im new to this and i try to use a json validator it shows me where my error is but dont nknow how to fix it

1 Like

Yeah, I had a json error at first too. You can validate it here (just replace usernames, passwords, and other sensitive info before posting: https://jsonlint.com

Here’s how my working config.json looks (just with a lot more cameras and sensitive info removed) - Note: The supported types have nothing to do with getting the cameras to work - those are just the ones I’m using for other HomeKit automation.

{
  "bridge": {
    "name": "Home Assistant",
    "username": "{{ A RANDOM UNIQUE MAC ADDRESS - ex. A1:B2:C3:D4:E5:F6 }}",
    "port": 51826,
    "pin": "{{ A UNIQUE HOMEKIT PIN - ex. 123-45-678 }}"
  },
  "description": "Homebridge for Home Assistant",
  "accessories": [],
  "platforms": [
    {
      "platform": "HomeAssistant",
      "name": "HomeAssistant",
      "host": "{{ HOME ASSISTANT URL - ex. http://192.168.1.2:8123 }}",
      "password": "{{ HOME ASSISTANT PASSWORD - ex. mypass123 }}",
      "default_visibility": "visible",
      "supported_types": [
        "binary_sensor",
        "fan",
        "light",
        "lock",
        "remote",
        "switch",
        "sensor"
      ],
      "logging": true,
      "verify_ssl": false
    },
    {
      "platform": "Camera-ffmpeg",
      "cameras": [
        {
        	"name": "My First Camera Named Whatever You Want",
        	"videoConfig": {
        		"source": "-re -i http://{{BLUE_IRIS_IP}}:{{PORT}}/mjpg/{{CAMERA_NAME}}?user={{USERNAME}}}}&pw={{PASSWORD}}",
        		"stillImageSource": "-f mjpeg -i http://{{BLUE_IRIS_IP}}:{{PORT}}/image/{{CAMERA_NAME}}?user={{USERNAME}}}}&pw={{PASSWORD}}",
        		"maxStreams": 2,
        		"maxWidth": 1280,
        		"maxHeight": 720,
        		"maxFPS": 30
        	}
        },
        {
        	"name": "My Second Camera Named Whatever You Want",
        	"videoConfig": {
        		"source": "-re -i http://{{BLUE_IRIS_IP}}:{{PORT}}/mjpg/{{CAMERA_NAME}}?user={{USERNAME}}}}&pw={{PASSWORD}}",
        		"stillImageSource": "-f mjpeg -i http://{{BLUE_IRIS_IP}}:{{PORT}}/image/{{CAMERA_NAME}}?user={{USERNAME}}}}&pw={{PASSWORD}}",
        		"maxStreams": 2,
        		"maxWidth": 1280,
        		"maxHeight": 720,
        		"maxFPS": 30
        	}
        }		
      ]
    }
  ]
}

thanks i got it working

Thanks a lot I used your examples to get this setup with Cheap Chinese cameras and it works awesome, Now to get motion notifications working! :slight_smile:

1 Like

the video has i very low quality on my camera is anyone experiencing the same?
or is just my set up im using android phone with the ipwebcam app

the video has i very low quality on my camera is anyone experiencing the same?
or is just my set up im using android phone with the ipwebcam app

Are you running Hass.io on a Raspberry pi? I have everything set up and can see a screenshot in my home app but cannot get a good live stream. The path is correct and can be viewed in VLC player over the network.

I am running hassio on a pi. Video stream is low quality but I’m pulling from a blue iris server and not from cameras directky

Sorry, could you explain more detail about add to the packages and plugins section of the hassio. I cannot figure out still