OpenSG Browser Plugin
June 29, 2009
Well the summer has finally arrived, and I’ve finally got around to publishing this on the research groups website. It is a small application making use of the Qt4 browser-plugin API to provide an OpenSG canvas within a web browser. It wouldn’t take much effort to make it easily installable for users. (Just statically link the whole thing into a single binary I’m guessing)
The advantage of using OpenSG rather than OpenGL as a canvas for web3d graphics is that you can build upon the scenegraph, take all of it’s functioanltiy, rather than you worrying about creating file loaders etc. The URL for the plugin is http://novellab.brighton.ac.uk/?q=projects/opensgplugin
P.S. If anyone is able to help me solve https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/389441 it’ll be great.
Converting Access to mySQL
November 11, 2008
One of those joys within computing which we come across is the need to convert legacy data to a new shiny format. My current task is to convet a legacy Access database to mySQL so it can be accessed via the web. It contains data on various scupltures around sussex and will be available at http://www.publicsculpturesofsussex.co.uk
To convert the database I found a GPL’ed application (http://www.bullzip.com/products/a2m/info.php) which is able to produce a mySQL database dump file or connect to the database and create a replica. Through a simple Windows installer and GUI wizard the task was made suprisingly trival, with the whole process taking less than 5 minutes.
Digitalising Home Movies on Ubuntu Hardy with a PVR-150
July 16, 2008
I had a need at home to convert some out VHS movies to digital so I purchased myself a WinTV-PVR-150 MCE. This would enable me to play video from a VCR, outputting via a SCART cable which split into composite video and audio. Hardware encoding of the analogue signal enabled the captured input to easily be transfered to a digital file (mpeg2). As usual from Hauppauge linux support is excellent with the card fully supported out of the box with Hardy.
To take the input from the card and save it into a file I simply needed to do:
cat /dev/video /path/to/file
To switch between the various inputs on the card I need to use the following commands (v4l2-ctl is available in the ivtv-utils package):
v4l2-ctl -i 0 for the tuner
v4l2-ctl -i 1 for svideo
v4l2-ctl -i 2 for composite
All in all I found the card very easy to use for my purpose, and will now be looking to use it within my Mythbuntu installation.
Video Textures in OpenSG
July 15, 2008
I’ve mentioned OpenSG on this blog. It is a scene-graph based API I use at work for rendering of 3D scenes. As part of these scenes you can create textures on these objects, which are basically pictures. Well my co-worker, Karina, has produced some code for displaying video on these textures, which is really cool.
We’ve been playing around with video playing over our tiled wall cluster both playing just a video, or wrapping the video around an object such as a sphere. We’ll be releasing the source code for it soon on our website along with some other cool things we’ve been producing. But before hand I’d just like to show you a picture of it running the Big Buck Bunny video (which is cool project as well).
Enabling ply Support for OpenSG on Ubuntu Hardy
July 4, 2008
The OpenSG packages within Ubuntu Hardy don’t contain any of the contrib directory functionality been built. These aren’t prebuilt due to them been work in progress or licensing issues. The ply contribution is restricted due to it’s license to non commercial work only, so it needs to be built outside of the packages distributed.
Normally this would be built and stored within the libOSGSystem.so library, requiring the the library to be built again, which takes a while
So instead I’ll show you how to build it as a separate library for you to link against in your applications.
Within the directory containing the source code, the following command will build it as a shared library called libOSGPly.so.
g++ OSGply.cpp OSGPLYSceneFileType.cpp -I/usr/include/OpenSG/ `pkg-config OSGSystem --libs --cflags` -shared -fPIC -o libOSGPly.so
This then needs to be copied to your system path so the linker can find it, so:
sudo cp libOSGPly.so /usr/lib/.
The header files then require installation, so:
sudo cp *.h /usr/include/OpenSG/.
Now all you need to do is add -lOSGPly to your linker options to use the library.
I’m sure the same trick can be used with the other contrib features if you wish to enable them easily.
Keeping mythtv-backend Alive
June 23, 2008
I’ve a small problem with my mythtv-backend in that it will crash once or twice a week without giving a clue as to the problem, even when running it through gdb. When restarting, it would work fine again therefore there was the need to detect a crash and restart when it happens.
This is currently been worked on for the next version of Mythbuntu through the use of upstart scripts, however I was needing a soultion before then. This lead to the development of the script below, which checks to see if it’s running, and restart it if it’s not.
The script is limited in that you need to manually start it after the machine has booted. I run the script within a screen console (so I can detatch it) using watch to run the script every 60 seconds.
So in screen:
sudo watch -n 60 ./keep-myth-server-alive.sh
The script:
#!/bin/bash
# Copyright (C) 2008
# David Morris (david.morris@greenacre.no-ip.com)
#
# This program is free software; you can
# redistribute it and/or modify it under the terms
# of the GNU General Public License as published by
# the Free Software Foundation, version 2 or later.
#
if [ `ps -ef | grep -c mythbackend` == '1' ];
then
sudo /etc/init.d/mythtv-backend start
fi
iplayer scraper
May 2, 2008
I’ve paid a bit of attention to the iPlayer development that has been occuring for linux over the last few months, with flash and mp4 versions. http://po-ru.com/ provides a ruby download script for the mp4 when passed the PID.
Now I’ve been thinking we can easily make this into a standalone player which users can browse on a desktop through the use of a GTK applications, or as a plugin for mythtv. To this end, I’ve hacked up a python scraper to generate the iPlayer listings and I’m publishing it here in the hope it’ll be of help to people.
It returns:
- URL with the PID
- URL for the thumbnail
- Title of show
- Date show was aired
- Duration of show
- Synopsis of show
I’ve create the core module and a small script to demonstrate how it can be called. What you choose to do with the data once it’s returned is left to yourselves.
mythtv Planet
January 17, 2008
There is a new planet in the solar system of OSS, mythtv Planet. If you want your feeds to be added then send an email do Daviey to be added at addme@planetmythtv.com. Alternatively give him a poke on IRC. daviey [on] irc.freenode.net.
Ubuntu packaging – my 1st package
December 11, 2007
Well I’ve cut my first teeth now with regard to Ubuntu packaging and had my 1st package accepted into the hardy release
The package I used was cpptest which is a portable and powerful, yet simple, unit testing framework for handling automated tests in C++. I used this testing framework for my Masters work and decided to simplify the tool chain for others to build and use my work.
It’s great after around 3 -4 weeks of learning around my job to have it accepted and I’m looking forward to getting my other two packages in the queue accepted for hardy. I’d like to thanks the MOTU’s which have helped me get this package done through reviewing it namely sistpoty, persia, apachelogger and norsetto.
Remote Wonder 2 in Mythbuntu
December 10, 2007
I’ve had a few searches for this hitting my blog and seen people having problems with it as well. I just redid mine on Ubuntu Gutsy and this should work the same. Here is what I did
sudo dpkg-reconfigure lirc
I then chose the userspace driver
sudo nano /etc/modprobe.d/lirc
Here I commented out blacklisting of the `lirc_atiusb’ module.
Once this is done you can load it with
sudo modprobe lirc_atiusb
You’ll then need to install the lircrc file to /home/<myth user>/.mythtv/lircrc
Restart and it should all work fine. I’ve attached my config files for you to check against as well. If you need more help post here or find me (davemorris) on irc.freenode.net
irw is a great little program to run in a terminal to see what buttons your pressing and tsee what they are mapped to.
/etc/modprobe.d/lirc
