Free and Paid Membership in ASP.NET Video Starter Kit 6.0

02 November 2011

ASP.NET Video Starter Kit version 6.0 introduced new level of membership management. Now site administrator can allocate resources, restrict account usage for free members and allow paid members to enhance their account usages and credits by purchasing paid packages.

Now site administrator can

    • Enable, Disable Resource Allocation and Membership Process
    • Create unlimited number of free and paid packages
    • Assign any free package with free user
    • Free user can upgrade their membership by purchasing any of available paid package.
    • Paypal integration of payment
    • Payment history will be generated for user under purchase history section and for site administrator.
    • User account resources will be upgraded according to package purchased.


Enable Package Management:

It can be enabled from control panel -> settings -> configurations -> features -> display packages

Manage Packages:

Packages can be managed through control panel -> settings -> package management section

Site administrator can add unlimited number of free and paid packages and can update package information any time.

Features Available in Each Package:

In each package site administrator can manage


    • Package Name
    • Package Description
    • Price
    • Credits (available credits to be used for purchasing premium contents)
    • No of uploaded videos (maximum allocation for uploading videos)
    • No of uploaded audio files (maximum allocation for uploading audio files)
    • No of photo galleries (maximum photo galleries to be allowed to create)
    • No of uploaded photos (maximum number of photos to be allowed)
    • No of blog posts (maximum number of blog posts allowed)
    • Space Video (maximum number of space allocated for videos in MB)
    • Space Audio (maximum number of space allocated for audio files in MB)
    • Space Photo (maximum number of space allocated for photo storage)
    • Package Type (free or paid package)


Site admin can assign any of free package to normal users. At time of registeration user account will be update with assign package information. so user will be restricted to use account with package limitation.

If membership package is disabled, free user have unlimited access to user and upload contents without any limitations.

Package Purchasing:

Free or paid user can upgrade their account usage any time by selecting any paid package from list of available packages. Once purchased, their account remained usage stats will be upgraded.

If user try to upload video and there is no sufficient balance avaialble to upload videos, then sript will automatically redirect user to purchase package section.

Payment Options:

User can purchased any package through paypal.

Multi Language Implementation in ASP.NET Video Starter Kit

01 November 2011

ASP.NET Video Starter Kit 6.0 introduced new approach for managing multiple language, culture user interface to provide ability for user to switch user interface language according to their desired region specific culture or languages settings.

Previous versions of video starter kit only support multiple culture specific resource files and admin can only set website specific culture via web.config file, so user have no ability to change language, culture with their own will.

Now using video starter kit 6.0, site administrator can

    • Enable Disable Multi Language User Interface Support
    • Manage all languages through control panel / settings / language management section.
    • Set default language
    • Add or register new language
    • Choose languages from list of country specific languages to appear on front page.
    • Advance options to filter contents based on user culture specific language settings.

If multi language option is enabled from /control panel / settings / configurations / features , list of enabled languages will be shown on front section of website. When user click on any of country flag, whole user interface of website will be translated to selected language or culture.

User language selection will be stored in cookie in order keep preserved user selected language without setting it again.

If advance language specific filter is enabled, then whole website contents will be filters for user based on user selected language or culture settings.

e.g if user choose spanish as language and if content specific option is enabled (control panel / settings / configurations / features) then only spanish related contents will be display on website for selected user.

Under new implementation you can manage unlimited number of regional languages, enable unlimited number of language support for front section.

Site administrator can create new language file by translating any of existing resource file located at /app_globalresources/ section.

We translated all resource files using Google Translator.

ASP.NET Image Handler To Resize and Preview High Quality Images in Real Time

01 November 2011

In this article we will provide information and sample codes for creating image handler file in, c# or which can be used to resize image, generate highest quality output and show image preview in real time.

You can directly use image handler in image src path to process and display output on browser.

Such handler file have lots of advantages, e.g

  • Provide ability to resize image in real time and display output on browser.
  • Protect image direct path from access.
  • Add lots of other validation to protect images from anti leeching.

Image handling have some drawbacks

  • Consume resources and performance issues so should be used in cases where its needed. e.g if you provide system for user to prepare image for mobile photo, iphone, psp, high definition, and according to different screen resolutions.

Handler file can be called as

<img src="imagehandler.ashx?filename=abc.jpg"...

Code for generating image handler.

GenerateThumbnail function will be used to generate highest possible quality output based on three paramters,

lcFilename (complete path of source photo), width (output width of photo), height (output height of photo)

Code is shown below

private byte[] GenerateThumbnail(string lcFilename, int Width, int Height)

        //Image img = Image.FromStream(fStream);
        //Image thumbnailImage = img.GetThumbnailImage(Width, height),
        //      new Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);

        Bitmap loBMP = null;
        Bitmap bmpOut = null;
            loBMP = new Bitmap(lcFilename);
            ImageFormat loFormat = loBMP.RawFormat;
            Size newSize = new Size();
            newSize.Height = Height;
            newSize.Width = Width;
            bmpOut = new Bitmap(newSize.Width, newSize.Height);
            Graphics canvas = Graphics.FromImage(bmpOut);
            canvas.SmoothingMode = SmoothingMode.AntiAlias;
            canvas.InterpolationMode = InterpolationMode.HighQualityBicubic;
            canvas.PixelOffsetMode = PixelOffsetMode.HighQuality;
            canvas.DrawImage(loBMP, new Rectangle(new Point(0, 0), newSize));
        catch (Exception ex)
        MemoryStream imageStream = new MemoryStream();
        bmpOut.Save(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg);

        byte[] imageContent = new Byte[imageStream.Length];
        imageStream.Position = 0;
        imageStream.Read(imageContent, 0, (int)imageStream.Length);
        return imageContent;

GenerateThumbnail function to be called in ProcesRequest method to output resized thumb.

if (File.Exists(strPath))

     ht = new Hashtable();
     //FileStream fInfo = new FileStream(strPath, FileMode.Open);
     byte[] bFile;
     bFile = GenerateThumbnail(strPath, width, height);
     ht.Add(this.ImageID, bFile);

Byte[] arrImg = (byte[])ht[this.ImageID];
context.Response.ContentType = "image/jpeg";

Hope this code will help you generate image handler with highest possible image output.


User Role Based Permission in ASP.NET Video Starter Kit.

01 November 2011

New advance role based permission system has been introduced for users in video starter kit 6.0. Via role based management site administrator can provide different levels of permission to certain users or default registered users.

Site administrators can create unlimited role based permission settings and assign any role based settings to default users. If there is no role based settings set, then all user will be free to use all website resources without any validation.

The following types of permissions can be set in each settings.

    • Permission to upload videos
    • Permission to upload audio files
    • Permission to upload photos
    • Permission to create galleries
    • Permission to post blog posts
    • Permission to create groups


Site administrators can manage permissions via

Control Panel / Settings / User Role Based Permissions Section

Site administrator can create permissio settings and assign any permission settings for default users (user who register directly via registeration process or using facebook login)

Site administrator can give specific permission settings to any user through member management section.

In this way site administrator can control which type of users to give which type of permissions while using website.


ASP.NET Video Starter Kit 6.0 Has Been Released

01 November 2011

ASP.NET Video Starter Kit & Youtube Clone 6.0 has been release with addition of more advance features, introducing new sections, updates hundreds of existing features, more infrastructure changes, restructured configuration section and provide sdk to developers to make customization of solution easy fastly and reliably.

What's New in ASP.NET Video Starter Kit 6.0

SDK Section

New Configuration Management

Live Demo

Live Theme Previews

We appreciate customer feedbacks to introduce and build more powerful products in future.


HTTP Pseudo-Streaming in ASP.NET Video Starter Kit

27 March 2011

Both MP4 and FLV videos can be played back with a mechanism called HTTP \r\nPseudostreaming. This mechanism allows your viewers to seek to not-yet \r\ndownloaded parts of a video. YouTube is an example site that offers this\r\n functionality.

Previously we implement HTTP Pseudostreaming concept based on server \r\nside scripting. Such a script have lots of disadvantages such a script \r\nconsumes a lot of resources, has security implications and can only be \r\nused with FLV files mostly.

Now we encourage user to implement proper HTTP Pseudostreaming through \r\ntheir webserver rather than using any script. HTTP Pseudostreaming does \r\nnot work by default on any webserver. A serverside module is needed to \r\nenable it.

The most popular module is H264 Streaming Module which allow user  to \r\nimplement Http Pseudo streaming for mp4 videos through IIS web server.
How to Setup?

IIS 6 Instructions
IIS 7 Instructions

Once module is enabled, it will stream mp4 videos properly through JW \r\nPlayer as already implemented in ASP.NET Video Starter Kit.

Youtube DATA API in ASP.NET Video Starter Kit

27 March 2011

Youtube Data API lets you incorporate YouTube functionality into your own application or website. The Data API allows a program to perform many of the operations available on the YouTube website. It is possible to search for videos, retrieve standard feeds, and see related content.
ASP.NET Video Starter Kit 5.5 introduce fetching videos from youtube based on various search terms and targeted categories using Youtube Data API.
You can  use video starter kit portal as a mini youtube website to retrieve millions of videos uploaded daily to your own website and manage it with your own way. This will make your website healthy, data rich which can increase your visitors from search engines tremendeously in result you will create great earning opportunity.
Which type of Youtube Data API features supported by ASP.NET Video Starter Kit?
Currently viideo starter kit using features related to fetching videos from youtube. Main feature includes.

  • Fetch videos based on youtube categories e.g (Science & Technology)
  • Fetch videos based on search terms. work on all categories or selected category.
  • Fetch videos based on filters e.g today, this week, this month, all time added videos
  • Fetch videos based on orders e.g published, relevance, top rated, most viewed etc
  • Manage videos in different website custom categories with your own way.
  • Validate videos periodically to delete or disable all videos which is removed from youtube.
  • Automatic fetching supported, to fetch videos based on custom selection continuously after specified time interval.
  • Advance video tag processing engine allow you to process each and every\r\n youtube video tags in a scalable, create search suggestions and add it \r\nin tag clouding after admin review.
  • Allow admin to choose best videos as featured videos to show it on special sections and high priority in related video listing.
  • Allow admin to create blog posts from choosen videos, which can be shared accross twitter or facebook accounts.

How to enable Youtube DATA API in ASP.NET Video Starter Kit?
You need to perform the following steps in order to enable youtube data api on video starter kit solution.

  • Register Youtube API developer key at
  • Put registered developer key and name of website under control panel / configuration / youtube sdk / section.
  • Put username in order to assign all fetch videos with website user.
  • Go to video/Default.aspx and replace current video player with youtube customized player located at modules/ytplayer.ascx
  • Go to video/Default.aspx.cs or .vb file and adjust ytPlayer.ascx properties and comment default player properties. e.g player1.Embed_Script = _script;
  • That's it, go to control panel / youtube sdk section and start fetching videos from youtube.

ASP.NET Video Starter Kit 5.5 has been released.

27 March 2011

We have released ASP.NET Video Starter Kit ver 5.5 today with lots of new features, improved existing codes and make it more reliable and scalable at high level of load and data.

ASP.NET Video Starter Kit include lots of new features, the main important feature is integrating Youtube DATA SDK to fetch millions of videos from youtube and manage it with your own way.
Now admin can enable youtube engine to start fetching videos based on their interest from youtube by keeping their own website active and full of content. Videos can be fetch based on youtube categories and search terms with filtering option based on today, this week, this month or all time videos.
Live example of how you can manage videos, increase your website traffic and increase your earning chances.
Other feature includes
  1. Implement JW Player 5.5 with HTML 5 Support. We recommend using mp4 videos as output type to play it properly on HTML 5 enabled devices such as ipad.
  2. Improved tag processing if reach to millions.
  3. Now implemented powerful and advance url rewriting in case of IIS 7 as webserver.
  4. Improved blog posting script.
  5. Improved lots of sections, fix bugs reported by customers.
We appreciate sharing feedbacks and reporting bugs. This help us to improve our products and better serve u in future.

ASP.NET Video Starter Kit Packages Reviewed.

27 March 2011

These packages have been cancelled - now user can get every package with unlimited usage license

From last three years we provide video starter kit packages based on feature differences to customers. Which create not only problem to us while maintaining different copies but also for customers while upgrading some features.

Now we reviewed and re-designed video starter kit packages based on license like other does.
ASP.NET Video Starter Kit packages now available in three categories with same features but different in scope.
  • ASP.NET Video Starter Kit - (single website)
  • ASP.NET Video Starter Kit Advance Edition - (single server)
  • ASP.NET Video Starter Kit Unlimited Edition - (no limit)
Note: All packages have same source / features but there is limitation in scope. e.g single website license version will only work on single website. It may work on multiple websites but any time all websites will be down. So in order to use on multiple websites or servers u need to get proper package.
Customer can purchase any package from purchase section of website.

Create and Customize Video Starter Kit Themes & Design

25 October 2010

Video Starter Kit include more than twenty professional looking themes and provide flexibility to create your own themes or customize existing theme or change complete look and feel in just few minutes.

Video Starter Kit be default light weight JQUERY UI compatible design and themes. You can use JQUER UI Theme Roller to create any level of theme and embed it within Video Starter Kit solution just by following few steps.

Just follow easy steps to create your own them using JQUERY UI Theme Roller.

  • Go to , choose template and start edition template by choosing your own color scheme and styles.
  • Once theme created download complete bundle to your computer.
  • Unzip downloaded theme and jquery script zip file.
  • Under Video Starter Kit solution, create new theme, copy files from any of existing theme, paste copied files into newly created theme.
  • Now open unzipped downloaded custom theme folder, go to jquery-ui-1.7.3.custom\\css\\custom-theme folder and copy images folder.
  • Paste all files within images folder into newly created Video Starter Kit theme images folder.
  • Go to jquery-ui-1.7.3.custom\\css\\custom-theme and open jquery-ui-1.7.3.custom.css theme css class, copy all class until .ui-widget-shadow {---}... class.
  • Open newly created theme \\app_themes\\newthem\\jquery-ui.css file and replace all css files with copied css files except ui-dialog {...} classes at the end.
  • Setup theme in web.config file
  • This will update jquery ui theme within your Video Starter Kit template.
  • Rest for layout customization, just open app_themes\\newtheme\\layout.css file and adjust color schemes for text, links, headers, navigations, backgrounds according to your custom color.
  • run your website your will see totally changed look and feel.

Play with layout.css file, you can change complete look and feel of Video Starter Kit in few minutes.

If you face problem report it to us with detail.


MP4 Encoding & Setting Meta Information via Media Handler Pro

25 October 2010

Here we provide sample code that can help u to use Media Handler Pro component in your application (c#, to

i: Publish any format video to high quality mp4 format using libx264 codec and preset files
ii: Set meta information to mp4 video in order to stream properly on web.

We recommend you to download latest ffmpeg build with presets support from

i: Sample Code for MP4 Video using libx264 codec and preset files

private string PresetFilePath = // path of preset file u are doing to use for mp4 encoding. preset files located withing ffmpeg/preset/ folder.
_mhandler.OutputExtension = ".mp4";
_mhandler.OutputFileName = "sample_temp";
_mhandler.VCodec = "libx264";
_mhandler.Parameters = " -bt 240k -fpre " + this.PresetFilePath + "";
_mhandler.Video_Bitrate = 200;
_mhandler.Channel = 2;
_mhandler.Audio_SamplingRate = 48000;
_mhandler.Audio_Bitrate = 192;
_mhandler.FrameRate = 29.97;
info = _mhandler.Process();

The code above will create mp4 video with name 'sample_temp.mp4', In order to stream this video on web you need to add meta information otherwise players will first download complete video and will then play it.
For adding meta information we are using mp4box with Media Handler Pro. U can use the following code to set meta information and make streamable mp4 video from 'sample_temp.mp4' video via mp4box utility.

string MP4BoxPath = // path to mp4box utility in similar way as ffmpeg or preset file path.
_mhandler.MP4BoxPath = MP4BoxPath;
string  _mp4_temp_path = // complete path of output sample_temp.mp4 video
_mhandler.Parameters = "-isma -hint -add " + _mp4_temp_path + "";
_mhandler.FileName = sample_temp.mp4.Replace("_temp.mp4",".mp4"); // replace temp.mp4 with normal mp4 video, remove temp video after creating streamable mp4 video. e.g (sample.mp4)
_mhandler.InputPath = this.OutputPath;

Set_MP4_Buffering() will create streamable mp4 video (sample.mp4) from (sample_temp.mp4) video.

After creation you can delete sample_temp.mp4 video.

ASP.NET Video Starter Kit 5.4 has been released.

25 October 2010

We have released improved Video Portal & Youtube Clone Kit for ASP.NET

ASP.NET Video Starter Kit 5.4 include more new features, improved existing features, fix bugs reported by customers and more.

What's New in Video Starter Kit 5.4:
Video Starter Kit 5.4 bundled with lots of new features. Main features added include\r\n

  • HTML5 Video Player Support.
  • WebM Video Encoding with HTML5 Support.
  • Improved MP4 Video Encoding & Streaming.
  • Featured Videos
  • Extend Photo Gallery Feature.
  • Abuse / Spam Reporting Improvements.
  • Mail Template Improvements.
  • and lots more.

I: HTML5 Video Support:

ASP.NET Video Starter Kit 5.4 now support playing mp4, webm videos through HTML5 Video Player with fallback support to flash player (play videos on flash player only if browser doesn't support HTML5 video player). Video Starter Kit add builtin support to the following two players ii: 

II: WebM, MP4 Video Encoding for HTML5 Video Player:

ASP.NET Video Starter Kit 5.4 now support encoding WebM (VP8 Encoded) video encoding. So total video format supported by Video Starter Kit includes i: Flash FLV

  • MP4 (high quality using libx264 presets)
  • WebM VP8 (high quality using libvpx codecs - new)
  • WMV (silverlight with IIS smooth streaming supported)

III: Improved MP4 Encoding and Streaming:

ASP.NET Video Starter Kit 5.4 improved mp4 encoding and streaming videos now. If mp4 encoding is enabled by site administrator, mp4 video will be encoded using libx264 codec with vast variety of h264 presets. ASP.NET Video Starter Kit 5.4 also add script to set meta information to mp4 video via mp4box to allow smooth streaming of mp4 video over web. for demo click on link below.

IV: Featured Videos

ASP.NET Video Starter Kit 5.4 add new video type (Featured Video). Admin can mark any video file as featured video under control panel -/ video section -/ video detail page. Once mark as featured video, it will be shown in special sections and will have priority on normal video. Featured video type can be extended to premium videos (paid videos), sponsored videos and other video types.

V: Add More Options

ASP.NET Video Starter Kit 5.4 now add two more tabs in video section to order videos as\r\n

    • Most Commented (new)
    • Featured (new)
    • Recently Added
    • Most Viewed
    • Most Liked
    • Most Favorited


VI: Extended Photo Gallery Feature:

ASP.NET Video Starter Kit 5.4 extend and complete missing features related to photo gallery. Now photo gallery section support the following missing features.\r\n


    • User can create their own photo galleries / albums.
    • User can add, remove photos from gallery / album.
    • User can manage their galleries.


In previous version only admin can add photo galleries.

VII: Abuse / Flag Reporting Management:

ASP.NET Video Starter Kit 5.4 now add centralized, more improved and advance flag, abuse, spam reporting page under control panel. From reporting section site admin can\r\n


    • Block / Delete Content
    • Block / Delete Content Author Account
    • Block / Delete Reporter Account
    • Block IP Address of Author or Reporter
    • Review & Resolve Report on Content


VIII: Advance Mail Template Engine:

ASP.NET Video Starter Kit 5.4 now adds more improved and advance mail template customization and processing engine to create, customize and use mail templates in any type of events or actions within website. Now site administrator can create new mail templates, use this mail templates via unique key within website in any event (e.g submit blog post). This helps site administrator to manage mail templates and easily customize mail templates under control panel -/ settings -/ mail template section without touching internal source of website.

IX: More Improvements

Hundreds of improvements have been done in ASP.NET Video Starter Kit 5.4 in every section including. You can send bug report, feedbacks and suggestions via contact us. This help us to build more improved and useful kits in future.

For more detail visit: 

ASP.NET Photo Crawling Script - Batch Uploader.

26 August 2010

ASP.NET Video Starter Kit version 5.3 introduced more powerful photo crawling and batch uploading script for uploading photos in one step making it possible to upload and manage thousands of photos in few hours within website making website rich from content.

ASP.NET Photo Crawling Script:

Photo Crawling Script is powerful script written in ASP.NET which can facilitate website administrator to fastly upload and manage hundreds of photos within an hour to website by using single step. Main feature of script includes

  • Crawl photos from local computer or server by providing local destination path, or third party websites by providing direct url.
  • Fetch and download photos to server from path provided.
  • Allow site administrator to choose photos that he want to be part of website and remove useless photos.
  • Assign category for uploaded photos. gallery if created, blog posted if generated.
  • Allow options to give global title, description, tags for all selected photos or give title, description, tags for each and every photo.
  • Allow options to create photo gallery and put all photos in gallery or place photos in existing gallery by providing gallery id. It also facilitate administrator to assign different title and description for gallery.
  • Allow option to generate blog post from selected photos, assign blog title and place separate blog description / detail.

Key Advantages:

ASP.NET Photo Crawling Script give the following advantages to site administrator for uploading multiple photos in batch at once.

  • Simplifies photo uploading and managing task and make it possible to upload thousands of photos in few hours.
  • Help site administrator to download photos from server as well as powerful crawling script allow admin to fetch and download photos from any website by just providing website photo page url.
  • For developers, photo crawling script open new gateways and can help in advance content crawling and fetching requirements.
  • Demo: All photos uploaded, galleries created and blog posted in through ASP.NET Photo Crawling Script.

ASP.NET - FLV, MP4, Vorbis, VP8 WebM, PNG encoding in one step using Media Handler Pro

24 July 2010

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:

_mhandler.InputPath = RootPath + "\\\\contents\\\\original";
_mhandler.OutputPath = RootPath + "\\\\contents\\\\output";
VideoInfo info = new VideoInfo();
_mhandler.FileName = "sample.wmv";
_mhandler.OutputFileName = "sample";
//FLV Encoding

_mhandler.OutputExtension = ".flv";
_mhandler.Video_Bitrate = 500;
_mhandler.Audio_Bitrate = 128;
_mhandler.Audio_SamplingRate = 44100;
_mhandler.Force = "flv";
info = _mhandler.Process();
if (info.ErrorCode > 0)
       Response.Write("Error occured while processing flv video");
_mhandler.Force = "";
// MP4 Encoding - HQ - 1 Pass

_mhandler.OutputExtension = ".mp4";
_mhandler.FrameRate = 23.97;
_mhandler.Video_Bitrate= 6144;
_mhandler.VCodec = "libx264";
_mhandler.Parameters = "-bt 8192k -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 2 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 3 -refs 1 -directpred 3 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -wpredp 2";
info = _mhandler.Process();
if (info.ErrorCode > 0)
     Response.Write("Error occured while processing mp4 video");

// MP4 Encoding - Normal

_mhandler.OutputExtension = ".mp4";
_mhandler.FrameRate = 29.97;
_mhandler.Video_Bitrate = 200;
_mhandler.VCodec = "libx264";
_mhandler.Parameters = "-bt 240k -coder 1 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 3 -refs 2 -directpred 3 -trellis 0 -flags2 +wpred+dct8x8+fastpskip -wpredp 2";
_mhandler.Channel = 2;
_mhandler.Audio_SamplingRate = 48000;
_mhandler.Audio_Bitrate = 192;
info = _mhandler.Process();
if (info.ErrorCode > 0)
     Response.Write("Error occured while processing mp4 video");
// MP4 Encoding - ipod - ipone - 1 pass

_mhandler.OutputExtension = ".mp4";
_mhandler.FrameRate = 29.97;
_mhandler.Video_Bitrate = 512;
_mhandler.VCodec = "libx264";
_mhandler.Width = 480;
_mhandler.Height = 272;
_mhandler.AspectRatio = "480:272";
_mhandler.Parameters = "-bt 1024k -maxrate 4M -flags +loop -cmp +chroma -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq \\"blurCplx^(1-qComp)\\" -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -coder 0 -refs 1 -bufsize 4M -level 21 -partitions parti4x4+partp8x8+partb8x8 -subq 5";
_mhandler.Force = "mp4";
info = _mhandler.Process();
if (info.ErrorCode > 0)
      Response.Write("Error occured while processing mp4 video");
// ************************************
// Clear parameters
// ************************************

_mhandler.FrameRate = 0;
_mhandler.Video_Bitrate = 0;
_mhandler.VCodec = "";
_mhandler.AspectRatio = "";
_mhandler.Parameters = "";
_mhandler.Force = "";
_mhandler.Pass = 0;
_mhandler.Channel = 0;
_mhandler.Audio_Bitrate = 0;
_mhandler.Audio_SamplingRate = 0;
// OGG Theora Encoding

_mhandler.OutputExtension = ".ogg";
// set parameters with ogv video / ogg audio
info = _mhandler.Process();
if (info.ErrorCode > 0)
      Response.Write("Error occured while processing ogg file");
// VP8 WebM Encoding (Standard Version)

_mhandler.OutputExtension = ".webm";
_mhandler.Force = "webm";
_mhandler.AspectRatio = "4:3";
_mhandler.VCodec = "libvpx";
_mhandler.ACodec = "libvorbis";
_mhandler.Deinterlace = true;
_mhandler.Parameters = "-threads 8 -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -vb 2M -aq 50 -ac 6";
info = _mhandler.Process();
if (info.ErrorCode > 0)
      Response.Write("Error occured while processing webm video");
// Grab Thumbs

int calculate_mid_duration_sec = 5; // default 5 seconds
if (info.Duration_Sec > 0)
       calculate_mid_duration_sec = (int)info.Duration_Sec / 2;
//  create thumbnail
_mhandler.VCodec = "";
_mhandler.ACodec = "";
_mhandler.Force = "";
_mhandler.Parameters = "";
_mhandler.ImageName = "bear.png";
_mhandler.OutputFileName = "bear";
_mhandler.OutputExtension = "png";
_mhandler.Image_Format = "png";
_mhandler.Frame_Time = calculate_mid_duration_sec.ToString();
_mhandler.Width = 320;
_mhandler.Height = 240;
info = _mhandler.Grab_Thumb();
// check for errors
if (info.ErrorCode > 0)
     Response.Write("Error Occured while grabbing thumbs");
Response.Write("All tasks completed successfully");

Represent comments, so use code when required.

You can publish multiple format videos that can be playable on variety of ways, you can use mp4, webm, ogg vorbis to play on HTML 5 player.

ASP.NET HTML 5, VP8 WEBM Video Encoding using Media Handler Pro.

24 July 2010

Everyone who has visited 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 width="300" height="150"></video>

Support for the <video width="300" height="150"> 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.

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 developed by the MPEG group and standardized in 2003. It aims to provide a single codec for low-bandwidth, low-CPU devices (cell phones); high-bandwidth, high-CPU devices (modern desktop computers); and everything in between. To accomplish this, the H.264 standard is split into “profiles,” which each define a set of optional features that trade complexity for file size. Higher profiles use more optional features, offer better visual quality at smaller file sizes, take longer to encode, and require more CPU power to decode in real-time.

Theora evolved from the VP3 codec and has subsequently been developed by the Foundation. Theora is a royalty-free codec and is not encumbered by any known patents other than the original VP3 patents, which have been licensed royalty-free. Although the standard has been “frozen” since 2004, the Theora project (which includes an open source reference encoder and decoder) only released version 1.0 in November 2008 and version 1.1 in September 2009.

Theora video can be embedded in any container format, although it is most often seen in an Ogg container. All major Linux distributions support Theora out-of-the-box, and Mozilla Firefox 3.5 includes native support for Theora video in an Ogg container. And by “native”, I mean “available on all platforms without platform-specific plugins.” You can also play Theora video on Windows or on Mac OS X after installing’s open source decoder software.

VP8 is another video codec from On2, the same company that originally developed VP3 (later Theora). Technically, it is similar in quality to H.264 Baseline, with lots of potential for future improvements.

In 2010, Google acquired On2 and published the video codec specification and a sample encoder and decoder as open source. As part of this, Google also “opened” all the patents that On2 had filed on VP8, by licensing them royalty-free. (This is the best you can hope for with patents. You can’t actually “release” them or nullify them once they’ve been issued. To make them open source–friendly, you license them royalty-free, and then anyone can use the technologies the patents cover without paying anything or negotiating patent licenses.) As of May 19, 2010, VP8 is a royalty-free, modern codec and is not encumbered by any known patents, other than the patents that On2 (now Google) has already licensed royalty-free.

Encoding VP8 WebM Video using Media Handler Pro.

FFMPEG 0.6 and latest provide support for VP8 Codec via libvpx. You need to download latest win 32 build in order to publish video to WebM format.

ample code for using ASP.NET Media Handler Pro to publish WebM Video


VideoInfo info = new VideoInfo();
 _mhandler.FileName = "sample.wmv";
_mhandler.OutputFileName = "sample";
_mhandler.OutputExtension = ".webm";
_mhandler.Force = "webm";
_mhandler.AspectRatio = "4:3";
_mhandler.VCodec = "libvpx";
_mhandler.ACodec = "libvorbis";
_mhandler.Deinterlace = true;
_mhandler.Parameters = "-threads 8 -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -vb 2M -aq 50 -ac 6";
info = _mhandler.Process();
if (info.ErrorCode > 0)
         Response.Write("Error occured while processing webm video");

After publishing you can then play WebM video on HTML 5 player (e.g player provided by Sample way to play WebM Video

<video width="320" height="240"><source src="sample.webm" type='video/webm; codecs="vp8, vorbis"'></video>