FFmpeg install problem

apps

#1

Before you ask, I followed the wiki and even tried using other methods explained in posts here:

This is what ive tried:

Followed the dreamhost wiki about installing FFmpeg, also added the $HOME/bin and $HOME/lib to the bashrc and bash_profile files.

The problem:

After all this I cant execute ffmpeg, when I attempt to execute it I get “-bash: ffmpeg: command not found” I tried this from different folders including the bin and lib folders(where its actually installed) .

I got alot of warnings during the make install but recieved no compile errors.

I need ffmpeg to generate thumbnails from videos which will be uploaded to my site. (I think this may mean I also need to install ffmpeg-php, but first things first.)

Any ideas?


#2

What if you do ./ffmpeg in the bin?

Check out Gordaen’s Knowledge, the blog, and the MR2 page.


#3

that worked!

I thought my adding it to the PATH variable in my .bash_profile and .bashrc file makes it executeable in a webscript and executable from the command line anywhere…am I wrong to assume that?

How am I to get ffmpeg_movie() function to work in php?


#4

Wait wait wait…it just started working everywhere…perhaps the install is delayed? I went to bed last night and it didnt work…woke up this morning and its working…are the bash files slow to react? or…perhaps they are only reloaded during login…in which case the changes wernt made until I logged in a second time this morning…

ffmpeg_movie(…) is still giving me a “Cannot instantiate non-existent class: ffmpeg_movie” error though… :-/


#5

I realize this is probably because ffmpeg-php is not installed…its to bad theres not a step by step install process for it…and not many people ask about it in this forum…so im not sure if im missing something…


#6

Hi there,
Im the same as you, I get the “Fatal error: Cannot instantiate non-existent class: ffmpeg_movie in /home/.bootsy/user/domain/upload.php on line 83” error also.

Have are you still getting this or have you sorted the problem out? Did you have to install ffmpeg-php? if so, how did you do it?

Thanks,
James


#7

As a matter of fact, I found an easier way. I was able to get ffmpeg working from the shell and have read that in order to install ffmpeg-php I would need to recomplile php5 so heres what I did in my code instead:

I tried this:

echo exec(“ffmpeg -y -i ‘P1000006.MOV’ -f image2 -ss 1 -vframes 1 -s 160x120 -an ‘thumb2.jpg’”);

Then I tried this:

echo system_exec(“ffmpeg -y -i ‘P1000006.MOV’ -f image2 -ss 1 -vframes 1 -s 160x120 -an ‘thumb2.jpg’”);

Then I tried this:

echo system(“ffmpeg -y -i ‘P1000006.MOV’ -f image2 -ss 1 -vframes 1 -s 160x120 -an ‘thumb2.jpg’”);

When that didnt work I gave up hope…but THEN I realized that its possible my PATH variable was not being utilized correctly via php and I changed the line to this:

echo system("/home/airhead315/bin/ffmpeg -y -i ‘P1000006.MOV’ -f image2 -ss 1 -vframes 1 -s 160x120 -an ‘thumb2.jpg’");

And it did just what I wanted it to. It created a thumnail 160x120 using the first frame from the movie P1000006.MOV!

I realized at this point that I could really do anything with ffmpeg from within php! Good luck, hope everything works out for you!