Cast for two

Friday, August 31, 2007

Embedding MP4 in HTML with Flash 9 beta Moviestar

From Jeroen Wijering I found a way to play MP4 movies in a webpage using the new Flash Version 9 beta, nicknamed Moviestar. It uses SWFObject to embed a Flash file using Javascript and the mediaplayer by Jeroen.
This is the code:


<script type="text/javascript" src="swfobject.js"></script>


<p id="player1">

<a href="http://www.macromedia.com/go/getflashplayer">

Get the Flash Player</a> to see this player.

</p>


<script type="text/javascript">

var s1 = new SWFObject("mediaplayer.swf","single","384","224","7");

s1.addParam("allowfullscreen","true");

s1.addVariable("file","test.mp4");

s1.addVariable("image","preview.jpg");

s1.addVariable("overstretch","none");

s1.addVariable("smoothing","false");

s1.write("player1");

</script>

In the same directory above code is residing, store swfobject.js,test.mp4,preview.jpg and mediaplayer.swf.
The result looks like this:

I don't understand yet when clicking on fullscreen, the video does not resize but that's probably an option of mediaplayer I have to enable. Also, I have the impression the movie is first downloaded before playback starts. I am quite sure the header atoms in test.mp4 are in front of the file. So the movie should faststart. Here is an example where it does work. Any suggestions welcome in the comment.

UPDATE:
leaving out the overstrech variable so that is get the default true value, stretches the movie to fullscreen in fullscreen mode. No problem now with the fast start. So the code becomes:

<script type="text/javascript" src="swfobject.js"></script>


<p id="player1">

<a href="http://www.macromedia.com/go/getflashplayer">

Get the Flash Player</a> to see this player.

</p>


<script type="text/javascript">

var s1 = new SWFObject("mediaplayer.swf","single","384","224","7");

s1.addParam("allowfullscreen","true");

s1.addVariable("file","test.mp4");

s1.addVariable("image","preview.jpg");

s1.write("player1");

</script>

Thursday, August 30, 2007

Drupal + Flex : Adobe becoming good netizen ?

Benevolent dictator of Drupal, Dries Buytaert, announced that he has tipped his tows into Adobe Flex technology. A bit surprising given Drupal's open source approach. It looks like Adobe is tipping their tows into open source because they contributed to Drupal as well. Adobe also announced and released their beta Flash player nicknamed moviestar that supports advanced MPEG-4 audio and video (the systems part (.mp4 files), the High Efficiency AAC and Advanced Video Coding AVC Part 10 to be more precisely). Meaning that within a year more then 90 percent of the browsers will be able to play video content based on a open standard. Something only Quicktime could do. The Quicktime player is ok but the implementation on Windows was always beyond standards with regards to performance. Maybe Adobe's move will force Apple to improve their Windows implementation. Fullscreen functionality that came with version 7.2 is already a step into the good direction. May the best win!

I've made a small test to embed a MPEG-4 file but no succes. The file is loaded but does not play with the beta player installed. For your reference, this is the code I used:


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0"

id="fullscreen" align="middle" height="224" width="384">

<param name="allowFullScreen" value="true">
<param name="movie" value="test.mp4">

<param name="bgcolor" value="#333333">

<embed src="test.mp4" allowfullscreen="true"

bgcolor="#333333" name="fullscreen" type="application/x-shockwave-flash"

pluginspage="http://www.macromedia.com/go/getflashplayer"

align="middle" height="224" width="384">

</object>

The file test.mp4 is in the same directory as the html page. Maybe the mime type is not ok ?

Saturday, August 25, 2007

New feature in Google Maps: embed into html

Google announced a new feature of Google Maps. Go to "My Maps"/"Mijn kaarten" on maps.google.be and click on "Link to this page"/"Link naar deze pagina". Two textfields appear:
Embedding the HTML in the second text box under "HTML in website plakken":


<iframe width="425" height="350"
frameborder="no" scrolling="no" marginheight="0" marginwidth="0"

src="http://maps.google.be/maps/ms?ie=UTF8&hl=nl&msa=0&

msid=106593127569810234189.000435c68e072f63d1f57&om=1&

ll=50.916561,4.699123&spn=0.090651,0.05137&

output=embed&s=AARTsJpF3cBYZmrDjYcLS8foVeBIWCBK5A">
</iframe><br/>
<a href="http://maps.google.be/maps/ms?ie=UTF8&hl=nl&msa=0&

msid=106593127569810234189.000435c68e072f63d1f57&

om=1&ll=50.916561,4.699123&spn=0.090651,0.05137&

source=embed"

style="color:#0000FF; text-align:left;font-size:small">
Grotere kaart weergeven

</a>

renders in this blogpost as:

Grotere kaart weergeven
which will show up right on your blog but might leave just a blank spot in your feed reader. Let me know in the comments how it works with your feed reader.
If you click on "Ingesloten kaart aanpassen en voorbeeld ervan weergeven", you get the ability to alter the defaults of the generated HTML:

Basically, it allows to alter the size of the included map. It's a pitty that you can not influence the controls that appear on the map.

Friday, August 24, 2007

New version of Handbrake released : 0.9.0


Recently, Handbrake 0.9.0 was released. Handbrake is a software tool to encode DVD's to mpeg-4 files. I used the previous version frequently to backup movies for the kids and was already very impressed by the tool. I guess the new version can only be better. A nice review can be found on MacWorld. Handrake is free and based on a lot of free software.

Thursday, August 16, 2007

I go on holiday to the sea and I take with me:

books.

More particularly, I have high expectations from:
"De zee, Een fascinerende ontdekkingsreis door verleden, heden en toekomst van onze planeet" written by Frank Schätzing. The dutch version of the book "Nachrichten aus einem unbekannten Universum". I think reading this is a excellent preparation to the upcoming game Spore. The game is inspired on the movie "The power of ten". I saw that movie on the dutch television in "Zomergasten" in 2005. The guest was Robbert Dijkgraaf, one of the founding fathers of the string theory. Will Wright, the creator of The Sims, has created Spore partly inspired on the power of ten. Spore is an epic journey that takes you from the origin and evolution of life through the development of civilization and technology and eventually all the way into the deepest reaches of outer space.

The other books are:


Nice to see that all books come from the local library except the book from Penrose.

Monday, August 13, 2007

My Personal DNA

Like Jean Philip, Peter and Pietel I also determined my personal DNA:

Hm, advocating inventor? Maybe.

Sunday, August 12, 2007

Signed up to Google Mashup Editor

Huray, I'm signed up to the Google Mashup Editor beta test program. First impression is that its less graphical then the pipes from Yahoo! I don't know if that's a bad thing. More on this later.

Sunday, August 05, 2007

Google Mashup Editor

Google is sending out private invites for their Google Mashup Editor. I already signed up for it. Google Mashup Editor (GME) is a webbased tool for creating mashups using GME syntax along with HTML, CSS and Javascript. Hopefully I'm selected for an invite so that I can tell more about it. Read/write Web has already received their invite and wrote about it. Take the GME tour to learn the basics.

GME resides into the same class as Yahoo Pipes. Those editors are important because they attempt to make it as easy to write as to read the web ("The original slogan was always to have a web that was easy to write as it was to read", said Robert Cailliau of the World Wide Web Consortium.) Mashup editors can be used to make widgets or gadgets as Google likes to call them. Widgets are the latest buzz and receive a lot of attention. Silicon Valley sees them as a Web revolution in the making.

GME is based on the Google Web Toolkit. More and more AJAX libraries are popping up. I think about things like BackBase. What would you do, using GWT or Backbase ? Or dou you prefer vertical integration and thus opt for Adobe Flex ? It makes me wonder if GME makes using Google Gears really easy. In that case, GME might be a strong contender for Adobe Flex.