.Net Components, Tools and Utilities
Home About us Contact us Products Support Faq News Login
Product Menu
Product Overview
Product Features
Who Will Buy
 
Developer Guide
Pre Requisites
Integration Guide
C# Samples
VB.Net Samples
Class Members
Trial vs Purchased
 
My Account
Register Free
My Account
Login
Free Online Tools Convert c# to vb | Convert vb to c# | ASP.Net Machine Key Generator
JavaScript code Compressor | CSS code Compressor    
 


C# Code Samples - Convert Videos and Audios

Below you will find all the needed code samples in c#.net language for how to use Media Manager Pro Video Processing component. You can use Media manager pro many ways, either you can convert videos from one format to another format, grab single or multiple thumbnails from your videos, post watermak on videos to prove your ownership on your videos, Retreive output video information, Check if input file is in video format or in audio format, set meta information for FLV videos and many more.

.NET Media Manager Pro Component
.NET Media Manager Pro Component
Trial: Free Trial vs Prchased
cost: $69
Downloads: 2211
Rating: Product Rating
Download .NET Media Manager Pro Component

Buy .NET Media Manager Pro Component
Free online tool to convert c# to vb
 
 
Convert any format video into .flv format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg and flvtoo files

oMediaManagerPro.FLVTool_Path = HttpContext.Current.Server.MapPath("~\\flvtool\\flvtool2.exe");

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\flv";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.flv";

//set outpu to buffering for flv videos

string output = oMediaManagerPro.Set_Buffering();

//set meta information for flv file

oMediaManagerPro.Video_Bitrate = 300;

oMediaManagerPro.Audio_Bitrate = 64;

oMediaManagerPro.Audio_SamplingRate = 22050;

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_FLV();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .avi format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\avi";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.avi";

//call ConvertTo_AVI method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_AVI();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .mov format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mov";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.mov";

//call ConvertTo_MOV method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MOV();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .mpg format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.avi";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mpg";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.mpg";

//call ConvertTo_MPG method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MPG();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .wmv format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\wmv";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.wmv";

//call ConvertTo_WMV method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_WMV();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .m4v format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\m4v";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.m4v";

//call ConvertTo_M4V method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_M4V();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format audio or video into .m4a format audio

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\m4a";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.m4a";

//call ConvertTo_M4V method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_M4A();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format audio or video into .mp3 format audio

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mp3";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.mp3";

//set sampleing rate for pm3 file

oMediaManagerPro.Audio_SamplingRate = 48000;

//call ConvertTo_MP3 method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP3();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format audio or video into .wma format audio

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\wma";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.wma";

//call ConvertTo_MP3 method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_WMA();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .mp4 format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mp4";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.mp4";

//call ConvertTo_MP3 method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP4();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Convert any format video into .3gp format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\3gp";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.3gp";

//set codec information for 3gp file

oMediaManagerPro.Video_Codec = "mpeg4";

oMediaManagerPro.Video_Bitrate = 100;

oMediaManagerPro.Frame_Rate = 15;

oMediaManagerPro.Audio_Codec = "libfaac";

oMediaManagerPro.Audio_Bitrate = 48;

oMediaManagerPro.Audio_SamplingRate = 22000;

//call ConvertTo_MP3 method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_3GP();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

}

Grab single thumbnail image from any format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\Thumbs";

//Single Thumb - Properties available in free version

oMediaManagerPro.Frame_Time = "5";

oMediaManagerPro.Image_Format = "jpg";

oMediaManagerPro.Image_Name = "Image_" + DateTime.Now.Ticks;

//Single Thumb - Properties available in full version

//oMediaManagerPro.Width = 320;

//oMediaManagerPro.Height = 240;

//grab thumbnails

MediaInfo oMediaInfo = oMediaManagerPro.Grab_Thumb();

#region Print Output Information

StringBuilder strOutputInfo = new StringBuilder();

strOutputInfo.Append("Image Created = " + oMediaInfo.File_Name + "<br />");

HttpContext.Current.Response.Write(strOutputInfo);

#endregion

Grab multiple thumbnail images from any format video

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\Thumbs";

//Approach No 1: //// Multiple Thumbs without automatic transition time

oMediaManagerPro.Multiple_Thumbs = true;

oMediaManagerPro.No_Of_Thumbs = 15;

oMediaManagerPro.Thumb_Transition_Time = 1;

oMediaManagerPro.Thumb_Start_Position = 5;

//Approach No 2: // Multiple Thumbs with automatic transition time

oMediaManagerPro.Auto_Transition_Time = true;

oMediaManagerPro.Multiple_Thumbs = true;

oMediaManagerPro.No_Of_Thumbs = 15;

oMediaManagerPro.Thumb_Start_Position = 5;

//grab thumbnails

MediaInfo oMediaInfo = oMediaManagerPro.Grab_Thumb();

Get media information about any format media file

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

////set the source and output file name

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

MediaInfo oMediaInfo = oMediaManagerPro.Get_MediaInfo();

#region Print Output Information

StringBuilder strOutputInfo = new StringBuilder();

strOutputInfo.Append("File Name= " + oMediaInfo.File_Name + "<br />");

strOutputInfo.Append("Audio Codec= " + oMediaInfo.Audio_Codec + "<br />");

strOutputInfo.Append("Video Codec= " + oMediaInfo.Video_Codec + "<br />");

strOutputInfo.Append("Video Bitrate= " + oMediaInfo.Video_Bitrate + "<br />");

strOutputInfo.Append("Audio Bitrate= " + oMediaInfo.Audio_Bitrate + "<br />");

strOutputInfo.Append("Audio Sampling Rate= " + oMediaInfo.Sampling_Rate + "<br />");

strOutputInfo.Append("Audio Channel= " + oMediaInfo.Channel + "<br />");

strOutputInfo.Append("Video Frame_Rate= " + oMediaInfo.Frame_Rate + "<br />");

strOutputInfo.Append("Video Duration= " + oMediaInfo.Duration + "<br />");

strOutputInfo.Append("Video Duration in Seconds= " + oMediaInfo.Duration_Sec + "<br />");

strOutputInfo.Append("Width= " + oMediaInfo.Width + "<br />");

strOutputInfo.Append("Height= " + oMediaInfo.Height + "<br />");

HttpContext.Current.Response.Write(strOutputInfo.ToString());

#endregion

Check media file format if it is an audio or a video file

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.mpg";

//check file format

string strMediaFormat = oMediaManagerPro.GetMedia_Format();

HttpContext.Current.Response.Write("Current file is in <b>" + strMediaFormat + "</b> format");

Crop any format video at the time of conversion

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.avi";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mpg";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer-cropped.mpg";

//Crop picture

oMediaManagerPro.Crop_Top = 40;

oMediaManagerPro.Crop_Left = 40;

oMediaManagerPro.Crop_Bottom = 40;

oMediaManagerPro.Crop_Right = 40;

//call ConvertTo_AVI method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MPG();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Add padding to any format video at the time of conversion

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.avi";

//set output file info

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mpg";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer-padded.mpg";

//Crop picture

oMediaManagerPro.Pad_Top = 40;

oMediaManagerPro.Pad_Left = 40;

oMediaManagerPro.Pad_Bottom = 40;

oMediaManagerPro.Pad_Right = 40;

//call ConvertTo_MPG method

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MPG();

// retrieve video informatioin

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

Post watermark on any format video at the time of conversion

//Declare object of class MediaManagerPro

MediaManagerPro oMediaManagerPro = new MediaManagerPro();

//Get the rooth path

 

string strRootPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath);

//set the directory path info for ffmpeg file

 

oMediaManagerPro.FFMPEG_Path = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");

//Set source file info

 

oMediaManagerPro.SourceFile_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.SourceFile_Name = "GuitarPlayer.avi";

//set output file info

 

 

oMediaManagerPro.OutputFile_Path = strRootPath + "\\contents\\mpg";

oMediaManagerPro.OutputFile_Name = "GuitarPlayer.flv";

//watermark related properties (This require the shared build of ffmpeg.)

 

 

oMediaManagerPro.WaterMark_Path = strRootPath + "\\contents\\Source";

oMediaManagerPro.WaterMark_Image = "watermark.gif";

//call ConvertTo_AVI method

 

 

MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_FLV();

// retrieve video informatioin

 

if (oMediaInfo.Error_Code > 0)

{

HttpContext.Current.Response.Write(":: Video processing failed ::<br/>Error code: " + oMediaInfo.Error_Code + "<br />Error Message: " + oMediaInfo.Error_Message);

return;

}

 

 

 

 
Sample Code Menu
Convert to FLV
Convert to AVI
Convert to MOV
Convert to MPG
Convert to WMV
Convert to M4V
Convert to M4A
Convert to MP3
Convert to WMA
Convert to MP4
Convert to 3GP
Grab Single Thumbnail
Grab Multiple Thumbnails
Get Media Information
Check Media Format
Crop Video
Add Padding to Video
Post Watermark on Video
  © Copyright 2012 HelpProgrammers. Terms and Conditions  |  Sitemap  |  Links  | Links2 All Rights Reserved.