docker icon indicating copy to clipboard operation
docker copied to clipboard

feature: add ffmpeg

Open realies opened this issue 10 months ago • 4 comments

It would be nice if I don't have to carry my own CI for this.

I understand the security considerations around preview generation mentioned in the examples documentation. However, I believe FFmpeg belongs in the base image alongside ImageMagick because:

  1. It's already a recommended component in the official "full" example
  2. Like ImageMagick, it's a core media processing dependency
  3. Users can still disable preview generation for high-security deployments
  4. Having it in the base image reduces duplicate CI efforts while maintaining the ability to control its usage

The change is minimal and follows the pattern of including essential media processing tools while letting administrators control their usage through Nextcloud's configuration.

realies avatar Feb 18 '25 19:02 realies

It also adds something like ~500MB to the image size last I checked. ;-)

Between that and:

  • it being easy enough to do a build directly within a Compose file (no need to build+upload an image via CI)
  • more regular use of Imaginary for offloading preview generation these days with Nextcloud (which embraces the micro-services model)

I'm not sure if it's even as important as it once was. So I'm currently against adding it to the base image.

joshtrichards avatar Feb 24 '25 15:02 joshtrichards

It adds 133.56 MB to the amd64 and 120.19 MB to the arm64 latest images right now.

  • https://hub.docker.com/_/nextcloud/tags?name=latest
  • https://hub.docker.com/r/realies/nextcloud/tags?name=latest

It's not particularly difficult to make custom solutions for this, but:

  • doing a build directly within a Compose file does not work great with a lot of auto-update systems that just check upstream for a new image
  • does not depend on other services
  • is not a workaround

The idea of this PR is to bring a dependency for a Nextcloud functionality that requires it. Similarly to how ImageMagick is included.

realies avatar Feb 24 '25 17:02 realies

It would be nice if ffmpeg was built into the image or the full build was made available.

I've been building my own image from the .examples/dockerfiles/full/apache/ file for years due to the need for video previewers and other functionality.

Compose approach won't work for me because I'm running Kubernetes

Regarding Imaginary, I don't think it can provide thumbnails for video files, can it?

mateuszdrab avatar Apr 08 '25 12:04 mateuszdrab

I am also building my own image to include ffmpeg. And I just came here to look at the Dockerfile to see if that was still needed. So I would like to have it in the base image but I can see the argument for keeping the size down. I also had a bit of configs to get previews to generate correctly. Also I got preview:pre-generate running on the host. The solution to all these might be to have another docker image that is focused a little more on media.

I have not used Imaginary. Looking into it just now the only thing I could find that seemed to be being kept updated was https://hub.docker.com/r/nextcloud/aio-imaginary/tags but I could not find much documentation on it. The only thing I found was this old post https://okxo.de/speed-up-nextcloud-preview-generation-with-imaginary/.

Looking at the AIO Imaginary Docker file (https://github.com/nextcloud/all-in-one/blob/main/Containers/imaginary/Dockerfile) it does not include ffmpeg. I also could not find any documentation on what file formats it supports.

If anyone has more information on Imaginary let me know. Given the lack of documentation and up-to-date examples I am not to inclined to spend much time on trying to get it to work and testing out what it can do.

prairietree avatar Apr 19 '25 02:04 prairietree