FFMPEG is a cross platform for handling and processing any type of multimedia data.

Media Handler Pro uses ffmpeg and other related open source utilities for pubilshing any format videos to another format, grab thumbs, post watermark, extract audio, set meta information, join or split videos, retrieve video information and all other advance processing in background.

Media Handler Pro targets mostly asp.net, c# and vb.net products but its free extended utility is also available for php.

List of utility that can be supported by Media Handler Pro.

  • FLVTOOL (rarely used now for setting meta information to flash flv videos)
  • MP4Box (for settings meta information to mp4 videos)
  • ffmpeg2theora (for publishing ogg, ogv videos and audio files)
  • and other.

Among all tools, ffmpeg is the core utility used by Media Handler Pro for most of its operations


We recommend you to download latest ffmpeg windows build from here before starting using media handler pro.

Sample Example

Sample code for publishing mp4 video using media handler pro and ffmpeg.

// set root path
string RootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath).Replace("\\","/");
// set ffmpeg path
_mhandler.FFMPEGPath = RootPath + "/ffmpeg/bin/ffmpeg.exe";
_mhandler.FFMPEGPath = _mhandler.FFMPEGPath.Replace("\\", "/");
// set source video folder path
_mhandler.InputPath = RootPath + "/contents/original";
// set published video path
_mhandler.OutputPath = RootPath + "/contents/mp4"; 
// enable background video processing
_mhandler.BackgroundProcessing = true;
// set source video name
_mhandler.FileName = "sample.mpg";
// set output filename without extension
_mhandler.OutputFileName = "sample";
// set output video / audio extension
_mhandler.OutputExtension = ".mp4"; 
// execute all ffmpeg commands 
// note make sure these commands must be supported by ffmpeg build you are using otherwise final output may be failed or corrupted
_mhandler.Parameters = "-f mp4 -movflags faststart -vcodec libx264 -vprofile main -s 640x480 -r 25 -b:v 500k -acodec libvo_aacenc -b:a 64k -ac 2 -async 1 -vsync 1 -bufsize 
// start video publishing
VideoInfo info = _mhandler.Process();
if (info.ErrorCode > 0)
Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated
" + info.ErrorMessage);

If Process() function returns value other than zero. it shows error occurred while processing video. You can check detail of error description here.

There are various builtin properties in media handler pro. we recommend you not to use it as most of properties may or may not work with version of ffmpeg build you will use. Just use standard

_mhandler.Parameters = "ffmpeg all commands here";

for publishing, transcoding and processing any operation.