Behavior, Content, Money – 3 Things you should never give away for free!!!

BCmoney MobileTV

HTML5 with animated GIF, and, real-time transcoding?!

Posted by bryan on September 22, 2010 in HTML, Mobile, Multimedia with 5 Comments


No Gravatar

HTML5 video icon

Image via Wikipedia


In the recent Dive Into HTML5 Video with the Masters instructional webinar from ReelSEO, the final questions posed were whether the masters (Jeroen Wijering of Longtail video, and Philip Jagenstedt of Opera software) knew:

  1. If animated GIFs can be used to show an animation before the video plays? (Answer #1)
  2. When will HTML5 be ready for primetime? (Answer #2)

While some quick experimentation answered the first question for me, the second question is more of an opinion question than a factual right or wrong one.

Answer #1

The following shows an example of playing a video using an animated GIF as the poster:

(NOTE: the video used in the demo is not meant to go with the actual image, I just picked a random funny Animated GIF!)

The code for this is quite simple:

<video id="movie" width="320" height="240" poster="video.gif">
<source src="video.mp4" />
<source src="video.ogv" />
<source src="video.webm" />
</video>

Just as you might expect, you simply place it in the poster attribute of the <video> tag itself. This could have lots of uses for image previews, rollovers (by dynamically changing the value of the poster attribute using JavaScript), and possibly even playing back the entire video without sound for some devices that still don’t support HTML5 video. In some cases you could even combine an Animated GIF with the HTML5 <audio> tag or another audio playback method for those odd cases such as legacy Mobile Devices or old decrepit browsers like IE which simply can’t support the <video> tag at all… though for those, using a Flash fallback like JW, FlowPlayer or VideoJS can be another alternative.

The animated image itself could be generated by taking snapshots of the video at various time intervals, and combining them into a single animated GIF image using a graphics library like ImageMagick or FFMPEG. All of this would happen automatically upon upload of a new video file. This “real-time encoding of the poster image” concept gave me an idea for a service which could solve what is IMHO one of the most significant problems for HTML5 video adoption, bringing me to my next point…

Answer #2

To answer question #2: “is HTML5 ready for primetime?”, I would simply point to the increasingly common use of the new video tag (see DailyMotion, Vimeo, and YouTube), proving it is indeed almost ready for primetime.

The only thing holding HTML video in particular back, is a common denominator video container/codec format. The use of MP4 with a Flash fallback is already enough for supporting a pretty wide array of browsers, and its mostly mobile devices other than the iPhone that we have to worry about for specific implementations. If you want to avoid encoding in multiple formats (i.e. MP4, WebM, Ogg Theora, 3GP and 3GPP), then your best bet is to use a direct-link fallback, which will work for those devices which can’t render the <video> tag yet, but can possibly play MP4. The only thing that bothers me about MP4 (ok there’s a few other things too, such as the questions still surrounding licensing despite the MPEG-LA group’s attempts to reassure the public they will never enforce fees) is that within the container itself, there are several different profiles and codec combinations, and so, you still won’t be guaranteed that you do support many mobile devices other than Apple products.

So what’s the best alternative then? Possibly WebM, but with Google‘s ever growing hold on the entire internet industry, it makes that option less and less attractive (although I certainly appreciate the premise of the project). More likely, I think what we need and will see soon enough is a real-time conversion tool or service, to which we can POST videos as they are needed, which will serve the video in the desired format, on-demand.

For example, we send a POST containing our MP4 video named “coolvideo.mp4” to http://video.org/convert along with a to parameter, a width parameter, and a height parameter (with some sample values being to=ogg&width=600&height=400 for playback in FireFox on a laptop, or to=3gp&width=320&height=240 for playback on a mobile device) then, we get back a temporary link to stream the created video. After the stream disconnects (or the player closes the page or navigates to another video), the temporary URL and video could be deleted. Such a real-time transcoding service would surely solve most of the problems for secure video playback on the web, and it could either be run as a 3rd party Web Service with remote authentication, or, delivered as an open source package which can be run alongside an existing library like FFMPEG on your own servers.

The important thing to note, and indeed the reality check for this idea, is that conversion takes time as does passing the video between servers, so it may be impractical for now; but the idea holds some water, internet speeds are increasing day by day, and things that were thought impossible only a few years ago are now possible on today’s World Wide Web. Since HTML5 video is about 2-5 years away from becoming a de facto standard for video on the web, a lot changes in a few years time, so I wouldn’t dismiss the possibility of real-time video encoding just yet. The promises are quite great, in that publishers would only have to choose one format for all of their videos and still be able to push that video to just about any browser or device in near real-time (today; with fast connections, optimizations and parallel processing, a relatively short video could be transmitted to an encoding service, encoded and delivered to the user in about as much time as it used to take to load and buffer an online video about 5 or 6 years ago).

Either way, if anyone wants to help undertake the building of some kind of real-time encoding tool like this, I’d definitely be interested. Also, if you know of anything that already does this, or anything under development, please let me know. I’ve put together my best attempt at a universal HTML5 Mobile-compatible video.

[snippet id=63451]

For convenience sake, I’m also going to include a table summarizing the current state of HTML5 and which types of video playback are supported by which browser versions and devices (WARNING: this summary could be subject to errors or omissions, so please comment if you think I got one of the support types wrong):

  HTML5 MP4 HTML5
Ogg
HTML5
WebM
Silverlight Flash Java 3GP
IE

Market share: 45.3%

1 – 4           y  
5         y y  
6       y y y  
7       y y y  
8       y y y  
9+ y     y y y  
Windows Phone       y      
Firefox

Market share: 31.7%

1         y y  
2         y y  
3       y y y  
3.5   y   y y y  
4+   y y y y y  
Fenick   y          
Safari

Market share: 5.8%

1 – 3         y y  
4+ y     y y y  
iPhone y            
iPod y            
iPad y            
Chrome

Market share: 11.9%

1 – 3         y y  
3 – 6 y     y y y  
6 – 10 y y y y y y  
10+ y   y y y y  
Android 1 – 2.3         y y  
Android 2.3 – 2.9 y   y   y y  
Android 3+ y y y     y  
Opera

Market share: 1.7%

1 – 9         y y  
9 – 10.5       y y y  
10.5+   y y y y y  
Opera Mobile           y  
Mobile Device browser

Market share: ~50% (of mobile device owners, large overlap with above stats)

Blackberry 1-5             y
Blackberry 5-10           y y
Blackberry 10+         y y y
Nokia Symbian 1-7             y
Nokia
Symbian
7.1+
        y   y
WAP Browser             y

UPDATE (2012-02-21):
I’ve known about Encoding.com for a long time now, and even recently tweeted about it being the real-deal in terms of it being able to answer just about anyone’s Encoding needs. However, flying under my radar this whole time, was their sister service Vidly. Although still not quite real-time it is an interesting service, and if I was developing a new mobile video solution I would definitely consider offsetting bandwidth, encoding and storage to either Vidly or another video delivery service like BitsOnTheRun, vzaar or Brightcove. The topic of video hosting providers is another post in and of itself, so before I get ahead of myself I’ll just summarize what I know about each in one line:

  • Vidly – seems to be the closest to real-time encoding; supports the most formats and devices
  • BitsOnTheRun – best starter package for small businesses, allows use of Amazon S3 and other cloud storage solutions
  • Vzaar – best mid-tier option for high bandwidth but low storage requirements; supports audio as well as video
  • Brightcove – widely used by Newspapers, TV and other media companies; famous for Enterprise-grade support and scalability

 

  1. Norah FuschettoAugust 8, 2013 - 10:33 am #1

    I can definitely see your skills in the articles you write. The community hopes for more passionate writers like you who aren’t afraid to say how they feel and what they believe. At all times go after your heart. Napoleon said: “History is the version of past events that people have decided to agree upon”, so we can make the history we want.

    Reply
  2. Alphonso SukhramOctober 20, 2013 - 8:17 pm #2

    I just want to tell you that I’m a newbie to blogging and site-building and honestly liked your blog and web-site both. I’ve bookmarked your site and subscribed to your RSS that way I will remember to check out your latest blog posts. Thanks for the wonderful writings. Appreciate you for sharing your knowledge on your web-site.

    Reply
  3. BrittanyMarch 3, 2014 - 11:35 am #3

    Yes! Finally someone writes concisely about downloading videos from YouTube to iPod or your phone directly without going through their web app. As you said, if its in HTML5 mode, the download is there when you right-click!

    Reply
  4. หลวงพ่อรวยSeptember 25, 2015 - 6:18 pm #4

    May I simply say what a comfort it is to uncover somebody who genuinely understands what they’re talking about on the internet. You certainly know how to bring an issue to light and make important things simpler. A lot more people have to read this and learn from your side of simple is better in Technology and life!!! I was surprised you are not more popular since you definitely have the gift.

    Reply
  5. Kirk MiandaneseDecember 4, 2016 - 1:59 am #5

    Awesome!

    Reply
Leave a Reply

No trackbacks yet.

Posts with similar tags
Posts in similar categories

BC$ = Behavior, Content, Money

The goal of the BC$ project is to raise awareness and make changes with respect to the three pillars of information freedom - Behavior (pursuit of interests and passions), Content (sharing/exchanging ideas in various formats), Money (fairness and accessibility) - bringing to light the fact that:

1. We regularly hand over our browser histories, search histories and daily online activities to companies that want our money, or, to benefit from our use of their services with lucrative ad deals or sales of personal information.

2. We create and/or consume interesting content on their services, but we aren't adequately rewarded for our creative efforts or loyalty.

3. We pay money to be connected online (and possibly also over mobile), yet we lose both time and money by allowing companies to market to us with unsolicited advertisements, irrelevant product offers and unfairly structured service pricing plans.

  • Archives