Silverlight Video to Virtual Earth Map Sync

Jul 12, 2007 at 12:12 AM
Edited Jul 12, 2007 at 12:13 AM
I keep getting asked how we did the map syncing to the video in the Contoso Bicycle Club Windows Live Platform Quick Application.

In an Nutshell:


Neil rode around london with a video camera mounted on his bike - he also carried a Garmin GPS.

We took the tracklog from the GPS and uploaded it to the PC using EasyGPS . This gave us a file in GPX format (XML Based).

We then wrote some code that transformed the GPX file into a Expression Media Encoder Project file (also XML format). Each of the track points became a keyframe in the video with a title in the format GPS,<lat>, <lon>. We knew exactly what time the video started, so we could calculate key frame offsets by looking at the time stamp for each GPS position.

We then ran the video through Expression Media Encoder and uploaded it to the Silverlight Streaming Service.

Then, using a Silverlight video player we hooked the onMarkerReached events and, using a simple JavaScript handler, we update the Virtual Earth map whenever a key frame is reached.

The code is pretty simple - take a look at function onMarkerReached in default.aspx.js

Let me know if you use this technique to do something cool in your own app.

Rob.

--
Rob Blackwell
R&D Director
Active Web Solutions Ltd
http://www.aws.net
http://www.robblackwell.org.uk

Microsoft MVP, Windows - Virtual Earth/MapPoint

Coordinator
Jul 23, 2007 at 5:07 PM
I have blogged this over at http://blogs.msdn.com/angus_logan/archive/2007/07/24/how-to-build-geo-tagged-video-in-silverlight-streaming-and-sync-ing-a-virtual-earth-map.aspx
Aug 10, 2007 at 12:49 AM
I have been coming at this from a different angle - animating movement over a map, with a view to later incorporating photos & video.

(hit Stop and Start to 'animate'; known issues with IE6, use IE7 or FF)
http://www.racereplay.net/SutherlandToSurf/
http://www.racereplay.net/GoldCoast/HalfMarathon/

Was planning to time-sync the animation with the video when generating the Animation Xaml, rather than react to onMarkerReached. Given that it's not done yet, I can't claim to be sure it's a workable approach, just an idea.

It would be great if someone was working on a Silverlight 'client' for Live Maps (ala http://developer.yahoo.com/flash/howto-maps_as2.html) rather than the overlay approach. I'm not sure if the cross-site sandboxing thing would prevent tiles from loading though?

Craig
http://conceptdevelopment.net
Coordinator
Aug 13, 2007 at 2:21 AM
Really cool stuff you have built.

I've asked Rob Blackwell to jump on the thread as he is a VE guru - far beyond my skills :)
Aug 13, 2007 at 1:55 PM
Craig,

Great demos - I think the combination of animation / maps / multimedia opens up some interesting possibilities for new apps.

I guess it wouldnt be hard to do some VE stuff from within a Silverlight app - you could pull the map tiles directly and paint them yourself - See http://viavirtualearth.com/vve/Articles/RollYourOwnTileServer.ashx for info on the tile serving protocol.

Given all the interest in Silverlight, VE and PopFly, I'd be suprised if Microsoft wasn't already working on some kind of Silverlight VE client as you suggest - that's just speculation though - I guess we'll have to wait and see.

Rob.
Aug 15, 2007 at 12:57 PM
Thanks Rob - I had seen that Tile Server article previously, and it was very helpful getting http://conceptdevelopment.net/silverlight/TileClient01/ 'working'.

Not sure how far it'll go - but I'm thinking I can get it to the point where I can get it to a 'useful' stage in my http://www.racereplay.net/SutherlandToSurf/ context. Animation/synchronisation is the key - I could easily trade off zooming and lat/long functions - even a fixed map extent will be fine. The question will then be - is it OK with Microsoft :-s ??? Of course, I'd add the Microsoft Virtual Earth logo...
Coordinator
Aug 16, 2007 at 4:39 AM
Craig - can you ping me offline about this angus dot logan at microsoft