[mapserver-users] time enabled WMS with <video/> elements instead of <img/> elements

Tim-Hinnerk Heuer heuert at landcareresearch.co.nz
Wed Jan 11 22:50:49 EST 2012

Well, with the way I was thinking it would work to zoom/pan. ;-)
I would fork off OpenLayers for this purpose too, because instead of 
having an <img/> we would simply have a streaming <video/> tag in the 
HTML, so when you zoom in something like


would simply be replaced with


Only that the videos are pre-generated of course. The logic for 
generating the videos I have already implemented and I have little 
256x256 videos for all zoom levels 1-10.

I'm currently experimenting with simply changing the parameters in the 
XML config file for mapcache. Will let you know. Otherwise, I think I'm 
just going to hack it and save the videos as *.png and put a fake proxy 
in front of mapcache. Maybe not optimal but should work.

Mh, after hacking around a bit, that doesn't work...


On 12/01/12 16:26, Mr. Puneet Kishor wrote:
> Tim,
> (top posting because I have a more generic response)
> I have tackled this very much like you did with multiple images and opacity, etc. I too considered a movie, but the problem with a movie is that you can't zoom in. The images are geo-referenced, so you can zoom in and out and pan and drag. I was using OpenLayers, so I created a "scrubber" (a jQuery slider) and tied it to layer loading and unloading. I would query for an image and draw it only if the user moved slider to request a specific image. It was not very smooth, but it did work.
> You can decrease the "weight" of the images by using GIFs, at least, that is what I did. I remember I had 100 images (one for each year for a century's worth of model run) and the performance was quite good. I did pre-calculate the images at different zoom levels -- I believe there were 12  zoom levels, so I generated 1200 images and then used OL's layer image type.
> Wish it were possible to zoom, pan, drag a movie as if it were a map.
> On Jan 11, 2012, at 8:10 PM, Tim-Hinnerk Heuer wrote:
>> Hi,
>> Interested in HTML5 + MapServer and visualisation, read on.
>> Happy new year to you all!
>> I'm working on a rather interesting project at the moment where we need to map data over time. We tried experimenting with having one layer for each time unit and essentially overlaying them, manipulating their opacity to have a mini movie, but we noticed that the downloads of all the images become quite significant (61MB for a test extent!). I then implemented a proof of concept page (HTML5) where I took an extent's images and concatenated them in a webm video over time and then played all the videos at the same time, giving me a nice visualisation of that area at a relatively low cost (2.3MB per that extent) and the advantage of streaming.
>> I have already written a script that generates all the videos, so I have invested considerable amounts of time into this.
>> It would be great now if I could use the Apache module mapcache to serve up these videos listening and responding to WMS requests. So, all I need to change about mapcache is to serve a .webm file with MIME type video/webm instead of a .png file at the given extent. I guess I could write something in PHP or even with MapScript to serve up those files, but
>> A) I don't know how mapcache finds the right image for an extent and
>> B) Although I know C, my knowledge of it is a bit rusty and I don't know the interface(s) for writing Apache modules in C, let alone a plugin for mapcache
>> I'm keen on learning, but if someone knows where in the code I would have to look for this change/feature enhancement it would be really helpful.
>> Has something like that been done already or is in experiment/planning?
>> If you could give me some hints of how to approach this in the quickest way possible I would be very grateful. Of course this is a project which needs to be done quickly but I want to do it anyway, because it's fun.
>> Thanks for reading and hopefully you have an answer!
>> Regards,
>> Tim
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users

More information about the mapserver-users mailing list