You can use the following sample code to publish any format video to flash flv, mp4, vp8 webm, ogg vorbis, grab thumb in one step using ASP.NET Media Handler Pro.
Note: You need to download latest ffmpeg build with support of VP8 codec
Sample Code:
[quote]
_mhandler.InputPath = RootPath + "\\contents\\original";
_mhandler.OutputPath = RootPath + "\\contents\\output";
VideoInfo info = new VideoInfo();
_mhandler.FileName = "sample.wmv";
_mhandler.OutputFileName = "sample";
//***************************************
//FLV Encoding
&.... read more.
|
Everyone who has visited YouTube.com in the past four years knows that you can embed video in a web page. But prior to HTML5, there was no standards-based way to do this. Every video you've watched on the web has been funneled through a third party plugin (QuickTime, RealPlayer, Flash).
HTML5 defines a standard way to embed video in a web page, using a <video> element. Support for the <video> element is still evolving, which is a polite way of saying it doesn’t work yet. At least, it doesn’t work everywhere. But don’t despair! There are alternatives and fallbacks and options.
Video Codecs:
There are tons of video codecs. The three most relevant codecs are H.264, Theora, and VP8.
i H.264 is also known as “MPEG-4 part 10,” a.k.a. “MPEG-4 AVC,” a.k.a. “MPEG-4 Advanced Video Coding.” H.264 was also devel.... read more.
|
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.
[quote]
_mhandler.InputPath = RootPath + "\\contents\\thumbs";
_mhandler.OutputPath = RootPath + "\\contents\\flv";
_mhandler.FileName = &qu.... read more.
|
ASP.NET Video Uploader Control (.ascx file) include complex script that can handle video uploading, publishing to flash flv format, grabing single or multiple thumbs, set meta data for flash flv video, output validation and retrieve useful information from video in one step just by dragging control on page by allowing developer to avoid writing lots of code.
Features:
Main features in ASP.NET Video Uploader Control includes,
- Video Uploading
- Video publishing using .NET Media Handler Pro component.
- Set Meta Information for flash flv video.
- Grab single or multiple thumbs.
- Post watermark on output video. (optional)
- Validation of source and output video.
- Create audio mp3 file (optional).
- and more.
Languages:
ASP.NET Video Uploader Control suppo.... read more.
|
.NET Media Handler Pro media processing component version 5.0 has been released with lots of improvements, addition of advance features and simplifying code for handling advance level of media processing.
What's New in Media Handler Pro 5.0:
- Generalize way to process any format media file to another format. learn more.
- Joining and encoding two or more video clips in one output file.
- Improved script for splitting video in small clips.
- Images to video conversion.
- Improved script for grabbing multiple thumbs. Now support grabbing thumbs from long length videos.
- Support using x264 preset files for encoding high quality h264 videos using libx264 codec.
- Redesigned parsing script for more efficiently retrieving media information from videos.
- More control on error handling and information parsing.
Media Handler Pro.... read more.
|
When you encode normal video (4:3 aspect ration) to widescreen (16:9) video, or in reverse widescreen to normal video, video is stretch out and in result output distorted or bad in view and quality.
In order to avoid video stretching out and keep aspect ratio of video persistent, you can use technique called pillars. This is the "pure" method as it does not distort or lose any part of the original video or image. In this technique you will calculate space and add padding accordingly on proper direction to keep the aspect ratio of video consistent.
Logic to calculate padding size and direction.
1: Widescreen (16:9) to Normal (4:3) video conversion:
Example:
i: Calculate width and height of source video (16:9): e.g 800x450 = 1.7777.
ii: Width and height of normal video that you want to publish e.g 320x240 = 1.333.
iii: Actual widescreen height of.... read more.
|
ASP.NET Media Handler Pro is an ASP.NET video encoding utility that provide ability to publish / encode any format videos from one format to another format, prepare videos to be stream on the web, grab single / multiple thumbs, post watermark, retrieve information from videos and perform lots of other useful video processing tasks.
You can use ASP.NET Media Handler Pro component in any applications that is compatible with Microsoft .NET Framework.
Application may include.
- ASP.NET web applications written in C# or VB.NET.
- .NET windows based applications.
- .NET web services.
- .NET win services.
- and more.
Main purpose of ASP.NET Media Handler Pro is to
- Encode videos to be stream and play on variety of devices and web browsers.
- Grab thumbs to represent videos in galleries.
- Post watermark on videos while encoding to protect copyright conte.... read more.
|