For a Drupal based website to work properly, you need FFmpeg installed on server.
Before going any further, please note that FFmpeg and FFmpeg PHP extension are two different things (distinct software). While FFmpeg is available as a package on Joyent Smart Machine, however you’ll need to download the FFmpeg extension package from the http://ffmpeg-php.sourceforge.net/ and install it yourself.
Please also note that you do not need to install FFmpeg PHP Extension to make Drupal working for videos, FFmpeg command line will do the job for you. Check the Drupal documentation for configuring that.
You can easily check if the FFmpeg is installed or not on your Joyent Smart Machine by using:
[user@server ~]$ ffmpeg -version
If you see following (or similar) output, FFmpeg is installed on your Smart Machine server:
FFmpeg version SVN-r19146-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-libvorbis --enable-libmp3lame --enable-libfaad --disable-libopencore-amrnb --disable-libopencore-amrwb --enable-libtheora --enable-libxvid --enable-libx264 --mandir=/opt/local/man --cc=gcc --prefix=/opt/local --disable-debug --disable-stripping --enable-shared --enable-pthreads --enable-gpl --disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.30. 2 / 52.30. 2
libavformat 52.34. 0 / 52.34. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 13 2010 13:50:14, gcc: 4.4.2
FFmpeg SVN-r19146-snapshot
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.30. 2 / 52.30. 2
libavformat 52.34. 0 / 52.34. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
For installing ffmpeg PHP Extension on Joyent Smart Machine, use the following steps and commands.
Login to your Joyent server using SSH and do following:
First of all, make sure things are up to date:
type the following commands:
[user@server ~]$ pkgin up
It will show message
database for http://pkgsrc.joyent.com/2010Q2/All is up-to-date
Make sure ffmpeg is installed by running:
[user@server ~]$ sudo pkgin in ffmpeg
Password: provide yuor account password
You should see following output:
calculating dependencies for ffmpeg...
nothing to upgrade.
8 packages to be installed: libogg-1.2.0 xvidcore-1.2.2 x264-devel-20090920 libvorbis-1.3.1 libtheora-1.1.1nb1 lame-3.98.3 faad2-2.7nb1 ffmpeg-20090611nb8 (7995K to download, 21M to install)
When prompted, type ‘y’:
proceed ? [y/N] y
That should start downloading the above mentioned packages and install them. You will see following messages:
downloading packages...
downloading libogg-1.2.0.tgz: 100%
downloading xvidcore-1.2.2.tgz: 100%
downloading x264-devel-20090920.tgz: 100%
downloading libvorbis-1.3.1.tgz: 100%
downloading libtheora-1.1.1nb1.tgz: 100%
downloading lame-3.98.3.tgz: 100%
downloading faad2-2.7nb1.tgz: 100%
downloading ffmpeg-20090611nb8.tgz: 100%
installing packages...
installing libogg-1.2.0...
installing xvidcore-1.2.2...
installing x264-devel-20090920...
installing libvorbis-1.3.1...
installing libtheora-1.1.1nb1...
installing lame-3.98.3...
installing faad2-2.7nb1...
installing ffmpeg-20090611nb8...
ffmpeg-20090611nb8: copying /opt/local/share/examples/ffmpeg/ffserver.conf to /opt/local/etc/ffserver.conf
processing local summary...
updating database: 100%
marking ffmpeg-20090611nb8 as non auto-removable
Now, install autoconf using:
sudo pkgin in autoconf
Now, download the latest version of ffmpeg-php to your SmartMachine using:
curl -L -O http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
Now Uncompress it using:
gtar -xjf ffmpeg-php-0.6.0.tbz2
Now build and install it using:
cd ffmpeg-php-0.6.0
phpize
./configure && make
sudo make install
Now you need enable the extension by adding it to /opt/local/etc/php.ini. Open the file and after the list of extensions (extention=*) add following:
extension=ffmpeg.so to /opt/local/etc/php.ini
and save the file. Now restart Apache to enable it using:
svcadm restart apache
Hope that helps.
Cheers!
Thank you very much for such vital information but kindly specify the path of ffmpeg form where to access it.