FFMPEG problem on installation

32 replies [Last post]
Joined: 03/29/2009
Points: 764

From Roger:

Using the CE v. 1.5 - Linux 386.

the issue is during the install, the message about FFMPEG not being able to run comes up.

I have been able to run every single video application (ffmpeg, mencoder, LAME, libogg/vorbis, and so on...).

I double checked and the server is fully ffmpeg (there are other video sites running on the server right now).

I contacted support, and they told me part of the issue is all the extra packages included in the .../bin directory and so on. They said that web servers generally will not permit that as ffmpeg is already a preinstalled standard (that applications need to use those, they cannot run their own).

So... what files do I need to edit so that they point to the correct files in /usr/bin instead of pointing to the packaged "bin" files?

Better still, where can I get the package without the ffmpeg, mencoder, etc. (as these are already standard in web server installs)?

Joined: 03/29/2009
Points: 764

There's not CE version without the ffmpeg binaries.

To edit the ffmpeg path you should look at ~/kaltura/alpha/config/kConf.php

Joined: 09/10/2009
Points: 12

The file ~/kaltura/alpha/config/kConf.php does not exist.

Here's what's in that directory:

config.php
generated-schema-transformed.xml
propel.ini
properties.ini
rsync_exclude.txt
schema.yml

No kConf.php file. Is there another file somewhere I can edit? Or, where can I get a copy of kConf,php?

Thanks.

Joined: 01/05/2009
Points: 1697

Hi there,

*After* installation the library kalturaCE\kaltura\alpha\config will include a file called kConf.php
Change the following line: "bin_path_ffmpeg" => $bin_path . "ffmpeg/ffmpeg" ,

Joined: 09/10/2009
Points: 12

You cannot install unless the FFMPEG issue is resolved. So... I need to tell Kaltura where FFMPEG is *before* installation (or the installation cannot proceed).

Currently, FFMPEG (including ffmpeg-php), mencoder, etc. is pretty much a standard on web servers. So... whatr is the fix for this?

Thanks for your help.

Joined: 05/13/2009
Points: 164

One way that I've heard of people approaching the problem of using their distribution's ffmpeg binaries is by running:

$ which ffmpeg
$ which mencoder

and then using the file paths returned to replace the Kaltura binaries from the zip file with links.

Just a thought; I haven't tried it myself. I've done it the other way around: from an svn checkout with out binaries, I've copied the executables from the zip file and the server has worked.

Joined: 09/10/2009
Points: 12

Thanks, trying that now...

Joined: 01/05/2009
Points: 1697

Roger

Andrew (papyromancer) suggested a solution that is the easiest - use symlinks to point to your paths.

Joined: 09/10/2009
Points: 12

Hmm... seems like something is hard coded, somewhere in the script? (That forces the Kaltura binaries?)

For example, SSH to server shows:

#which ffmpeg
/usr/bin/ffmpeg
#

So... I created the symlink:

#ln -s /usr/bin/ffmpeg /home/xxxxxxxxxxx/public_html/kaltura/bin/ffmpeg/ffmpeg
#

Note: Every other video based package (PHPmotion, etc.) finds and uses video related files in /usr/bin/... no problem.

I make sure I chown the symlink to the correct group (leaving it as 'root' did not work, leaving it as apache 'nobody' did not work either).
I even chmod 777 (the symlink).

Now to the browser, I still get:

Could not run FFMPEG.  FFMPEG is crucial for converting media to FlashVideo format.  The system should be able to run the script located at:
/home/xxxxxxxxxxx/public_html/kaltura/bin/ffmpeg/ffmpeg - please make sure apache can run that script.

So it seems to me there is something hard coded somewhere to force the directory location(s)?

Joined: 05/13/2009
Points: 164

My next suggestion is to try a clean install and use the Kaltura provided binaries.

I have a feeling that the read and execute permissions on your ~/kaltura/bin/ffmpeg/ directories is not allowing the webserver to find/execute the link or the executable.

One way to check that is to sudo su <www-username> and then try running the ffmpeg link or binary with a --version call on the end to make sure that it is executable by the webserver.

Joined: 09/10/2009
Points: 12

Yes you are correct, "...~/kaltura/bin/ffmpeg/ directories is not allowing the webserver to find/execute the link or the executable..." because the server MUST use the installed binaries (that are now standard with such web servers).

The server is cPanel based. Also, allowing binaries to be run from other locations is a security risk; also making it difficult to ensure duplicate packages in different location are maintained.

I have tried several other video packages (for pay and open source). They all work and use the binaries provided by the server (this is one way, in actual practice, how I know the server installed binaries work).

Currently all the extra binaries are just wasted space on the server (as again, these are already standard on professional web servers).

If I manually start overwriting security, installation and update directives, that will break the server (as these are already managed and provided via cPanel/WHM).

On a personal note (to the Developers), I can appreciate the incredible amount of time and work that went into producing this package - Kudos!! Great job!!!! My only suggestion (if I may be so bold), please look at how the world (Internet) has moved on. We don't need all these binaries with the package anymore, as they are standard on properly (and professionally) installed servers. I am just one person who has voiced this out loud, for every one of us, there are probably hundreds who remain silent and just move on to other packages. - Food for thought. ;)

However, back to your suggestion. I really appreciate you taking the time to respond and provide suggestions - Thanks!

What is a "version call". I'm an Ubuntu user, but the web server is CentOS. I can log into the server with a root account and run ffmpeg (for example), but what is the "version call". Side note... Yes, I can temporarily permit my (non-root) account (the www-username one) to log in and run commands (once I know what the "version call" is).

Thanks

Joined: 05/13/2009
Points: 164

I was just working off memory, recalling how I add -v or --version when I specifically don't want a program to do anything except tell confirm that it runs an d spit out what version of the software is installed (after a couple of accidents with accidentally executing programs with terrifying consequences which I prefer not to mention ;).

It looks like my ffmpeg binary from macports is setup to spit out it's version on every run because --version is listed as an invalid argument:

papyromancer@james:~$ ffmpeg --version
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.0 --arch=i386
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    1. 4. 0 /  1. 4. 0
  libswscale     1. 7. 1 /  1. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Sep 13 2009 10:31:18, gcc: 4.0.1 (Apple Inc. build 5490)
ffmpeg: missing argument for option '--version'

As far as running KalturaCE in a shared hosting environment, this isn't currently supported. I'm assuming this is because the system is fairly resource intensive and runs best on a dedicated server, or virtualized dedicated server.

I know that Kalturian is actively looking for people to test running Kaltura in a shared server environment, but I've never seen it successfully done, and I've abandoned shared hosting for my projects long ago.

Joined: 09/10/2009
Points: 12

Thanks Andrew.

Oh, yes the version, I forgot O_o about the --v switch . Thanks! :)

One thing to help the developers, this is not a shared hosting environment. This is a VPS.

The key issues (and I hope they are reading this) are as follows:

1. The VPS is WHM/cPanel, which means that cPanel cron scripts update the server and packages daily, etc.

2. Security is configured and controlled by WHM/cPanel, as such any accounts placed on the domain are chrooted (unless configured otherwise via WHM).

3. All required video related binaries are already installed on the VPS (that's now a standard in the hosting industry here).

4. This is the very first time (I'm not kidding) video package that does not work on any of the servers. All the others work and they don't include binaries as the developers (and their documentation) indicate the installed binaries (that are on the server) are used. (This also saves a lot of HDD space).

5. I can log into the server as a regular (non-root) account and still run applications (such as ffmpeg). Apache's account can also run video related applications.

6. If I reinstall the server the way Kaltura wants, then it will actually break the server (WHM/cPanel gets broken as does all the scripting, and security becomes a critical issue!)

I hope this helps the developers.

Joined: 05/13/2009
Points: 164

cPanel is the epitome of what I consider to be shared hosting: "cPanel was originally designed as the control panel for Speed Hosting [1], a now-defunct web hosting company." http://en.wikipedia.org/wiki/CPanel#History

To get the current alpha release of Kaltura CE running you're going to have to tweak those directories permissions.

I'm sure your hard work in tracking down the error will benefit the developers as I've heard that they'd like to have a future version support quick and easy installation within cPanel, Plesk, Webmin, and any other host management systems that are out there.

Write down every step you have to take to get those binaries executable for your web server, paste that into this thread, and the solution will be readily available to all other cPanel/CentOS users. And the devs will have excellent documentation to guide them in supporting that specific installation.

Joined: 09/10/2009
Points: 12

*Bump*

Joined: 09/10/2009
Points: 12

*Bump*

Can any of the developers, or anyone, please help with this?

Thanks.

Joined: 03/29/2009
Points: 764

Hi,

Thanks for posting it, we are reviewing it and will address it soon.

Joined: 10/17/2009
Points: 75

I've had the same issue until I realized that my VPS was running a 64bit OS and thus I had to download the 64bit kalturaCE package.

Of course your case might show the same symptoms but have different underlying issues but I'm posting this in case you might have missed to check for this.

Joined: 11/06/2009
Points: 3

Hello!
I am a beginner Kaltura.

Installing Kaltura has encountered an error:
Could not run FFMPEG. FFMPEG is crucial for converting media to FlashVideo format. The system should be able to run the script located at:
/var/www/kaltura/bin/ffmpeg/ffmpeg - please make sure apache can run that script.

Using a server Ubuntu 9.10 Server 32bit.
Root is active. but I can not run this ffmpeg in the installation folder of Kaltura.

I am are able to run ffmpeg and mencoder present in the original folder:
/usr/bin/mencoder
/usr/local/bin/ffmpeg

I can use these?

Forgive my Google-English :-)

Thank you!
greetings Acar83

Joined: 05/13/2009
Points: 164

Hey Acar,

It sounds like your webserver isn't able to run the executables shipped with KalturaCE. You'll need to see if an error is thrown when you log into a terminal and run:

$ sudo su www-data
$ /yourkalturaCEpath/pathto_executable/ffmpeg

I believe that www-data is the default user for Apache in Ubuntu, but I'm not sitting in front of a CE directory tree--you should be able to dig through and find the ffmpeg script. Let me know if you have any troubles.

Joined: 09/10/2009
Points: 12

@Acar83

Don't use this package. I tried some time ago and never got help that worked. The only person that tried to offer any realistic help was papyromancer; the developers did nothing to help in this issue.

I worked with the server people (at this end) as well as programmers and they all said that the extra packages that come with Kaltura are not needed (as ffmpeg, ffmpeg-php, flv, etc.) capability is standard.

Also they indicated that in order to make this work, the security of the server would be effected; particularly if WHM/cPanel is used to manage your Dedicated or VPS server.

Additionally, this would break the application/file update and patch update scripting on such servers.

I did ask if there was a version without all the extra files (such as provided by ostube, phpMotion, etc.)

I never got a reply as to when it would be available. I'm pretty sure the developers are very busy, so it would be unrealistic to expect a fix to this issue.

Since the original post to this thread, Sep. 10, 2009, this has been tested on 12 different servers (by 9 different people I talked to), unfortunately all with the same result; that it did not work.

Joined: 11/06/2009
Points: 3

It seems absurd that one can not choose the packages to be used.

My server has already ffmpeg with libx624, mencoder ffplayer and fflv2 configured correctly. ClipShare and mwmediashare works fine. why Kaltura use only its files.

solution exists?

Joined: 11/06/2009
Points: 3

if I edit the file requirements.php?

Joined: 09/10/2009
Points: 12

@Acar83

That's the same issue here - servers are standard with flv2, mencoder, ffmpeg, and so on...

We've tried editing the files, in our case (on all servers we tried), this did not work.

As I mentioned, we've been able to get other packages working no problem.

In hind sight, executables should NOT be shipped with KalturaCE, instead it should use the ones already installed (as a standard) in servers.

Joined: 02/01/2010
Points: 1

Same problem for me. Wanted to install Kaltura on Ubuntu 9.10 and get the same error as you. Tried to install ffmpeg but nothing change.

So sorry, I really wanted to use Kaltura alongside of my Moodle server.

-dajan

Joined: 09/10/2009
Points: 12

The sad thing I found it so frustrating to try and get it to work (I never did).

I've had several people try to get it working on several different physical and virtual servers, but they could not get it working either.

To date the biggest issues were security (and access rights), of which every single person wondered why ffmpeg, ffmpeg-php, flv, etc. are being bundled with this as they are standard components of web servers (Apache). Web server security forces the use of installed systems and will not permit external packages to override the installed (and maintained ones). The servers are being managed by tools such as Plesk, cPanel, etc. which also ensure packages, modules, and so forth are maintained as up-to-date. They also ensure security and that Apache plugins, modules, and the like are properly accessed and loaded. I was actually able to break a couple servers by forcing them (I had to edit a lot of files) to use the bundled Kaltura packages. When the next server updates came though, one server failed and the other reverted all the changes back to what they should be and ffmpeg no longer worked properly anymore.

This became evident when testing on dedicated and VPS servers. What makes things sadder is when I can see that other packages such as OStube, PHPmotion, etc. all run with no or minimal problems.

Above all, I really did want to get this working and it was a bummer that I could not. At times I got so frustrated that I had to go and do something else for a while. (That was upsetting).

I really hope the developers consider a version without all the bundled stuff (the way others do it).

Joined: 10/06/2009
Points: 16

On vps/Centos5 but I believe work with all distros with root access

chgrp apache /home/kalturace/public_html/kaltura/bin

Joined: 09/10/2009
Points: 12

It's not a good security procedure to grant root access on a web server that is accessible to the public. That is why web servers do not run as root. Instead they run as 'nobody' or 'www-data', etc. with limited access rights. Changing that or adding root is asking for trouble.

Joined: 03/27/2010
Points: 2

What finally worked for me was kalthurian's suggestion (thank you!) to edit installdir\kalturaCE\kaltura\alpha\config\kConf.php.

That solution, with its backslashes, also provides a hint to the source of many, many other problems -- the "community edition" seems to be targeted toward desktop windoze (LAMPP or XAMPP in particular). There will of course be problems as you move it to a real server...

No disrespect, there's been some good work done on this project, but I sometimes wonder about why I'm struggling with it. Just discovered that user management in CE is only available through the api, the moodle plugin has some quirky gotchas, it doesn't like streaming from my flumotion server, and ogg theora seems out of the question. Am I really doing all this for slightly simplified management of flash files for progressive download?

Aargh. Time to go for a walk...

Joined: 01/05/2009
Points: 1697

Dear Jonathan,

You raise very strong points and good features we are taking very seriously and are working feverishly to fix and add.

The next version of CE that is about to release in the following weeks will include many of these additions like multiple flavors and better installation process.

While Windows based Lampp and Xampp are widely used and very known deployment stacks, Kaltura is first tested on Ubuntu and Fedora with various apache installation variations.

Please submit all feature requests and bug issues on the project tracker - http://www.kaltura.org/project/issues/418

Thanks!

Zohar.

Joined: 04/07/2010
Points: 4

I'm having the same issue on my dreamhost hosted install. I would love to see this resolved. Thanks for all the advice here. Do you have a timeline for the newest release?

Joined: 04/22/2010
Points: 1

I have this same problem as well. I'm using a WHM/Cpanel system.

Joined: 04/28/2010
Points: 1

Same problem here, when will the new releases be out?