Skip to content
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

Option to download static ffmpeg/ffprobe binaries #1154

Open
joonis opened this issue Apr 21, 2024 · 9 comments
Open

Option to download static ffmpeg/ffprobe binaries #1154

joonis opened this issue Apr 21, 2024 · 9 comments
Labels
feature New feature or request

Comments

@joonis
Copy link

joonis commented Apr 21, 2024

Using a hosted Nextcloud instance you are not able to get video previews if ffmpeg is not installed.

There could be a download button on the memories settings page to get the required binaries from:

https://johnvansickle.com/ffmpeg/
https://github.com/eugeneware/ffmpeg-static

@joonis joonis added the feature New feature or request label Apr 21, 2024
@pulsejet
Copy link
Owner

I'm concerned this might violate TOS of the hosted providers and they might block the app altogether. AFAIK the reason ffmpeg is not available is because it's too resource intensive (i.e. this is intentional)

@2br-2b
Copy link

2br-2b commented May 27, 2024

Maybe you could just do this from the admin panel? That way, not everyone can do this and it avoids this problem

@joonis
Copy link
Author

joonis commented May 27, 2024

There could be some property in the main Nextcloud configuration to prevent the usage of a given download option. This way providers would be able to block this functionality if they really want to. You could also place the binaries in a random folder, so that it cannot be used in other ways except the generation of preview images by memories.

@2br-2b
Copy link

2br-2b commented May 27, 2024

I was thinking that the download option was in the main Nextcloud config; thay way, only an admin can do it, and the binary is only downloaded once for all the users

@joonis
Copy link
Author

joonis commented May 27, 2024

The problem is, that you can do CPU intensive tasks with video processing software. But if it is limited to some preview images, it wouldn't be an issue, imho.

@pulsejet
Copy link
Owner

If you've access to the server, why not directly upload the binaries and point the nextcloud config to it? I'm not seeing see a reason to automate this and make it a lot more complicated.

@2br-2b
Copy link

2br-2b commented May 27, 2024

The key reasons that I see are:

  1. Security - automatic updates to ffmpeg means I don't have to manually keep up to date with security patches; otherwise, this is a security hole waiting to happen. Since (theoretically) any user would be able to upload a video and have ffmpeg generate a thumbnail, if there's a code execution vulnerability discovered in this process, it could be used to escalate privileges
  2. Convenience - not having to edit a file and download the binary. Granted, there's a high chance an admin here already could do those things easily, but it's just easier
  3. User experience - there's a number of google results for how to add ffmpeg to a snap Nextcloud installation, so again, this isn't required. However, it would be a better ux for admins if there was just a "click here to set everything up" button, especially for people just trying out Memories (like myself at first)

The question to me (as someone who hasn't poked around at making nextcloud apps) seems to be "Is this possible given whatever sandbox Nextcloud puts extensions in? If so, is it feasible yo implement?"

I think the best ux solution would be to have this included in the base snap, but it seems this isn't going to happen, so I see this idea as a next-best option. Unless the best option is to make a separate ffmpeg installer Nextcloud app?

@pulsejet
Copy link
Owner

For security, this means that Memories needs to stay on top of ffmpeg updates now, moving the maintenence burden to this repo ;)

I do agree this is more convenient but I can't imagine it being straightforward without being confusing. For instance, people may assume that this version of ffmpeg would work with HWA (which it likely won't) and use this instead. Also semantically, this really isn't a memories-specific problem, so it simply doesn't belong here.

Unless the best option is to make a separate ffmpeg installer Nextcloud app?

This does seem like the best option to me, it can also configure everything automatically for you. It also makes it possible to e.g. disallow this specific app if the provider doesn't want to allow ffmpeg, and is more modular. My understanding is that this problem is non-trivial enough to warrant a separate app (e.g. dependency on libc), and such an app would also be useful for someone who doesn't want to use Memories but wants video previews anyway.

@2br-2b
Copy link

2br-2b commented May 27, 2024

Fair point about the maintenance shift - I had just been thinking to get the latest ffmpeg version, but then if it's not compatible or something happens then you'll be on the hook for that, so I see that.

I don't know if I have the time to learn how to create a nextcloud app just for this, but maybe I'll just write a cron job to get the most recent version every X amount of time and use that. I'll share it if I end up doing that.

Ultimately, thank you so much for this app! It's really nice, and I'll be using it moving forward!

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

No branches or pull requests

3 participants