Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

New Feature: Audio and Video


150 Posts   24916 Views


21 May 2009 at 4:27am 4085 Posts

Some people have reported this problem, that PHP is having a hard time running shell scripts. To confirm that it's not, try:

echo exec('ffmpeg'); in your config.php, and see that it returns nothing.

I'm currently implementing a more robust way of executing shell scripts to the FLV class. Sit tight, should have something soon. I'll post it on my bug reports thread.


21 May 2009 at 9:53am Community Member, 164 Posts

My local server is an Intel Xserve running Leopard Server with entropy php.

I compiled ffmpeg with --enable-shared and then compiled ffmpeg-php and everything went well I now have a file linked to as an extension in my php.ini.

Apache gives me an error about it though and won't load the so I can't get it to work after working on it for about 5 hours.

I guess I will have to make a way to upload my own thumbnail for use with the popup since I cannot get the ffmpeg to work and I probably won't get it to work on the production box either.

I think that many people will run into a problem with being able to get this to work with ffmpeg so while those who it does work for have really nice functionality most of us will have to hack it to work.

Any ideas on another way to do this?


21 May 2009 at 10:48am 4085 Posts

Yes, I very much anticipated these sorts of issues. We've introduced a whole slew of variables by relying on a third party product to work properly in a uniquely configured server environment.

Sorry you've sunken so much time into it. Two things I can say right now.

1) As seen in the bug reports thread, I am changing the exec() function to something more robust and compatible that may resolve the issue.

2) I'm also going to add a way to echo out the shell commands that are run, so you can go to your command line and try them yourself to see if it's just a bad command or if it's a good, working command that is being executed improperly, or not at all, by PHP.

I can tell you, though. I have it set up on two different servers for two different clients right now, and it's working awesome. Clients are nuts about it, too. If we can iron out these kinks, I really think we have a game-changer on our hands. :)


21 May 2009 at 10:53am Community Member, 164 Posts

Even though there might be some issues with how you are running the scripts. It seems that the problem I am having is outside SilverStripe alltogether and that it is just so difficult to install ffmpeg on my server and get php to load the So even if your code was perfect I still wouldn't be able to get it to work.

How do you go about installing ffmpeg? Or is it usually already there when you want it on the servers you use?


21 May 2009 at 2:52pm (Last edited: 21 May 2009 2:52pm), 4085 Posts

At Bluehouse Group, we had our sys admin guy do it. I can ask him what he did. Took him all of 30 seconds as I remember. My other server is on Site5, where it is pre-installed for all shared hosting accounts.
<br >

I'm very much learning as I go here, though, as you can probably tell.


22 May 2009 at 8:01am (Last edited: 22 May 2009 8:01am), 4085 Posts

Just got this from my sys admin. Maybe it helps.

What OS are you running on your server? If it's CentOS/RHEL-like, there
is a repository called RPMforge that has all the packages you need.
Basically, you go to their site, download and install the
rpmforge-release package to install the repository, then just run 'yum
install ffmpeg', which will pull in any other dependencies it needs.


23 May 2009 at 6:51am Community Member, 63 Posts

Great work once again UncleCheese. I have been using a custom video page for many clients. I used Flowplayer for my player. It accepts a few more formats than just flv. But the initial integration can be a bit tougher than Long Tail. Just a thought though.

I Will be using this in the near future.


23 May 2009 at 8:18am Community Member, 164 Posts

@Uncle Cheese.

Thanks for the info. My staging server is running OSX Leopard Server so it doesn't have yum. Macports does have a version of ffmpeg but it isn't complies with --enable-shared so it cannot be used as a shared library.

My live server is CentOs and I used Yum to install ffmpeg but the standard release is also not compiled as a shared library. I will try the rpm you mentioned in your post and hopefully that will do the trick.

Also are you calling a shell script directly or using ffmpeg-php as an extension to php?