Wowza Streaming Engine (RHEL/Centos/Fedora)

Wowza Streaming Engine (known as Wowza Media Server prior to version 4) is unified server software developed by Wowza Media Systems. The server is used for streaming of live and on-demand video, audio, and RIAs (rich Internet applications) over IP networks to desktop, laptop, and tablet computers, mobile devices, IPTV set-top boxes, internet-connected TV sets, and other network-connected devices. The server is a Java application deployable on the following operating systems: Linux, Mac OS X, Solaris, Unix, and Windows.

Installation of Wowza
———————

1) Firt install Java in your server as it is a Java based application.

#yum install java java-openjdk

# java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.8) (fedora-51.1.8.8.fc13-i386)
OpenJDK Client VM (build 14.0-b16, mixed mode)

2) Download Wowza installation binary from their site http://www.wowza.com/pricing/installer

#cd /usr/src
#wget http://www.wowza.com/downloads/WowzaStreamingEngine-4-0-6/WowzaStreamingEngine-4.0.6.rpm.bin

3) Give permission for execution

#chmod +x WowzaStreamingEngine-4.0.6.rpm.bin

4) Execute it

#./WowzaStreamingEngine-4.0.6.rpm.bin

Do you agree to the above license terms? [yes or no]
yes
Wowza Streaming Engine Manager is a browser-based application for managing the Wowza Streaming Engine software.
Enter an Administrator user name and password that you want to use to sign in to the manager.
Note: User Name and Password are case-sensitive.
User Name: wowza
Password:
Confirm Password:
Please enter a Wowza Streaming Engine license key in this format:
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX[-XXXXXXXXXXXX] ET1A4-v8eub-FjZ9y-nYuwz-Uynnt-YjWJN-amQAywPrEQH

((( For the license you may need to purchase from http://www.wowza.com/media-server/developers/license or you can try free license just for installation purpose, they will send it to your mail after signing up)))

Wowza Streaming Engine license key accepted. Thank you!
Installing Wowza Streaming Engine
Preparing... ########################################### [100%]
1:WowzaStreamingEngine ########################################### [100%]

Start Wowza Streaming Engine automatically when this system reboots? [yes or no]
yes
Starting WowzaStreamingEngine (via systemctl):
WowzaStreamingEngine: stopping...
WowzaStreamingEngine stopped

WowzaStreamingEngine stopped

WowzaStreamingEngine: starting...
WowzaStreamingEngine started PID:(1751) [ OK ]
Starting WowzaStreamingEngine (via systemctl):
WowzaStreamingEngineManager: stopping...
WowzaStreamingEngineManager stopped
WowzaStreamingEngineManager stopped
WowzaStreamingEngineManager: starting...
WowzaStreamingEngineManager started PID:(1779) [ OK ]
Install Location:
/usr/local/WowzaStreamingEngine

To access Wowza Streaming Engine Manager, go to http://localhost:8088/enginemanager in a web browser.

wowza_installation

# chkconfig --level 345 WowzaStreamingEngine on
# chkconfig --level 345 WowzaStreamingEngineManager on

5) Allow it’s port to accept incoming connections.

# iptables -I INPUT -p tcp --dport 1935 -j ACCEPT

6) Check whether wowza is working?

# netstat -plan | grep :1935
tcp 0 0 :::1935 :::* LISTEN 1352/java

7) Install all examples in wowza
(LiveDVRStreaming, LiveVideoStreaming, ServerSideModules, SHOUTcast, VideoChat, VideoOnDemandStreaming, WebcamRecording)

#cd /usr/local/WowzaStreamingEngine/examples
# ./installall.sh
Skipping LiveVideoStreaming. Already configured.
Installing LiveDVRStreaming...
Installing ServerSideModules...
Installing SHOUTcast...
Installing VideoChat...
Skipping VideoOnDemandStreaming. Already configured.
Skipping WebcamRecording. Already configured.
If Wowza Streaming Engine is running, you must restart it to see the installed examples.

8) Go to http://WowzaserverIP:8088/enginemanager and supply the user/pass you have given while installation. Enjoy working with Wowza now 🙂

wowza1

wowza2

wowza3

 
If you see the wowza page getting connection time outs or connection refused error. Check wowza log for details.

# tail -f wowzastreamingengine_error.log
WARN vhost comment 2014-08-18 01:02:39 - - - - - 20.422 - - - - - - - _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already in use
WARN vhost comment 2014-08-18 01:02:44 - - - - - 25.426 - - - - - - - _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already in use
WARN vhost comment 2014-08-18 01:02:49 - - - - - 30.429 - - - - - - - _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already in use
WARN vhost comment 2014-08-18 01:02:54 - - - - - 35.432 - - - - - - - _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already in use
WARN vhost comment 2014-08-18 01:02:59 - - - - - 40.434 - - - - - - - _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already in use

I found some other process started using the same port with server IP. I had to kill all the current processes and restart application.

# netstat -plan | grep :1935
tcp 0 0 :::1935 :::* LISTEN 1352/java
# kill -9 1352
# ps auxf | grep -i wowza

Kill all wowza process you get from ps command.

Now start WowzaStreamingEngine and WowzaStreamingEngineManager

# /etc/init.d/WowzaStreamingEngine start
WowzaStreamingEngine stopped

WowzaStreamingEngine: starting...
WowzaStreamingEngine started PID:(2751) [ OK ]
# /etc/init.d/WowzaStreamingEngineManager start
WowzaStreamingEngineManager stopped
WowzaStreamingEngineManager: starting...
WowzaStreamingEngineManager started PID:(2778) [ OK ]

 

Red5 Media Server: Installation And Configuration (Centos/Fedora/RHEL)

Red5 Media Server delivers a powerful video streaming and multi-user solution to the ©Adobe ©Flash Player and other exciting client technologies. It works based on Java and some of the most powerful open source frameworks, Red5 stands as a solid solution for business of all sizes including the enterprise.

Features
————
Streaming Video (FLV, F4V, MP4, 3GP)
Streaming Audio (MP3, F4A, M4A, AAC)
Recording Client Streams (FLV and AVC+AAC in FLV container)
Shared Objects
Live Stream Publishing
Remoting
Protocols: RTMP, RTMPT, RTMPS, and RTMPE

Lets look at the installation and configuration part:
——————————————————————-

1) First you need to install Java since red5 is a Java server. Use yum to install it.
If you are not sure about the version or proper package to be installed from yum repo, then search it.

# yum search java | grep openjdk
java-1.6.0-openjdk-devel.i686 : OpenJDK Development Environment
java-1.6.0-openjdk.i686 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.i686 : OpenJDK Demos
java-1.6.0-openjdk-javadoc.i686 : OpenJDK API Documentation
java-1.6.0-openjdk-plugin.i686 : OpenJDK Web Browser Plugin
java-1.6.0-openjdk-src.i686 : OpenJDK Source Bundle

I am gonna install java-1.6.0-openjdk.i686 and java-1.6.0-openjdk-devel.i686 from it.

#yum install java-1.6.0-openjdk.i686 java-1.6.0-openjdk-devel.i686

2) Now we need to install SVN to retrieve new red5 release from Google SVN repositary.

#yum install subversion

3) Install Ant and Ivy in support for Java
Apache Ant is a Java library and command-line tool that help building software. Ivy is a dependency manager, it manages and controls the JAR files that your project depends on. If you don’t have the JARs, it works by default by taking from the Maven repository directly, which can make project setup a lot easier.

Download binary form of apache-ant(NOT THE SOURCE CODE)

# cd /usr/src
# wget http://www.motorlogy.com/apache//ant/binaries/apache-ant-1.9.4-bin.tar.gz (:::You can download latest from http://ant.apache.org/bindownload.cgi)
# tar xvf apache-ant-1.9.4-bin.tar.gz
# mv apache-ant-1.9.4 /usr/local/ant

Make a symlink for ant binary to /usr/bin for the shortcut and easiness to access it.

#ln -s /usr/local/ant/bin/ant /usr/bin/ant

Download Ivy from Apache repositary

# cd /usr/src
# svn co https://svn.apache.org/repos/asf/ant/ivy/core/trunk ivy
# cd ivy
# ant jar

Wait for few minutes for process to be over. Once it is success, you will see the Build Complete Message.

# cp build/artifact/jars/ivy.jar /usr/local/ant/lib/   (::: Since you are in path cd /usr/src/ivy)

4) Export Variables for Ant and Java:

Java and Ant is in place now, now we need to make sure we set Environment Variables. They are global variables with paths specified to different binaries or applications. ANT and JAVA will need those.

# export ANT_HOME=/usr/local/ant
# export JAVA_HOME=/usr/lib/jvm/java
# export PATH=$PATH:/usr/local/ant/bin

5) Actual Installation of Red5 Server begins

We need to fetch the Red5 source from Google SVN repositary.

# cd /usr/src
# svn co http://red5.googlecode.com/svn/java/server/tags/1_0/ red5
# mv red5 /usr/local/
# cd /usr/local/red5

(This is the folder where all the source files reside. From here on, we prepare and build the red5 source)

# ant prepare
# ant dist

Wait for sometime for the process to be completed. Once it is over, you will see message “BUILD SUCCESSFUL” at the end.

Copy the conf directory from the dist folder to the current directory and test the red5 installation.

# cp -r dist/conf .             (::: Since you are in path /usr/local/red5)
# ./red5.sh

You will see a lot of process going on in screen and it starts the Red5 server.

Check whether the ports 5080 and 1935 are listening or not in a second/duplicate shell

# netstat -plan | grep -E ‘:5080|:1935’
tcp 0 0 :::1935 :::* LISTEN 1309/java
tcp 0 0 :::5080 :::* LISTEN 1309/java

Test if server works by checking the url http://yourserverIP:5080

Make sure you enable incoming connections to ports 5080 and 1935 in server.

# iptables -A INPUT -p tcp -m tcp –dport 5080 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp –dport 1935 -j ACCEPT
[[[NOTE::: The red5 runs only as long as you keep the terminal window open since you started running the script red5.sh in it. It will stop running if you close shell which is not an efficient way to run red5 server like that way. You need to make sure it can run by its own initiative]]]

You may need to set the script red5.sh starts running while server boots up, do the following for it.

#vi /root/red5_server_run.sh

Enter the following commands in it.

cd /usr/local/red5/
./red5.sh

#chmod +x /root/red5_server_run.sh

Set this script in file /etc/rc.local so that it will start running along with start up scripts in server.
So the rc.local would like as shown below:
=======================
# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
sh /root/red5_server_run.sh &
=======================

((In above the “&” at the tail end of command “sh /root/red5_server_run.sh” is run the process in background))
6) Setup an Init script for Red5 server

# vi /etc/init.d/red5

Then enter the following script in it.

=================================================================
#!/bin/sh
# For RedHat and cousins:
# chkconfig: 2345 85 85
# description: Red5 flash streaming server
# processname: red5
PROG=red5
RED5_HOME=/usr/local/red5
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid
# Source function library
. /etc/rc.d/init.d/functions
[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
RETVAL=0
case “$1” in
start)
echo -n $”Starting $PROG: ”
cd $RED5_HOME
$DAEMON >/dev/null 2>/dev/null &
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo $! > $PIDFILE
touch /var/lock/subsys/$PROG
fi
[ $RETVAL -eq 0 ] && success $”$PROG startup” || failure $”$PROG startup”
echo
;;
stop)
echo -n $”Shutting down $PROG: ”
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
;;
restart)
$0 stop
$0 start
;;
status)
status $PROG -p $PIDFILE
RETVAL=$?
;;
*)
echo $”Usage: $0 {start|stop|restart|status}”
RETVAL=1
esac
exit $RETVAL
=================================================================

Assign execute permission to red5 script

# chmod +x /etc/init.d/red5

Now start the service

# service red5 start OR /etc/init.d/red5 start

Set Red5 to start along with start up programs while server booting

# chkconfig –add red5
# chkconfig red5 on

To install some RED5 demos

# cd /usr/local/red5/webapps/root
# svn checkout http://red5.googlecode.com/svn/java/server/tags/0_9_1/webapps/root/demos/

To install some demo apps

http://yourserverip:5080/installer/

Then install Admin demo and Ofla Demo from the page

Access Demo Apps in Red5

http://yourserverip:5080/demos/

Test ofla demo

http://192.168.1.7:5080/demos/ofla_demo.html

red5_oflademo

Then correct rtmp url like rtmp://yourserverip/oflaDemo and hit connect. Choose any of the demos from the list and play it.

 

Test Publisher to live stream, record videos etc.

http://192.168.1.7:5080/demos/publisher.html

You will see three tabs on left side server, video, audio

In server tab, change the location to rtmp://yourserverip/oflaDemo and on the video tab, select your cam from Device scroll list.

red5_success

All the above would work fine if you follow the instructions correctly 🙂

 

Some error you may encounter while the installation time
============================================

1) During the step ant prepare and ant dist , you may sometime reach at the following error.

——————————————————————–
[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: org.apache.commons#commons-modeler;2.0.1: not found
[ivy:resolve] :: red5#xmlrpc;2.0.1: not found
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
——————————————————————–

For this change the following path in file ivysettings.xml in directory /usr/local/red5/

——————————————————————–
replace the
<artifact pattern=”http://repo1.maven.org/maven2/[organisation]/[artifact]-[revision].[ext]”/>
with
<artifact pattern=”http://repo1.maven.org/maven2/[artifact]/[artifact]/[revision]/[artifact]-[revision].[ext]”/>
——————————————————————–

Reference:: https://issues.apache.org/jira/browse/OPENMEETINGS-1035

 

Install FFMPEG in Fedora/Centos/RHEL

Introduction
————
FFmpeg is a free software project that produces libraries and programs for handling multimedia data. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation.

Reference from https://www.ffmpeg.org/about.html

How to install it?

(((First of all, please note the below installation steps are based on working with fedora/centos/rhel)))

1) Install the additional repo

Download it from http://pkgs.repoforge.org/rpmforge-release/ and choose it with your servers exact architecture and OS version.

I installed,

rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686

Since I am running Centos 6.x i686.

Update repository

# yum -y update

Install all necessary packages in support for ffmpeg

# yum install glibc gcc gcc-c++ autoconf automake libtool git make nasm pkgconfig
# yum install SDL-devel a52dec a52dec-devel alsa-lib-devel faac faac-devel faad2 faad2-devel
# yum install freetype-devel giflib gsm gsm-devel imlib2 imlib2-devel lame lame-devel libICE-devel libSM-devel libX11-devel
# yum install libXau-devel libXdmcp-devel libXext-devel libXrandr-devel libXrender-devel libXt-devel
# yum install libogg libvorbis vorbis-tools mesa-libGL-devel mesa-libGLU-devel xorg-x11-proto-devel zlib-devel
# yum install libtheora theora-tools
# yum install ncurses-devel
# yum install libdc1394 libdc1394-devel
# yum install amrnb-devel amrwb-devel opencore-amr-devel
2) Install xvid
————
It is a video codec library following the MPEG-4 standard, specifically MPEG-4 Part 2 Advanced Simple Profile (ASP). It uses ASP features such as b-frames, global and quarter pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG and custom quantization matrices.

#cd /opt
#wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
#tar xzvf xvidcore-1.3.2.tar.gz
#cd xvidcore/build/generic
#./configure –prefix=”$HOME/ffmpeg_build”
(::: Here $HOME means, since you run this as root, the home directory will be choosen as /root)
#make
#make install

3) Install LibOgg
————–
It is designed to provide for efficient streaming and manipulation of high quality digital multimedia.

#cd /opt
#wget http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
#tar xzvf libogg-1.3.1.tar.gz
#cd libogg-1.3.1
#./configure –prefix=”$HOME/ffmpeg_build” –disable-shared
#make
#make install

4) Install Libvorbis
—————–
It is the reference implementation of the Vorbis codec. It is the lowest-level interface to the Vorbis encoder and decoder, working with packets directly.

#cd /opt
#wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
#tar xzvf libvorbis-1.3.4.tar.gz
#cd libvorbis-1.3.4
#./configure –prefix=”$HOME/ffmpeg_build” –with-ogg=”$HOME/ffmpeg_build” –disable-shared
#make
#make install

5) Install Libtheora
—————–
It is a free lossy video compression format. It is developed by the Xiph.Org Foundation and distributed without licensing fees alongside their other free and open media projects, including the Vorbis audio format and the Ogg container.

#cd /opt
#wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
#tar xzvf libtheora-1.1.1.tar.gz
#cd libtheora-1.1.1
#./configure –prefix=”$HOME/ffmpeg_build” –with-ogg=”$HOME/ffmpeg_build” –disable-examples –disable-shared –disable-sdltest –disable-vorbistest
#make
#make install

6) Install Aacenc
————–
It’s AAC(Advanced Audio Coding) Decoder.

# cd /opt
# wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.3.tar.gz
# tar xzvf vo-aacenc-0.1.3.tar.gz
# cd vo-aacenc-0.1.3
# ./configure –prefix=”$HOME/ffmpeg_build” –disable-shared
# make
# make install

7) Install Yasm
————
It is an assembler and disassembler for the Intel x86 architecture. It can be used to write 16-bit, 32-bit (IA-32) and 64-bit (x86-64) programs. Yasm is a full rewrite of Netwide Assembler (NASM).

# yum remove yasm
# cd /opt
# wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
# tar xzfv yasm-1.2.0.tar.gz
# cd yasm-1.2.0
# ./configure –prefix=”$HOME/ffmpeg_build” –bindir=”$HOME/bin”
# make
# make install
# export “PATH=$PATH:$HOME/bin”

8) Install Libvpx
————–
It is a video compression format owned by Google.

# cd /opt
# git clone http://git.chromium.org/webm/libvpx.git
# cd libvpx
# git checkout tags/v.1.3.0
# ./configure –prefix=”$HOME/ffmpeg_build” –disable-examples
# make
# make install

9) Install X264
————
It is a free software library for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License.

# cd /opt
# git clone git://git.videolan.org/x264.git
# cd x264
# ./configure –prefix=”$HOME/ffmpeg_build” –bindir=”$HOME/bin” –enable-static
# make
# make install

10) Configure Libraries
——————-

# export LD_LIBRARY_PATH=/usr/local/lib/
# echo /usr/local/lib >> /etc/ld.so.conf.d/custom-libs.conf
# ldconfig (:::It configures dynamic linker run-time bindings)
11) Now compile FFMPEG
——————

# cd /opt
# git clone git://source.ffmpeg.org/ffmpeg.git
# cd ffmpeg
# git checkout release/2.2
# PKG_CONFIG_PATH=”$HOME/ffmpeg_build/lib/pkgconfig”
# export PKG_CONFIG_PATH

(((Following compile options have to given line by line)))

# ./configure –prefix=”$HOME/ffmpeg_build” –extra-cflags=”-I$HOME/ffmpeg_build/include” –extra-ldflags=”-L$HOME/ffmpeg_build/lib” –bindir=”$HOME/bin” \
–extra-libs=-ldl –enable-version3 –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libvpx –enable-libfaac \
–enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libvo-aacenc –enable-libxvid –disable-ffplay \
–enable-gpl –enable-postproc –enable-nonfree –enable-avfilter –enable-pthreads

(((The –arch=x86_64 option should only be used if you are on a 64Bit System!)))

# make
# make install

 

An error you might come across while compiling FFMPEG
============================================

Error: libfaac not found
—————–
# cd /opt
# wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
# cd faac-1.28
# ./configure –prefix=”$HOME/ffmpeg_build” –disable-shared
# make
# make install

Then compile ffmpeg again in step 11.
Some error you encounter after compilation
=================================
# ffmpeg -version
ffmpeg: error while loading shared libraries: libvo-aacenc.so.0: cannot open shared object file: No such file or directory

For this,

# ldd `which ffmpeg`
linux-gate.so.1 => (0x00872000)
libasound.so.2 => /lib/libasound.so.2 (0x07533000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00110000)
libpthread.so.0 => /lib/libpthread.so.0 (0x007e7000)
libvo-aacenc.so.0 => not found
libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00f68000)
libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00a3a000)
libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x001b0000)
libm.so.6 => /lib/libm.so.6 (0x0082b000)
libz.so.1 => /lib/libz.so.1 (0x00816000)
librt.so.1 => /lib/librt.so.1 (0x0080b000)
libdl.so.2 => /lib/libdl.so.2 (0x00804000)
libc.so.6 => /lib/libc.so.6 (0x0065a000)
/lib/ld-linux.so.2 (0x00638000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x07afb000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x077af000)

# find / -iname libvo-aacenc.so.0
/root/ffmpeg_build/lib/libvo-aacenc.so.0

# ln -s /root/ffmpeg_build/lib/libvo-aacenc.so.0 /lib/libvo-aacenc.so.0

# ll /lib/libvo-aacenc.so.0
lrwxrwxrwx. 1 root root 40 Aug 9 17:37 /lib/libvo-aacenc.so.0 -> /root/ffmpeg_build/lib/libvo-aacenc.so.0
==========================================
Finally you are done with FFMPEG installation 🙂

# ffmpeg -version
ffmpeg version n2.2.6
built on Aug 7 2014 17:44:37 with gcc 4.4.5 (GCC) 20101112 (Red Hat 4.4.5-2)
configuration: –prefix=/root/ffmpeg_build –extra-cflags=-I/root/ffmpeg_build/include –extra-ldflags=-L/root/ffmpeg_build/lib –bindir=/root/bin –extra-libs=-ldl –enable-version3 –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libvpx –enable-libfaac –enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libvo-aacenc –enable-libxvid –disable-ffplay –enable-gpl –enable-postproc –enable-nonfree –enable-avfilter –enable-pthreads
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100

 

See complete list of ffmpeg options using # ffmpeg -h full | less
Now I am just showing, how to convert a video type to another format. I am converting a mp4 video to avi

# ffmpeg -i my_video.mp4 my_video.avi
ffmpeg version n2.2.6 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 7 2014 17:44:37 with gcc 4.4.5 (GCC) 20101112 (Red Hat 4.4.5-2)
configuration: –prefix=/root/ffmpeg_build –extra-cflags=-I/root/ffmpeg_build/include –extra-ldflags=-L/root/ffmpeg_build/lib –bindir=/root/bin –extra-libs=-ldl –enable-version3 –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libvpx –enable-libfaac –enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libvo-aacenc –enable-libxvid –disable-ffplay –enable-gpl –enable-postproc –enable-nonfree –enable-avfilter –enable-pthreads
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘my_video.mp4’:
Metadata:
major_brand : FACE
minor_version : 1337
compatible_brands: isomavc1FACE
creation_time : 2013-01-18 03:43:54
Duration: 00:00:59.23, start: 0.000000, bitrate: 325 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 400×224, 230 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2013-01-18 03:43:54
handler_name : /tmp/tmpIZkUUJ/540138109343874.mp4_video.264 – Imported with GPAC 0.4.6-DEV-rev3544
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 93 kb/s (default)
Metadata:
creation_time : 2013-01-18 03:43:54
handler_name : /tmp/tmpIZkUUJ/540138109343874.mp4_audio.aac – Imported with GPAC 0.4.6-DEV-rev3544
Output #0, avi, to ‘my_video.avi’:
Metadata:
major_brand : FACE
minor_version : 1337
compatible_brands: isomavc1FACE
ISFT : Lavf55.33.100
Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 400×224, q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc (default)
Metadata:
creation_time : 2013-01-18 03:43:54
handler_name : /tmp/tmpIZkUUJ/540138109343874.mp4_video.264 – Imported with GPAC 0.4.6-DEV-rev3544
Stream #0:1(und): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp (default)
Metadata:
creation_time : 2013-01-18 03:43:54
handler_name : /tmp/tmpIZkUUJ/540138109343874.mp4_audio.aac – Imported with GPAC 0.4.6-DEV-rev3544
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Stream #0:1 -> #0:1 (aac -> libmp3lame)
Press [q] to stop, [?] for help
frame= 1773 fps=182 q=9.1 Lsize= 2725kB time=00:00:59.24 bitrate= 376.8kbits/s
video:1694kB audio:926kB subtitle:0 data:0 global headers:0kB muxing overhead 4.021155%

ffmpeg

 

You are good to go now 🙂