Posted: March 3, 2007 at 5:32 pm |
(188) Comments
Need help installing FFMPEG on your server or shared account? Let our experienced technicians help you at NO COST, for free, sign up today and post on our online community for help: FFMPEG Help Forums
Good News: Customers of VEXXHOST Web Hosting can now automatically install PHPmotion and VidiScript instantly from cPanel, they do not need to do any ffmpeg configuration or ffmpeg installation, they simply enter a username and a password and the software will be ready and online in seconds.
A lot of people are getting hiring people to install FFMPEG as they think it’s a difficult task, but it’s much easier than you think if you follow these instructions. You should have root access & basic Linux knowledge to the server to follow these instructions.

1. Create a directory to do our work in
1 2
| mkdir ~/ffmpeg
cd ~/ffmpeg |
2. Get all the source files
1 2 3 4 5 6
| wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/ essential-20061022.tar.bz2
wget http://rubyforge.org/frs/download.php/9225/ flvtool2_1.0.5_rc6.tgz
wget http</em>://easynews.dl.sourceforge.net/sourceforge/ lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wget http://downloads.xiph.org/releases/ ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/ vorbis/libvorbis-1.1.2.tar.gz |
3. Extract all the source files
1 2 3 4 5 6
| bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar
tar zxvf flvtool2_1.0.5_rc6.tgz
tar zxvf lame-3.97.tar.gz
bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz |
4. Create the codecs directory & import them
1 2 3
| mkdir /usr/local/lib/codecs/
mv essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/ |
5. Install SVN/Ruby (Depends on OS, this is for RHEL/CentOS)
1 2 3
| yum install subversion
yum install ruby
yum install ncurses-devel |
6. Get the latest FFMPEG/MPlayer from the subversion
1 2
| svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer |
7. Compile LAME
1 2 3 4
| cd ~/ffmpeg/lame-3.97
./configure
make
make install |
8. Compile libOGG
1 2 3 4
| cd ~/ffmpeg/libogg-1.1.3
./configure
make
make install |
9. Compile libVorbis
1 2 3 4
| cd ~/ffmpeg/libvorbis-1.1.2
./configure
make
make install |
10. Compile flvtool2
1 2 3 4
| cd ~/ffmpeg/flvtool2_1.0.5_rc6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install |
11. Compile MPlayer
1 2 3 4
| cd ~/ffmpeg/mplayer
./configure
make
make install |
12. Compile FFMPEG
1 2 3 4 5
| cd ~/ffmpeg/ffmpeg
./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared
echo '#define HAVE_LRINTF 1' >> config.h
make
make install |
13. Finalize the codec setups
1 2 3 4 5
| ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51 |
14. Compile FFMPEG-PHP
1 2 3 4 5
| cd ~/ffmpeg/ ffmpeg-php-0.5.0
phpize
./configure
make
make install |
15. Install FFMPEG-PHP (make sure the php.ini path is correct.)
1
| echo 'extension=/usr/local/lib/php/extensions/ no-debug-non-zts-20020429/ffmpeg.so' >> /usr/local/Zend/etc/php.ini |
16. Restart Apache to load FFMPEG-PHP (Depends on OS, this is for RHEL/CentOS)
17. Verify if it works
1
| php -r 'phpinfo();' | grep ffmpeg |
If you get a few lines such as
1 2 3 4
| ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.0
ffmpeg.allow_persistent => 0 => 0 |
Then everything is installed and working. FFMPEG, FFMPEG-PHP, MPlayer, MEncoder, flv2tool, LAME MP3 encoder & libOGG.
Posted: March 1, 2007 at 10:24 pm |
(23) Comments
While working on a few of my clients pages, I’ve always used other methods for CSS hacks but mostly using PHP to detect the remote user User-Agent and come up with the specific CSS. Until I’ve discovered this one:
You can actually have IE6 specific lines in CSS, it’s as simple as prefixing them with an underscore. Sure, you might start complaining “STANDARDS!!11!” – If I had to choose from a site that works fine in every browser and standards, I’ll go with the more working one. That’s not all! You can actually have lines that are both IE6 & IE7 specific in CSS by prefixing them with a dot.
So to sum it up, let’s say if I use a left margin that has to be 5px in Firefox/Opera, 6px for IE6 & 7px for IE7 – Here’s how I would do it:
1 2 3
| margin-left: 5px; /* Left margin for all browsers, mainly Opera, Firefox, etc. */
.margin-left: 7px; /* Left margin of 7px that can be readable by both IE6 & IE7, now other still think it’s 5 while IE6 & IE7 think it’s 7 */
_margin-left: 6px; /* Only IE6 reads this and changes the value to 6px */ |
I have to admit I was pretty happy upon discovering this hack; I’ll sure be using it for a while now that I have found a pretty good one.
Do you have any of your own do not need loads of JavaScript and/or PHP code to work? Comment on!
Posted: January 3, 2007 at 11:23 pm |
(27) Comments
PHP5 has brought so much new features but because of its big syntax changes, a big percentage of the PHP developing base has not made the change. Here are the top 10 new features that could change your mind.
5: Better error handling with exceptions
I’m sure every PHP developer had been staring at the famous white screen with a “Syntax error” clueless at where the error is really at. With PHP5, you can actually handle PHP errors and do whatever you want with them, but that’s not all. They have also included exceptions which I’m sure most C++ or Java developers use. The good part is that instead of simply failing on with close no errors to you, you could put a few checks before and information you could need such as maybe a
on an array. I have written an article about this: http://vexxhost.com/blog/?p=21
4: Completely rewritten MySQL extension
The MySQL databases are the PHP’s partner in crime. Many developers use this database system in their website’s because it is on of the easiest, free, open-source database software. However, its performance combined with PHP4 was close to poor. Introduced with PHP5 is a newer, rewritten, optimized MySQL extension which was also compatible with MySQL 5.0. It has also introduced other functions such as: Prepared statements, SSL connections, Multi-query functions.
3: A heck of a lot more useful functions
I have a few favorite PHP5 functions which speed up time while coding & enhances the website’s performance. One of my favorites is the
function – What it does that it would be called if a class that was created and did not exist. It provides you with the class name. This is useful because you don’t need to manage what includes you need for X and Y file and reduces the load for those who simply include all the classes in for every single PHP file. Also, another favorite is
which reduces the 6 lines of code to add something to one.
2: Finally! SQLite database support!
I’m sure a lot of developers will be happy about this one. While MySQL is very popular among most PHP developers, SQLite is much different than it. It actually uses normal files and reads them. It does not need a daemon (or called server) to run in order to execute any queries on it. It makes a better smaller database for these low traffic sites.
1: The best damn OOP support period
PHP programmers have spent an awful of long time trying to create hacks so in order that PHP can make a better OO programming language. Finally, they are rewarded with OO support that either PHP3 or PHP4 can match. It has anything you usually see in most of the other established coding languages. From Constructors, Destructors, Public, protected, private properties & methods, Interfaces, Abstract classes, Class type hints, Static properties and methods, Final properties and methods & a whole suite of magical methods.
That’s the top 5 for me. I hope you think that PHP5 deserves a try! (and we offer it with our hosting plans!)