LMS-Community / slimserver-platforms

Platform-specific build tools for Lyrion Music Server
48 stars 41 forks source link

Feature Request: Optional install ffmpeg in docker container #21

Closed oweitman closed 3 years ago

oweitman commented 3 years ago

An option via environment to install ffmpeg in the docker container would be nice

mherger commented 3 years ago

How would you use it? Couldn't whatever uses it, provide it? Eg. a plugin?

oweitman commented 3 years ago

The PlayHLS v1 plugin needs ffmpeg See install instructions https://forums.slimdevices.com/showthread.php?103158-Announce-PlayHLS-Plugin-plugin-to-play-Apple-HLS-m3u8-stream&p=807654&viewfull=1#post807654

mherger commented 3 years ago

Ok, that's not an exotic plugin after all. I'll look into this.

mherger commented 3 years ago

The next 8.2 build should come with ffmpeg in the image.

oweitman commented 3 years ago

Thank you

mherger commented 3 years ago

Unfortunately adding ffmpeg tripled the Docker image size. We'll have to find some other solution, eg. add a custom build with only the codecs we need. I removed it again, I'm sorry to say.

oweitman commented 3 years ago

Is it possible to make the install optional via docker environment variable as I wrote in my original request?

oweitman commented 3 years ago

Which codecs do we need? I can look for a script to make a minimal build . But anyway this should only be included with an optional switch

In this file the Compiler options are defined to enable disable modules

https://github.com/FFmpeg/FFmpeg/blob/master/configure

please can you or anybody else check the following file for a audio only build of ffmpeg https://github.com/acoustid/ffmpeg-build/blob/master/common.sh

michaelherger commented 3 years ago

Is it possible to make the install optional via docker environment variable as I wrote in my original request?

This got me thinking: what if the startup script checked a file custom-init.sh, and executed it if it was available before launching LMS? This would allow you to install whatever you want in the image. I have a POC working, but wanted to check with you whether that would serve your purpose?

Docker images are "defined" at build time. The purist would never install anything after deploying an image. But adding a hook for a custom script shouldn't hurt the purist, but give you enough flexibility to add whatever package you want.

mherger commented 3 years ago

Ok, hook should be part of the next build. Stay tuned!