Monday 26 July 2010

Dome VP8

Doing some prep for the panotools conference coming up next week. We have some requests for the ability to view Equirectangular video - as supplied by cameras such as the Ladybug. I don't have access to the SAN for movie playback so I've been searching for a codec/container combination that will let me playback 2048x1024 video on a 3D texture inside Panda3D. H.264 is a bit CPU intensive - so I thought I'd try VP8...


I downloaded that latest nightly build of Chromium - this gave me a working libvpx. I compiled ffmpeg 0.6 against this new libvpx. I ended up with using these settings:
./configure --enable-shared --enable-nonfree --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-gpl --enable-pic --enable-libdirac
I then compiled Panda3D against this copy of ffmpeg. This didn't work initially. Well, it might have worked - but VP8 is limited to certain video containers, with Matroska being the preferred. So a quick 'egrep' in the Panda3D source directory yielded:
./panda/src/grutil/config_grutil.cxx: ts->register_texture_type(MovieTexture::make_texture, "avi mov mpg mpeg mp4 wmv asf flv nut ogm");
./panda/src/grutil/config_grutil.cxx: ts->register_texture_type(FFMpegTexture::make_texture, "avi mov mpg mpeg mp4 wmv asf flv nut ogm");
So I added 'mkv' to the list of know container types - and it worked. So now I have VP8 inside a Matroska container, applied to a 3D texture. So far the performance seems remarkably good.




Panda3D with VP8 Matroska from domejunky on Vimeo.