marcoraddatz / homebridge-docker

Dockerized Homebridge. No plugins pre-defined, hassle-free setup. Read instructions!
Apache License 2.0
127 stars 47 forks source link

ffmpeg compiled with --enable-libfdk-aac / Audio #53

Closed DanielWeeber closed 6 years ago

DanielWeeber commented 6 years ago

Hey, is there a way to install/compile ffmpeg with the flag --enable-libfdk-aac? I need it for Audio support within ffmpeg. Will try a apt-get install libfdk-aac-dev in the Dockerfile hopefully today and give feedback.

just found something: https://github.com/speedyyellow/homebridge-docker/commit/14cbc35da40bc37daddf4271786529f10fd04584

DanielWeeber commented 6 years ago

Unfortunately this is not working. No idea how to do the manual compile

marcoraddatz commented 6 years ago

Have you tried to install it via the install.sh?

DanielWeeber commented 6 years ago

E: Unable to locate package libfdk-aac-dev E: Unable to locate package libfaac-dev Just looking for the correct sources

echo "deb http://www.deb-multimedia.org stretch main non-free" >> /etc/apt/sources.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5C808C2B65558117 apt-get update apt-get -y install ffmpeg libfdk-aac-dev libfaac-dev

This works! What could be the best way to implement it into the docker image?

marcoraddatz commented 6 years ago

The best way would be to fork this project. But I recommend to not implement it in the docker image (as long as you don't restart the container often).

DanielWeeber commented 6 years ago

Frankly I do restart it often, and everyone else does while he/she is setting up his/hers homebridge. Why are you against the implementation? I tried it, but I'm not an expert with setting up docker containers. Could you give me a hint?

marcoraddatz commented 6 years ago

I don't like to blow up software with features that won't be used by most users (they still must be maintained and – in this case maybe not that relevant, but in general – might need more resources, which also results in higher costs) and prefer an architecture with plugins or separated branches.

I by the way restart the container only when a DSM update requires a restart or if there's a new Homebridge version I like to test, so I never got in a situation of frequent container restarts.

If you like to fork the project, you should install the dependencies (ffmpeg libfdk-aac-dev libfaac-dev) right here: https://github.com/marcoraddatz/homebridge-docker/blob/master/Dockerfile#L14

DanielWeeber commented 6 years ago

I have to restart my container every time I change something with the config.json and/or plugins. Will try that, thanks.

We could make this a optional change via .env setting or something like that, if that sounds better to you? I think a homebridge docker module which supports all of the available homebridge plugins is way nicer :) :)

nicholasrobinson commented 4 years ago

I was encountering this issue myself, running an alpine docker-homebridge based image on Synology. To resolve the issue I built a new docker image based on oznu/docker-homebridge with FFmpeg copied from alfg/ffmpeg.

See https://hub.docker.com/r/nicholasrobinson/ffmpeg-homebridge or https://www.github.com/nicholasrobinson/ffmpeg-homebridge for more details. To get the fix on Synology, just stop your existing homebridge container and replace it with nicholasrobinson/ffmpeg-homebridge.

maisun commented 4 years ago

I was encountering this issue myself, running an alpine docker-homebridge based image on Synology. To resolve the issue I built a new docker image based on oznu/docker-homebridge with FFmpeg copied from alfg/ffmpeg.

See https://hub.docker.com/r/nicholasrobinson/ffmpeg-homebridge or https://www.github.com/nicholasrobinson/ffmpeg-homebridge for more details. To get the fix on Synology, just stop your existing homebridge container and replace it with nicholasrobinson/ffmpeg-homebridge.

Would it be possible to get FFmpeg from this image: jrottenberg/ffmpeg:vaapi? This will support hardware accelerated transcoding with vaapi. Alternatively https://github.com/jellyfin/jellyfin-ffmpeg can also do that...