Extracting Frames from video and Re encoding images into video using ASP.NET Media Handler Pro.

Posted on July, 2010 by Moderator.
You can use the following code through ASP.NET Media Handler Pro
component to extract all frames of video into jpg images.
Extracting Frames:

_mhandler.InputPath = RootPath + "\\contents\\original";
_mhandler.OutputPath = RootPath + "\\contents\\thumbs";
_mhandler.FileName = "xmen-origins-wolverine.mp4";
_mhandler.OutputFileName = "sample_";
_mhandler.OutputExtension = "%010d.jpg";
_mhandler.Force = "image2";
VideoInfo info = _mhandler.Process();

Re Encoding Frames / Images into Video:
Example below will encode all jpg frames into flash flv video, you can
encode it in any format.

_mhandler.InputPath = RootPath + "\\contents\\thumbs";
_mhandler.OutputPath = RootPath + "\\contents\\flv";
_mhandler.FileName = "sample_.%010d.jpg";
_mhandler.OutputFileName = "sample_img_vid";
_mhandler.OutputExtension = "flv";
_mhandler.Force = "flv";
// _mhandler.MaxQuality = true;
_mhandler.Audio_Bitrate = 32;
_mhandler.Audio_SamplingRate = 22050;
VideoInfo info = _mhandler.Process();

If you receive Error Code 101, you can request updated MHP through our
support email.

Rate:
1 ratings
Views: 132 views
Bookmark:
©2007 - 2010, MediaSoft Pro Inc  | Site Map