MOV Video

Media Handler Pro can be used to create MOV video files. View examples below or contact us for more help.

Example shown below is related with Media Handler Pro version 3.0 or later.

Sample Code: Encode video to MOV Video - C#

Sample code for encoding video to .avi video using Media Handler Pro version 3.0 or later.
Using Encode_MOV() function default options

// Sample code for encoding any format video to mov format.
MediaHandler _mhandler = new MediaHandler();

// required properties

string RootPath = Server.MapPath(Request.ApplicationPath);

_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
_mhandler.InputPath = RootPath + "\\contents\\video";
_mhandler.OutputPath = RootPath + "\\contents\\mov";
_mhandler.FileName = "sample.mpg";

// setting video related properties, required in case of mov video otherwise may result in failure of video encoding.

_mhandler.FrameRate = 29.97;
_mhandler.Video_Bitrate = 786;
_mhandler.Audio_Bitrate = 64;
_mhandler.Audio_SamplingRate = 24000;

// generate highest quality mov video, note by making this option true, video bitrate will no longer work.

_mhandler.MaxQuality = true;

// optional video width and height settings

_mhandler.Width = 320;
_mhandler.Height = 240;

// optional video and audio codec settings, make sure it is compatible with mov, mp4, m4v video otherwise result in failure of video encoding.

_mhandler.ACodec = "libfaac";
_mhandler.VCodec = "mpeg4";

// posting watermark on mov video, view detail in watermark section
_mhandler.WaterMarkPath = RootPath + "\\contents\\watermark";
_mhandler.WaterMarkImage = "watermark.gif";

// view more options in component documentation.

// Encode MOV Video using Media Handler Pro version 3.0

string output = _mhandler.Encode_MOV();

// Encode MOV Video using Media Handler Pro version 4.0 or later

VideoInfo info = _mhandler.Encode_MOV();

// Check for errors
if (info.ErrorCode > 0)
{
Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
return;
}

// Retrieve output information from VideoInfo Object. View Detail


©2007 - 2009, MediaSoft Pro Inc  | Site Map