Skip to content

feature: add ffmpeg #2391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

realies
Copy link

@realies realies commented Feb 18, 2025

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.

Signed-off-by: realies <[email protected]>
@joshtrichards
Copy link
Member

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.

@realies
Copy link
Author

realies commented Feb 24, 2025

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

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.

@mateuszdrab
Copy link

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?

@prairietree
Copy link

prairietree commented Apr 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants