Comments (15)
Hi Michael,
Additional packages can be installed using the -e PACKAGES
environment variable.
-e PACKAGES - Additional packages to install (comma separated, no spaces) e.g. -e PACKAGES=ffmpeg,openssh
For example:
docker run --net=host -v <path/to/config>:/config -e "PACKAGES=ffmpeg" oznu/homebridge
from docker-homebridge.
Hi Oznu,
I'm trying to get ffmpeg going, I followed the instruction and manage to get cameras show up on Accessories but there's no feed.
I'm getting the following error, please see below - which tells me ffmpeg is not installed in the right path.
I just want to confirm, is this syntax right...
docker run --net=host -v /home/pi/homebridge/config:/config -e "PACKAGES=ffmpeg" oznu/homebridge
Error: standard_init_linux.go:195: exec user process caused "exec format error"
RPI CONFIG PATH
/home/pi/homebridge/config
ERROR MESSAGE
homebridge_1 | events.js:183 homebridge_1 | throw er; // Unhandled 'error' event homebridge_1 | ^ homebridge_1 | Error: spawn ffmpeg ENOENT homebridge_1 | at _errnoException (util.js:1022:11) homebridge_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
from docker-homebridge.
What plugin are you using? ffmpeg
gets installed to /usr/bin/ffmpeg
.
/homebridge # ffmpeg
ffmpeg version 3.2.9 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Alpine 6.3.0)
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libmp3lame --enable-librtmp --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-x11grab --disable-stripping --disable-static --enable-vaapi --enable-libopus --disable-debug
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Hyper fast Audio and Video encoder
/homebridge # which ffmpeg
/usr/bin/ffmpeg
from docker-homebridge.
I got the plugin installed but can't get ffmpeg install in the container
from docker-homebridge.
from docker-homebridge.
from docker-homebridge.
It will, but you should only do that if running on a Raspberry Pi. You didn't mentioned which platform you were running which is why I removed my initial responses as I had just made an assumption.
This error is usually caused by running the wrong architecture:
Error: standard_init_linux.go:195: exec user process caused "exec format error"
Which led me to believe you were running on a Pi.
from docker-homebridge.
from docker-homebridge.
Make sure your running with the raspberry-pi
tag and it should work:
docker run --net=host -v /home/pi/homebridge/config:/config -e "PACKAGES=ffmpeg" oznu/homebridge:raspberry-pi
from docker-homebridge.
I gave it a shot but I'm still have the same error (Error: spawn ffmpeg ENOENT), I'm confused as to why this is happening considering I got it installed in the right container i think....
homebridge_1 |
homebridge_1 | ┌────────────┐
homebridge_1 | │ 031-45-154 │
homebridge_1 | └────────────┘
homebridge_1 |
homebridge_1 | [2018-1-18 15:44:25] Homebridge is running on port 51826.
homebridge_1 | [2018-1-18 15:44:25] Street is running on port 45885.
homebridge_1 | Snapshot -i http://192.168.1.64/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=abcd123456&user=admin&password=0162855518 -t 1 -s 480x270 -f image2 -
homebridge_1 | events.js:183
homebridge_1 | throw er; // Unhandled 'error' event
homebridge_1 | ^
homebridge_1 |
homebridge_1 | Error: spawn ffmpeg ENOENT
homebridge_1 | at _errnoException (util.js:1022:11)
homebridge_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
homebridge_1 | at onErrorNT (internal/child_process.js:372:16)
homebridge_1 | at _combinedTickCallback (internal/process/next_tick.js:138:11)
homebridge_1 | at process._tickCallback (internal/process/next_tick.js:180:9)
homebridge_1 | *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
homebridge_1 | *** WARNING *** Please fix your application to use the native API of Avahi!
homebridge_1 | *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
homebridge_1 | *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
homebridge_1 | *** WARNING *** Please fix your application to use the native API of Avahi!
homebridge_1 | *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
homebridge_1 | [2018-1-18 15:46:50] Loaded plugin: homebridge-camera-ffmpeg
homebridge_1 | [2018-1-18 15:46:50] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
homebridge_1 | [2018-1-18 15:46:50] ---
homebridge_1 | [2018-1-18 15:46:50] Loaded plugin: homebridge-dummy
homebridge_1 | [2018-1-18 15:46:50] Registering accessory 'homebridge-dummy.DummySwitch'
homebridge_1 | [2018-1-18 15:46:50] ---
homebridge_1 | [2018-1-18 15:46:50] Loaded plugin: homebridge-config-ui-x
homebridge_1 | [2018-1-18 15:46:50] Registering platform 'homebridge-config-ui-x.config'
homebridge_1 | [2018-1-18 15:46:50] ---
homebridge_1 | [2018-1-18 15:46:50] Loaded config.json with 0 accessories and 1 platforms.
homebridge_1 | [2018-1-18 15:46:50] ---
homebridge_1 | [2018-1-18 15:46:50] Loading 1 platforms...
homebridge_1 | [2018-1-18 15:46:50] [Camera-ffmpeg] Initializing Camera-ffmpeg platform...
homebridge_1 | Setup Payload:
homebridge_1 | X-HM://0023ISYWYK25O
homebridge_1 | Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
from docker-homebridge.
I have this tested this and it's working.
# get the latest image
docker pull oznu/homebridge:raspberry-pi
# start container - add your local volume to the command
docker run -d --name=homebridge -e "PACKAGES=ffmpeg" --net=host oznu/homebridge:raspberry-pi
# add ffmpeg plugin
docker exec homebridge yarn add homebridge-camera-ffmpeg
Set this config.json
, using a public rtsp stream for testing since I don't have any local feeds:
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:12",
"port": 51826,
"pin": "031-45-150"
},
"accessories": [],
"platforms": [
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Test Camera",
"videoConfig": {
"source": "-re -i rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov",
"stillImageSource": "-i https://www.wowza.com/images/playvideoBtn.jpg",
"maxStreams": 2,
"maxWidth": 640,
"maxHeight": 480,
"maxFPS": 10
}
}
]
}
]
}
Restart the container, add camera to Home app, view video feed.
It's very very slow on my Raspberry Pi 3.
from docker-homebridge.
I don't know why I'm still getting Error: spawn ffmpeg ENOENT. I did everything right i think. I ran the following again and it's telling me all installed...
#get the latest image
docker pull oznu/homebridge:raspberry-pi
#start container - add your local volume to the command
docker run -d --name=homebridge -e "PACKAGES=ffmpeg" --net=host oznu/homebridge:raspberry-pi
#add ffmpeg plugin
docker exec homebridge yarn add homebridge-camera-ffmpeg
permitted by applicable law.
Last login: Fri Jan 19 09:23:48 2018 from 192.168.1.76
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi@raspberrypi:~ $ cd /home/pi/homebridge
pi@raspberrypi:~/homebridge $ docker pull oznu/homebridge:raspberry-pi
raspberry-pi: Pulling from oznu/homebridge
Digest: sha256:da139868db7d954f4a6beb2abdfb1a166c95a38f3ac4ebaee0195f6ad0895ab4
Status: Image is up to date for oznu/homebridge:raspberry-pi
pi@raspberrypi:~/homebridge $ docker run -d --name=homebridge -e "PACKAGES=ffmpeg" --net=host oznu/homebridge:raspberry-pi
docker: Error response from daemon: Conflict. The container name "/homebridge" is already in use by container "c62093131f937f2cd03d4335e80d602482055f4a1db6ade8b82a29b8c2a92535". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
pi@raspberrypi:~/homebridge $ docker exec homebridge yarn add homebridge-camera-ffmpeg
Error response from daemon: Container c62093131f937f2cd03d4335e80d602482055f4a1db6ade8b82a29b8c2a92535 is not running
pi@raspberrypi:~/homebridge $ docker exec homebridge yarn add homebridge-camera-ffmpeg
Error response from daemon: Container c62093131f937f2cd03d4335e80d602482055f4a1db6ade8b82a29b8c2a92535 is not running
pi@raspberrypi:~/homebridge $ docker-compose exec homebridge yarn add homebridge-camera-ffmpeg
yarn add v1.3.2
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The engine "homebridge" appears to be invalid.
warning [email protected]: The engine "homebridge" appears to be invalid.
warning [email protected]: The engine "homebridge" appears to be invalid.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved 1 new dependency.
└─ [email protected]
warning No license field
Done in 7.41s.
pi@raspberrypi:~/homebridge $
from docker-homebridge.
Hi @oznu I have a few noob questions...
- should I be running the following syntax in
pi@raspberrypi:~/homebridge
orpi@raspberrypi:~ $
directory
#get the latest image
docker pull oznu/homebridge:raspberry-pi
#start container - add your local volume to the command
docker run -d --name=homebridge -e "PACKAGES=ffmpeg" --net=host oznu/homebridge:raspberry-pi
#add ffmpeg plugin
docker exec homebridge yarn add homebridge-camera-ffmpeg
-
PACKAGES=ffmpeg does this install the ffmpeg or do I have to install ffmpeg in the raspberry pi root directory on the side?
-
I notice the > add ffmpeg syntax is different from what's listed in your general tutorial
docker exec homebridge yarn add homebridge-camera-ffmpeg
anddocker-compose exec
is this intentional?
basically, you have excluded "-compose " in your previous post.
from docker-homebridge.
Hi @jeylites,
docker
and docker-compose
are two different methods to get the same docker container running, but I think this is where the issue is.
Try this.
Clean up your existing setup:
docker rm -f $(docker ps -aq)
docker system prune -f
Follow the guide to setup using docker-compose
exactly:
The only thing you need to adjust is the docker-compose.yml
manifest, which needs to include the PACKAGES
environment variable:
version: '2'
services:
homebridge:
image: oznu/homebridge:raspberry-pi
restart: always
network_mode: host
volumes:
- ./config:/homebridge
environment:
- PGID=1000
- PUID=1000
- PACKAGES=ffmpeg
from docker-homebridge.
Hi @oznu
Sorry for the delay in writing back. I followed your instructions and got it working. You are right, It's very slow on a Raspberry Pi 3.
Just wondering, what kind of hardware you will suggest running this setup on? - ffmpeg & oznu docker homebridge. I would like to try to see the performance.
The cleanup tip is a big saver. Previously, I have been re-imaging my SD to start all over. Very painful process sigh
Clean up your existing setup:
docker rm -f $(docker ps -aq)
docker system prune -f
The other thing is, what will be the syntax to remove a container from docker?
THANK YOU!
from docker-homebridge.
Related Issues (20)
- 1.7.0 requires Node.js v18.15.0 or later but Docker image has Node.js v18.13.0 HOT 4
- Can't start running LibreElec HOT 1
- GHCR mirror HOT 4
- Node.js Upgrade HOT 4
- Homebridge 1.7.0 not available on Dockerhub HOT 5
- Docker hub url is incorrect HOT 1
- [Regression] No versioned tags available HOT 3
- Automated build process needs to create a release package HOT 2
- Add Docker tag in footer HOT 2
- Homebridge failed to install using the Homebridge on Portainer guide HOT 7
- Exposing port 8000 HOT 3
- docker publish should has a version tag not just ubuntu HOT 7
- QNAP Installation with Container Station 3 - Wiki Updates HOT 6
- Homebridge keep restarting after update HOT 3
- IPv6 issue on first run. Need to disable IPv6 in container HOT 3
- Step by Step process to upgrade Node.js and Homebridge HOT 4
- Node errors in logs when starting container with Portainer HOT 2
- Lost configuration after container restart / host reboot HOT 2
- mDNS in a Docker container HOT 4
- `UIX_CUSTOM_PLUGIN_PATH` env var has no effect HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-homebridge.