ASP.NET Cafe
new tricks every week

H.264 vs VP 6 in hd online video

Monday, 2 March 2009 10:00 by dmitriy

What's better for your online video?

VP 6 is faster ( works on most pcs ) and requires only flash player 8. 

The BAD side of VP6 - it's hard ( or even impossible ) to find free (opensource) encoding solution for it. You need to ask on2.com guys to give you their framework or for personal use you can buy something like "Flix Standard" for $39. That's really nothing even for poor blogger.

H.264 is slower. Only last fast pcs can run it without delays. For example, I've old Celeron 2.4 and it can't handle h264, but good with vp6. But my Core2duo is good with h.264. Another problem of h264 is loosing of smoothness on low bitrate. Picture is quite good, but action is not... if you encode 1280x720 with 1Mbit/s bitrate you can see the problems with slow zooms... it jumps. Usually you can play with complicated settings, but in the end it does not matters. The good enough bitrate for h.264 if you are using 1280 x 720 is about 2-3 Mbit/s.

More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Flash | Main
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

Insert flash into page without "Click to activate and use this control" in IE.

Wednesday, 26 December 2007 05:43 by dmitriy

In some recent versions of Internet Explorer flash movies need a click to activate them. It is frustrating specially if your flash is a part of page design. But some solution known. In other words we need one code for IE and other for Opera, Firefox, Safari and other your favorite browsers. But asp.net custom control makes this possible.

Consider details. First of all we need to know the browser. No problems - Page.Request.Browser.Browser returns browser name. So, now we know what browser request our page. Next step, is to render correct html for IE. The main idea - to write flash <object> node from external javascript file inside some container (div in this implementation). Ok. But it's not very good to carry JavaScript file with our custom control. Yes, but we are going to embed javascript inside our dll. Here is our javascript:

function ActivateFlash(id,content)
{
    document.getElementById(id).innerHTML = content;
}

Fairly simple stuff... But we can't write it on the same page, it's important to put it in the external javascript resource. So, it's the file activate.js.

To embed it inside our assembly we need to change build action to "Embedded Resource" and add this line to AssemblyInfo.cs:

[assembly: System.Web.UI.WebResource("EmbedFlash.activate.js", "application/x-javascript")]

Also, we need to provide following properties: Width, Height, WMode (windowed, opaque, transparent) and flash file url (SWFURL).

Another interesting thing, we want to browse for the swf file in design mode. To do this we need to add following attribute to our SWFURL property:
[EditorAttribute(typeof(System.Web.UI.Design.UrlEditor), typeof(UITypeEditor))]

It tells designer to use UrlEditor class as UITypeEditor for this property.

More information you can find inside source code.

Embed Flash - Sources.zip (96.10 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   ASP.NET | Flash
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed