Change path to ffmpeg

Is there a possibility to specify the path to ffmpeg?
I’m on a Synology Diskstation and there is a preinstalled ffmpeg which seems to struggle generating previews vom h.265 videos. I would like to use the version provided by the SynoCommunity, but previewgenerator always uses the preinstalled one.

It will be possible to specifiy the path to ffmpeg with Nc26: https://github.com/nextcloud/server/pull/36225

1 Like

@g-work
I found this link for you. The author writes that it is possible to set a parameter “ffmpeg” in config/config.php. Sorry i can not test it for your. Maybe it is an error.

1 Like

I also did find this thread and tried to set the path via config.php. But that didn’t work, previewgenerator still uses the preinstalled version. Also I could’t find any documentation mentioning this parameter. Does anyone know where to find it?

Ok, thanks for the info. Nevertheless it would be nice to have a solution for NC 25.

I would have expected ffmpeg somewhere in the code. But unfortunately I could not find that either. I think you must write an issue e.g. here. Oh you have write an issue. Ok. :wink:

GitHub Issue:

1 Like

My issue got closed, till there will be a solution in NC 26. Fine.
Could anybody give me a hint nevertheless, where I could change the path in the current version? So I could find out if this would be the solution for my problem (previews of h.265/HEVC aren’t generated)?

The answer is simple: you cannot change it below Nc26.

Sorry for being unprecise. I wasn’t looking for a setting but the location in the code. So I found it, merged lines 419 to 434 to my own PreviewManager.php and added 'preview_ffmpeg_path' => '/volume1/@appstore/ffmpeg/bin/ffmpeg', to my config.php. Worked perfectly! I’m now able to view previews of my recorded videos in my Nextcloud for the first time!

If anyone is dealing with outdated/incompatible but uninstallable ffmpeg (e.g. Synology Diskstation), this solution works - at least until the next update :slight_smile:

Thanks to @szaimen for pointing me in the right direction and Jachhj-sc for the patch.