SOLVED Nextcloud Video Converter FFMPEG not found

vidx

Dabbler
Joined
Oct 16, 2021
Messages
40
I have a new Nextcloud (22.2.2) jail installed from the list of official plugins in the Truenas GUI. Installed the Video Converter app in the hope to reduce the size of some of family videos through the interface. However I get an error while trying to convert with ffmpeg not installed.

Capture.JPG

Checking from root@nextcloud, I could see ffmpeg is installed and working

Code:
root@nextcloud:~ # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin

root@nextcloud:~ # which ffmpeg
/usr/local/bin/ffmpeg

root@nextcloud:~ # ffmpeg
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)



Any idea what settings I need to change to get the converter to work?
 
Joined
Jan 4, 2014
Messages
1,644

vidx

Dabbler
Joined
Oct 16, 2021
Messages
40
I figured it out. Hope this will help others in the same situation. Not the most elegant solution but it got the job done.

Code:
root@nextcloud:/usr/local/www/nextcloud/apps/video_converter/lib/Controller # ee ConversionController.php


Near the end of the file, change the code to run from the absolute path of ffmpeg, which is /usr/local/bin/ in my case.

Code:
  $cmd = " /usr/local/bin/ffmpeg -y -i ".escapeshellarg($file)." "
 

Sandman0984

Cadet
Joined
Mar 20, 2019
Messages
1
I solved this by simply linking ffmpeg from "/usr/local/bin/ffmpeg" to "/usr/bin/ffmpeg".
ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
I'm making an assumption by saying that the video_converter app is looking for ffmpeg in the default Linux bin location, which is "/usr/bin/ffmpeg". This solution worked great for me on TrueNAS. This way you don't have to modify the .php file every time you update the video_converter app in Nextcloud.
 
Top