ASP.NET Media Handler Pro

Powerful C# FFMPEG Wrapper for .NET Framework Applications
ASP.NET Media Handler Pro - Screenshot

Overview

ASP.NET Media Handler Pro is a powerful and most advance ffmpeg wrapper for .net framework application that can help you process media files by executing
any level of ffmpeg commands in background, sharing processing data (including media, error log or progress stats) with application.

It can process any size or format of video without effecting performance of your application.

It can also be use in any type of .NET Framework compatible applications including asp.net, mobile backened or windows applications. 

ASP.NET Core Version

ASP.NET Media Handler Pro works with applications that rely on .NET Framework. For ASP.NET Core platform, please click on link below.

Browse

Features Overview

List of main features of ASP.NET Media Handler Pro component.
Publish Videos

Publish Videos

Powerful utility for publishing, encoding or trans-coding any format video to mp4, wmv, avi, mpeg, hls, mpeg-dash and other formats

Capture Thumbnails

Capture Thumbnails

It can allow you to capture single or multiple thumbnails from start to end of any format video.

HLS & MPEG Dash

HLS & MPEG Dash

It can be used to publish and generate HLS and MPEG-DASH playlists with multiple channel trans-coding for adaptive media streaming.

Create Clips

Create Clips

It can also be used to split and format video into two or more smaller clips

Join Videos

Join Videos

It can be used to join two ore more clips into single video and trans-code it in any format.

Process Information

Process Information

It include powerful script to gather and send processed video information as an c# object that can be easily available in your application.

Examples

List of sample example codes for using ASP.NET Media Handler Pro in your code.

Publish MP4 Video

var _mhandler = new MediaHandler();
var RootPath = Server.MapPath(Request.ApplicationPath);
_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
// setup input directory path where source video exist
_mhandler.InputPath = RootPath + "\\source";
// setup output directory path where published video will save
_mhandler.OutputPath = RootPath + "\\published";
_mhandler.FileName = "sample.avi";
_mhandler.OutputFileName = "sample";
_mhandler.OutputExtension = ".mp4";
// setup encoding preset. recommended to update with your required settings
_mhandler.Parameters = "-s 640x380 -c:v libx264 -preset medium 
-crf 22 -b:v 500k -b:a 128k -profile:v baseline -level 3.1";
VideoInfo info = _mhandler.Process(); 

if(info.ErrorCode > 0) {
   Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
   Response.Write(info.FFMPEGOutput);
   return;
}
else {
   Response.Write("Processing Successful");
}

Grab Thumbnails

Generate one or more thumbnails from start to end of video

var _mhandler = new MediaHandler();
var RootPath = Server.MapPath(Request.ApplicationPath);
_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
// setup input directory path where source video exist
_mhandler.InputPath = RootPath + "\\source";
// setup output directory path where generated thumbnail will save
_mhandler.OutputPath = RootPath + "\\thumbs";
// source media to capture thumbnail from
_mhandler.FileName = "sample.mp4";
_mhandler.Image_Format = "jpg";
_mhandler.VCodec = "image2";
// setup start prefix for images. e.g "sample_" will output "sample_001.jpg, sample_002.jpg etc"
_mhandler.ImageName = "sample_;
_mhandler.Multiple_Thumbs = true;
_mhandler.ThumbMode = 0;
_mhandler.No_Of_Thumbs = 15;
// enter start position e.g 5 for 5 seconds
_mhandler.Thumb_Start_Position = 5;
_mhandler.BackgroundProcessing = false; // either true or false based on your requirement.
// setup width and height of thumbnail
_mhandler.Width = width;
_mhandler.Height = height;
VideoInfo tinfo = med.Grab_Thumb();
if (tinfo.ErrorCode > 0)
{
    // Error occured in grabbing thumbs
    return info;
}
else
{
   // thumbnail captured
}

 

Generate single thumbnail from video example


var _mhandler = new MediaHandler();
var RootPath = Server.MapPath(Request.ApplicationPath);
_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
// setup input directory path where source video exist
_mhandler.InputPath = RootPath + "\\source";
// setup output directory path where published video will save
_mhandler.OutputPath = RootPath + "\\published";
// source media to capture thumbnail from
_mhandler.FileName = "sample.mp4";
// start image position e.g 45 in seconds or "00:00:45" format
_mhandler.InitialCommands = "-ss 45";
_mhandler.Parameters = "-vf thumbnail,scale=400:300 -qscale:v 2 -frames:v 1 -f image2 -c:v mjpeg"
VideoInfo tinfo = med.Process();
if (tinfo.ErrorCode > 0)
{
    // Error occured in grabbing thumbs
    return info;
}
else
{
   // thumbnail captured
}

Fetch Information

Retrieve information from video, audio or image files

Every function in ASP.NET Media Handler Pro returns VideoInfo object after process media file. You can retrieve processed video information via example code shown below

var info = _mhandler.Process();
if (info.ErrorCode > 0)
{
     Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
     Response.Write(info.FFMPEGOutput);
     return;
}
else
{
    var str = new StringBuilder();
    str.Append("File Name= " + info.FileName);
    str.Append("Video Duration= " + info.Duration);
    str.Append("Video Duration in Seconds= " + info.Duration_Sec);
    // Input values     
    str.Append("Video Codec= " + info.Input_Vcodec);
    str.Append("Audio Codec= " + info.Input_Acodec);
    str.Append("Video Bitrate= " + info.Input_Video_Bitrate);
    str.Append("Audio Bitrate= " + info.Input_Audio_Bitrate);
    str.Append("Audio Sampling Rate= " + info.Input_SamplingRate);
    str.Append("Audio Channel= " + info.Input_Channel);
    str.Append("Width= " + info.Input_Width);
    str.Append("Height= " + info.Input_Height);
    str.Append("Video FrameRate= " + info.Input_FrameRate);
    // Output values
    str.Append("Video Codec= " + info.Vcodec);
    str.Append("Audio Codec= " + info.Acodec);
    str.Append("Video Bitrate= " + info.Video_Bitrate);
    str.Append("Audio Bitrate= " + info.Audio_Bitrate);
    str.Append("Audio Sampling Rate= " + info.SamplingRate);
    str.Append("Audio Channel= " + info.Channel);
    str.Append("Width= " + info.Width);
    str.Append("Height= " + info.Height);
    str.Append("Video FrameRate= " + info.FrameRate);
    str.Append(".................................");
    str.Append("FFMPEG Output:" + info.FFMPEGOutput);
    str.Append("Error Code= " + info.ErrorCode);
    Response.Write(str.ToString());
}

 

You can directly use Get_Info() function to retrieve information without processing media file. e.g Retrieving width and height of video via example code


VideoInfo info = _mhandler.Get_Info();
if (info.ErrorCode > 0 && info.ErrorCode != 121)
{
     Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
     return;
}
if (info.Width == 0 || info.Height == 0)
{
   Response.Write("Information Failed To Retrieve");\
   return;
}
var Size = info.Width + "x" + info.Height
// determine video aspect ration
var source_aspect = (real)info.Width / info.Height

Create Video Clip

Example code for creating 2 minute clip starting from 45th second

var _mhandler = new MediaHandler();
var RootPath = Server.MapPath(Request.ApplicationPath);
_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
// setup input directory path where source video exist
_mhandler.InputPath = RootPath + "\\source";
// setup output directory path where published video will save
_mhandler.OutputPath = RootPath + "\\published";
// source video
_mhandler.FileName = "sample.mp4";
// clip filename
_mhandler.OutputFileName = "sample";
_mhandler.OutputExtension = ".mp4";
// start clip position e.g 45 in seconds or "00:00:45" format
_mhandler.InitialCommands = "-ss 45";
// setup encoding preset. recommended to update with your required settings
// -t = duration in seconds or "00:02:00" 
_mhandler.Parameters = "-t 120 -c copy";
VideoInfo info = _mhandler.Process(); 
if(info.ErrorCode > 0) {
   Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
   Response.Write(info.FFMPEGOutput);
   return;
}
else {
   Response.Write("Processing Successful");
}

Post Watermark

Encode and post watermark on video example

var _mhandler = new MediaHandler();
var RootPath = Server.MapPath(Request.ApplicationPath);
_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
// setup input directory path where source video exist
_mhandler.InputPath = RootPath + "\\source";
// setup output directory path where published video will save
_mhandler.OutputPath = RootPath + "\\published";
_mhandler.FileName = "sample.avi";
_mhandler.OutputFileName = "sample";
_mhandler.OutputExtension = ".mp4";
// watermark settings
/* this will target ffmpeg bin directory as default root directory. 
 If you place here you have not needed to setup absolute path or relative path
 that create problem in some conditions */
var WatermarkPath = "logo.png";
//Post Watermark on Top Left of Video
var watermark_script = "-vf \\"movie=" + WatermarkPath + " [watermark]; [in][watermark] overlay=10:10 [out]\\"";
// Post Watermark on Top Right of Video
//watermark_script = "-vf \\"movie=" + WatermarkPath + " [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]\\"";
// Post Watermark on Bottom Left of Video
//watermark_script = "-vf \\"movie=" + WatermarkPath + " [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]\\"";
// Post Watermark on Bottom Right of Video
//watermark_script = "-vf \\"movie=" + WatermarkPath + " [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]\\"";
// setup encoding preset. recommended to update with your required settings
_mhandler.Parameters = watermark_script + " -s 640x380 -c:v libx264 -preset medium 
-crf 22 -b:v 500k -b:a 128k -profile:v baseline -level 3.1";
VideoInfo info = _mhandler.Process(); 
if(info.ErrorCode > 0) {
   Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
   Response.Write(info.FFMPEGOutput);
   return;
}
else {
   Response.Write("Processing Successful");
}

 

Post watermark on image

var _mhandler = new MediaHandler();
var RootPath = Server.MapPath(Request.ApplicationPath);
_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
// setup input directory path where source video exist
_mhandler.InputPath = RootPath + "\\source";
// setup output directory path where published video will save
_mhandler.OutputPath = RootPath + "\\published";
// source media to capture thumbnail from
_mhandler.FileName = "sample.mp4";
// start image position e.g 45 in seconds or "00:00:45" format
_mhandler.InitialCommands = "-ss 45";
// watermark settings, logo.png assume its located in /ffmpeg/bin directory 
var watermark_script = "-vf movie=logo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]";
_mhandler.Parameters = watermark_script + " -s 400x300 -qscale:v 2 -frames:v 1 -f image2 -c:v mjpeg"

VideoInfo tinfo = med.Process();
if (tinfo.ErrorCode > 0)
{
    // Error occured in grabbing thumbs
    return info;
}
else
{
   // thumbnail captured
}

Pricing

Current Version

  • Unlimited License
  • 100% Source Code
  • 24x7 Priority Email Support
  • One Year Free Upgrade
  • Integration & Customization Assistance Available
$59One Time

ASP.NET Core

  • Unlimited License
  • 100% Source Code
  • 24x7 Priority Email Support
  • One Year Free Upgrade
  • Integration & Customization Assistance Available
$59One Time

Current Version + Video Uploader

  • Unlimited License
  • 100% Source Code
  • Full Technical Support
  • One Year Free Upgrade
  • Integration & Customization Assistance Available
$89One Time

ASP.NET Core Version + Video Uploader

  • Unlimited License
  • Full Technical Support
  • One Year Free Upgrade
  • Integration & Customization Assistance Available
$129One Time

Complete Video Solution (Core Platform)

  • Responsive Layouts
  • 100% Source Code
  • Advance Control Panel
  • Tons of Customization Options
  • Support for Premium Templates
  • 24x7 Priority Email Support
  • One Year Free Upgrade
  • Customization Options Available
$699One Time

Frequently Asked Questions

Which type of applications it is compatible with?

ASP.NET Media Handler Pro component is purely written using c# (.net framework 2.0) that can be used with any type of .net application including web, mobile, windows, web apis, web services and more. 

It is not compatible with ASP.NET Core Platform. We built jMediaHandler for ASP.NET Core platform.

What is the difference between paid and free version?

Free version have feature rescription instead of time restriction. Features include

  • Free version can publish upto certain duration of video while full version have no such restriction.
  • Paid version support background video processing
  • Paid version also have some advance features like join videos, split videos, hls & mpeg dash stream creation and more

Is there free upgrade available for existing customers?

Yes existing customer can request for free upgrade any time within one year of purchase date. After one year, custom should pay 30% of product cost as upgrade charges to renew upgrade for one more year

Is provided examples in ASP.NET Media Handler Pro are upto-date?

Examples shown in our website may or may not work with certain version of FFMPEG. We recommend using latest version of ffmpeg and update codes, attributes and settings accordingly with supported options.

How can i purchase ASP.NET Media Handler Pro?

You can buy ASP.NET Media Handler Pro from purchase section. By default we support buying our products through Share-It. We can alernatively accept payments via Paypal. Please contact if you have any problem buying our product through existing provider.

What are license and terms of conditions for purchasing product?

We offer one year free upgrade after purchasing our product. After one year customer have to pay 30% of upgrade charges to get latest bundle and renew free upgrade for one more year. Please visit our Terms of Use page for more detail about our terms of use and services

Is technical support provided after purchase?

Yes we can provide full technical support and free installation to almost all products purchased by customer on request

What is refund policy?

We provide full refund within 60 days after purchasing our product incase customer not satisfied from our product or our product not meet with customer requirements.