Installing FFmpeg Hosting

June 8th, 2009 | Posted under FFmpeg Hosting | 1 Comment »

Installing FFmpeg Hosting – For Dedicated/VPS servers.

FFMPEG is an open source application that allows you to convert video and audio files easily between a variety of different formats. It supports most industry-standard codec and can convert from one file format to another quickly and easily. This guide is intented for the installatiion of ffmpeg, ffmpeg-php, mplayer, mencoder, lame mp3 encoder, flvtool2, libVorbis, and libogg and tested on CentOS5 and RHEL3 systems with Cpanel.

To start:

cd /usr/src

Download MPlayer and Codes, FlvTool2, Lame, and ffmpeg-php:

MPlayer codecs (check for latest release):

wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2

MPlayer (check for latest release):

wget http://www4.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2

FlvTool2 (check for latest release):

wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz

Lame MP3 Encoder (check for latest release):

wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz

FFMPEG-PHP (check for latest release):

wget http://nchc.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2

Extract downloaded files:

tar -zxvf flvtool2-1.0.6.tgz
tar -zxvf lame-3.97.tar.gz
bunzip2 essential-20071007.tar.bz2; tar xvf essential-20071007.tar
bunzip2 MPlayer-1.0rc2.tar.bz2; tar xvf MPlayer-1.0rc2.tar
bunzip2 ffmpeg-php-0.5.3.1.tbz2; tar xvf ffmpeg-php-0.5.3.1.tar

Create and import the Codecs directory:

mkdir /usr/local/lib/codecs/
mv essential-20071007/* /usr/local/lib/codecs/
chmod -Rf 755 /usr/local/lib/codecs/

Install Subversion and Ruby using Yum:

yum install subversion (You may need to open SVN port 3690)
yum install ruby (If you’re on cPanel you can alternatively use /scripts/installruby)
yum install ncurses-devel

Get FFMPEG and MPlayer from SVN:

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Install LAME:

cd /usr/src/lame-3.97
./configure && make && make install

Install libOgg and libVorbis:

yum install libogg.i386 libvorbis.i386 libvorbis-devel.i386

Install flvtool2:

cd /usr/src/flvtool2-1.0.6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

Install MPlayer:

cd /usr/src/MPlayer-1.0rc2
./configure && make && make install

Install ffMPEG:

cd /usr/src/ffmpeg/
mkdir tmp
chmod 777 tmp
export TMPDIR=./tmp
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared
echo ‘#define HAVE_LRINTF 1? >> config.h
make && make install
export TMPDIR=/tmp

Finalize the codec setups:
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

You may get an error about a library path not being found, if so, run:
export LD_LIBRARY_PATH=/usr/local/lib

Install FFMPEG-PHP:

cd /usr/src/ffmpeg-php-0.5.0/
phpize
./configure && make && make install
ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
ln -s /usr/local/bin/mplayer /usr/bin/mplayer

Add extension to php.ini (find the correct php.ini file):
[ffmpeg]
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so
extension=ffmpeg.so

Restart Apache and check that the module is loaded in PHP:

/etc/init.d/httpd restart

Test ffmpeg from command line and if you get this errors:

ffmpeg: error while loading shared libraries: libavformat.so.51:…

execute: /usr/local/lib >>/etc/ld.so.conf and reload library cache with ldconfig -v

Verify ffmpeg installation:

php -r ‘phpinfo();’ | grep ffmpeg

If you get the folowing results then FFMPEG and all it’s components are installed correctly:
ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.3.1
ffmpeg-php gd support => enabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0


Steps to start a video sharing site using FFmpeg

June 7th, 2009 | Posted under FFmpeg Hosting, Web Hosting, Web Hosting Tips | No Comments »

Steps to start a video sharing site using FFmpeg

The last few years have seen a massive change in which websites are made. Today, it is more collaborative, making people come together under a community and sharing contents. Websites even allow users to upload content directly in its server, and let other users view it. This is a huge change from the way websites used to be few years back: the Webmaster created the contents for the site, and there was limited participation from the user.

The latest craze that has hit the web world is video sharing. People have been enthusiastic to upload different videos, and view other videos hosted on the site. Hence, a lot of websites enabling video sharing has cropped up in the last few years. And there is a set of software libraries that have been making it possible: FFmpeg.

So, how do we make a perfect video sharing website with FFmpeg, which is bound to attract netizens? In this article, we look deeper into the matter.

1. Firstly, a web host has to be located with FFmpeg installed on the server. Such hosting with FFmpeg installed is also termed as FFmpeg hosting. FFmpeg is responsible for converting one video format to another, uploading and streaming of video files. Such servers should ideally be dedicated, because in most cases, these sites are subjected to consumption of huge traffic, so there is a lot of pressure on the web server.

2. A database, preferably using MySQL must be set up as the website scripts of Ffmpeg would require a database to use. The database just needs to be created, as the configuration would be done in the settings of the video sharing scripts of FFmpeg during installation.

3. The video sharing scripts must be installed in the server. Some FFmpeg hosts provide a few scripts for free, while most of them can be bought for varying prices. Among many such scripts, the most used are PHP motion and vShare.

4. The other steps include uploading files to the web host, which can be done through the file manager of the website’s control panel or the FTP site, which is a lot quicker.

5. However, one step should be performed for maintaining the security of the video sharing website. The installation files should be deleted from the web server. This would prevent anyone from performing malicious activities in the site.

The above-mentioned steps should be enough for creating a video sharing website. However, one of the main steps is to find a good web host that provides FFmpeg installation. As the site gets popular, the web admin can opt for Virtual Private Hosting, which would take good care of the bandwidth problems.

BounceWeb provides FFmpeg hosting. Check out our support for YouTube Clone Scripts. Also we have video sharing demos.


Perian – The Quicktime component based on the FFmpeg project.

June 7th, 2009 | Posted under FFmpeg Hosting, Web Design Tutorials, Web Hosting | No Comments »

Today, there is abundance of video formats in the technology world, with each claiming to be the best. But for people dealing with videos, it has always been a problem to use different formats, download separate codecs to run them in their favourite players. However, Mac users can breathe a sigh of relief as, Quicktime, the Mac’s multimedia player has a video plug-in, named Perian, which is free (and also open source) and supports a huge range of multimedia codecs which includes DivX, FLV, AVI and many more.

The Perian plug-in is an implementation of the FFmpeg project. The FFmpeg is a software library that can record, convert, encode/decode, and steam video files in various formats. The FFmpeg software is made up in C, and comprises of several components, of which the Perian project uses two: libavcodec and libavformat.

The libavcodec is a library of different codecs for encoding and decoding of videos. It is free and licensed under LGPL. The libavformat is dependent on the libavcodec format and is also a library containing muxers and demuxers for different audio and video container formats.

However, the popularity of Perian lies in its ability to playback DivX formats. Without Perian, Quicktime users felt the problem of DivX files not playing in full screen, unless it is the pro version of Quicktime. However, with the installation of Perian, the Front Row, the Mac’s media center, would play DivX files in full screen mode. Moreover, with Perian installed in more than one computer, connected through a network, DivX files can be shared through the Front Row, across the network.

Although it enables Quicktime to play any video format users want it to play, it has some cons too. In case of MKV format, the user would have to wait for the buffering to finish in order to watch or export the file. However, the part that has already been buffered can be watch, and Perian normally buffers MKV files quite fast enough. Another thing that is considered to be a con for Perian is that it doesn’t support popular media formats like the OGG and Windows Media. However, Apple’s other product like Flip4Mac and XiphQT supports the Windows Media and the OGG codecs respectively.

The Perian plug-in is also used with Quicktime supported applications like NicePlayer and QTAmateur. The TV platform Miro and streaming application Airfoil also include Perian in their projects. The current version released by Apple is Perian 1.1.3.

Mac users never had it smoother. A player that can play most of the video formats is a great relieving thing for a user, and Quicktime have done with Perian as its component. And in turn, Perian has done it with the help of FFmpeg. In fact, Perian, branded as “The Swiss Knife of QuickTime” extends special thanks to the FFmpeg project.

BounceWeb provides FFmpeg hosting. Please visit us at http://bounceweb.com/ffmpeg-hosting.html for more details.


FFmpeg – an integral part of VLC Media Player

June 7th, 2009 | Posted under FFmpeg Hosting, Web Hosting, Web Hosting Tips | No Comments »

In the world of multimedia, video has evolved a long way in the last few years. There have been different formats coming up each day, with each bettering the other. However, the problem has been to use different formats in one media player itself. Mostly, it has been a frustrating experience for users, having to download separate codecs for different formats.

However, VLC Media Player has been able to solve the problem with the help of FFmpeg, a set of software library that enables recording, uploading, streaming of video files, apart from its main feature: converting one video format to another. FFmpeg is free and open source software, much like VLC, which has implemented parts of the project and is now reaping the benefits of it.

VLC is a media player that supports a lot of different audio and video formats, along with file formats like CD and DVD, and protocols like HTTP, UDP and RSP. Its main feature is to stream over the network and provides the user with the ability to transcode and save them in various formats. It is a cross-platform player, which makes it possible to be used in most operating systems such as Microsoft Windows, Mac OS, GNU/Linux to name a few. It is also licensed to GNU General Public License (GPL) which gives developers the freedom to view the source code, edit and then distribute the modified version without any copyright issues.

The feature to support so many video formats is due to the fact that it includes a lot of codecs from the libavcodec library of the FFmpeg project. However, it has its own muxers and demuxers and therefore doesn’t include the libavformat library of the FFmpeg project. However, VLC also supports a few codecs that are not included in the FFmpeg’s libavcodec. However, the inclusion of libavcodec allows the player to support DVD Video and MPEG-4 playback, along with MKV and OGG file formats without needing external codecs.

VLC also has certain features that set it apart from others in the market. It can play videos that are incomplete or damaged in nature. Thus, if an user is downloading video files using a torrent client, he or she would still be able to view the content in bits while downloading. Moreover, it also has the ability to play TS files while they are being transferred from the HDV camera via cable, which makes it possible to view the video while being captured.

This free and Open Source Software is the talk of the town with so many features associated with it. However, the best feature of the player is attributed to the FFmpeg project, and with the development of the FFmpeg project, the VLC Media Player is sure to get better. BounceWeb provides FFmpeg hosting. Please visit us at http://bounceweb.com/ffmpeg-hosting.html for more details. Here are some YouTube Clone Scripts that is fully compatible with our hosting.


FFmpeg hosting

June 7th, 2009 | Posted under FFmpeg Hosting, Web Hosting | 2 Comments »

In the last few years, the definition of a good interactive website has completely changed. Today, most websites are found to be streaming videos, or offering provisions for uploading and sharing videos to its viewers. There are certain software libraries available over the Internet that converts the user-uploaded video, which could be encoded in any form, into a single format, which is viewable from the hosted site, and also embeddable to a third party website. One such software library that is mostly used in websites is the FFmpeg and its usage in websites is termed as FFmpeg hosting.

FFmpeg is written in C programming language and is under the GNU General Public License (GPL), which allows its users to use, distribute, modify the software and redistribute the modified software without any fear of copyright issues. The software, which has been made under the Linux operating system, is actually a cross-platform software, meaning that it could be used in most operating systems like Microsoft Windows, Apple Mac OS besides Linux. It also supports different computer architectures like x86, SPARC, ARM, PPC and MIPS.

The FFmpeg project has several components, being continuously developed by FFmpeg developers, and the latest version to be released is version 0.5. The software contains a command line tool, named ffmpeg that actually converts videos of a format to another. Besides converting, it can also encode real-time videos from a TV card. The second component of FFmpeg is the ffserver, which is a HTTP multimedia-streaming server, and is basically used for live video broadcasts. It also supports time-shift live broadcasts. The project contains its own media player, named ffplay and is based on the ffmpeg libraries.

The most important component of the project is libavcodec, which is a compilation of the encoders and decoders of the FFmpeg audio/videos. A lot of codecs were developed completely the FFmpeg developers for better and enhanced performance.

There are other components too, such as the libavformat, containing the muxers and demuxers for different formats; other routines for video post-processing and image scaling and library of routines for different FFmpeg parts. Besides developing the software itself, which is used by a host of free media players, it has also developed two very important video codecs and a video container.

The video codecs are the lossy “Snow” codec, and the lossless “FFV1” codec, while the video container being actively developed is named as “NUT”. Other than the self-developed codecs, it implements external codecs like H.261, H.263, Windows Media Video codecs like WMV1, WMV2, MV3; Vorbis and many more. FFmpeg supports a lot of formats, including the famous AVI, ASF, FLV, MPEG to name a few; and protocols like HTTP, RTP, TCP, UDP etc.

FFmpeg is path-breaking software that is sure to find more and more use in the future, as more websites start using video streaming and uploading features.

BounceWeb provides FFmpeg hosting. Visit us at http://bounceweb.com/ffmpeg-hosting.html for more details.