Thursday March 20, 2008 | Constantin's Blooog |
|
Useful stuff for your blog-reading pleasure.
All
|
General
How to compile/run MediaTomb on Solaris for PS3 and other streaming clients
To my surprise, Ingo got himself a new PlayStation 3 (40GB). The new version is a lot cheaper (EUR 370 or so), less noisy (new chip process, no PS2 compatibility), and since HD-DVD is now officially dead, it's arguably the best value for money in Blu-Ray players right now (regular firmware upgrades, good picture quality, digital audio and enough horsepower for smooth Java BD content). All very rational and objective arguments to justify buying a new game console :). The PS3 is not just a Blu-Ray player, it is also a game console (I recommend "Ratchett&Clank: Tools of Destruction" and the immensely cute "LocoRoco: Cocoreccho!", which is a steal at only EUR 3) and can act as a media renderer for DLNA compliant media servers: Watch videos, photos and listen to music in HD on the PS 3 from your home server. After checking out a number of DLNA server software packages, it seemed to me that MediaTomb is the most advanced open source one (TwonkyVision seems to be nicer, but sorry, it isn't open source...). So here is a step-by-step guide on how to compile and run it in a Solaris machine. Basic assumptionsThis guide assumes that you're using a recent version of Solaris. This should be at least Solaris 10 (it's free!), a current Solaris Express Developer Edition (it's free too, but more advanced) is recommended. My home server runs Solaris Express build 62, I'm waiting for a production-ready build of Project Indiana to upgrade to. I'm also assuming that you are familiar with basic compilation and installation of open source products. Whenever I compile and install a new software package from scratch, I use /opt/local as my base directory. Others may want to use /usr/local or some other directory (perhaps in their $HOME). Just make sure you use the right path in the --prefix=/your/favourite/install/path part of the ./configure command. I'm also trying to be a good citizen and use the Sun Studio Compiler here where I can. It generally produces much faster code on both SPARC and x86 architectures vs. the ubiquitous gcc, so give it a try! Alas, sometimes the code was really stubborn and it wouldn't let me use Sun Studio so I had to use gcc. This was the path of least resistance, but with some tinkering, everything can be made to compile on Sun Studio. You can also try gcc4ss which combines a gcc frontend with the Sun Studio backend to get the best of both worlds. Now, let's get started! MediaTomb PrerequisitesBefore compiling/installing the actual MediaTomb application, we need to install a few prerequisite packages. Don't worry, most of them are already present in Solaris, and the rest can be easily installed as pre-built binaries or easily compiled on your own. Check out the MediaTomb requirements documentation. Here is what MediaTomb wants:
Compiling and installing MediaTombNow that we have all prerequisites, we can move on to downloading, compiling and installing the MediaTomb package:
Configuring MediaTombOk, now we have successfully compiled and installed MediaTomb, but we're not done yet. The next step is to create a configuration file that works well. An initial config will be created automatically during the very first startup of MediaTomb. Since we compiled in some libraries from different places, we either need to set LD_LIBRARY_PATH during startup (i.e. in a wrapper script) or update the linker's path using crle(1). In my case, I went for the first option. So, starting MediaTomb works like this: LD_LIBRARY_PATH=/opt/csw/lib:/opt/local/lib:/usr/lib/firefox Of course you should substitute your own interface. The port number is completely arbitrary, it should just be above 49152. Read the command line option docs to learn how they work. You can now connect to MediaTomb's web interface and try out some stuff, but the important thing here is that we now have a basic config file in $HOME/.mediatomb/config.xml to work with. The MediaTomb config file docs should help you with this. Here is what I added to my own config and why:
MediaTomb is ok to help you show movies and pictures and the occasional song on the PS3 but it's not perfect yet. It lacks support for AAC (tags, cover art, etc.) and it could use some extra scripts for more comfortable browsing structures. But that's the point of open source: Now we can start adding more features to MediaTomb ourselves and bring it a few steps closer to usefulness.
"How to compile/run MediaTomb on Solaris for PS3 and other streaming clients" has been brought to you by Constantin's Blooog.
This entry was created on 2008-03-20 15:07:08.0 PST and is associated with the following tags:
compiling
diy
howto
installing
media
mediatomb
open
playstation
ps3
software
solaris
source
streaming
How to burn high resolution DVD-Audio DVDs on Solaris and Linux (And it's legal!)
It all started with this email I got from Linn Records, advertising the release of their Super Audio Surround Collection Vol 3 Sampler (Yes, targeted advertising works, but only if customers choose to receive it), which is offered in studio master quality FLAC format files, as a download. Gerald and I applauded Linn Records a few months ago for offering high quality music as lossless quality downloads, so I decided to try out their high resolution studio master quality offerings. The music comes as 96kHz/24 Bit FLAC encoded files. These can be played back quite easily on a computer with a high resolution capable sound card, but computers don't really look good in living rooms, despite all the home theater PC and other efforts. The better alternative is to burn your own DVD-Audio and then use a DVD-A capable DVD player connected to your HiFi-amplifier to play back the music. There's a common misconception that "DVD-Audio" means "DVD-Video" without the picture which is wrong. DVD-Video is one standard, aimed at reproducing movies, that uses PCM, AC-3, DTS or MP2 (mostly lossy) for encoding audio, while DVD-Audio sacrifices moving pictures (allowing only still ones for illustration) so it can use the extra bandwidth for high resolution audio, encoded as lossless PCM or lossless MLP bitstreams. Also, note that it is not common for regular DVD-players to accept DVD-Audio discs, they must state that they can handle the format, otherwise you're out of luck. Some if not most DVD-Audio Discs are hybrid in that they offer the content stored in DVD-Audio format additionally as DVD-Video streams with one of the lossy DVD-Video audio codecs so they can be played on both DVD-Video and DVD-Audio players.
Now, after having downloaded a bunch of high-res FLAC audio files, how can you create a DVD-Audio disc? Here's a small open source program called dvda-author that does just that: Give it a bunch of FLAC or WAV files and a directory, and it'll create the correct DVD-A UDF file structure for you. It compiles very easily on Solaris so I was able to use my Solaris fileserver in the basement where I downloaded the songs to. Then you give the dvda-author output directory along with a special sort file (supplied by dvda-author) to mkisofs (which is included in Solaris in the /usr/sfw directory) and it'll create a DVD ISO image that you can burn onto any regular DVD raw media. It's all described nicely on the dvda-author How-To page. Linn Records also supplies a PNG image to download along with the music that you can print and use as your DVD-Audio cover. And how about iPods and other MP3-Players? Most open source media players such as the VideoLan Client (VLC) can transcode from high resolution FLAC format to MP3 or AAC so that's easily done, too. For Mac users, there's a comfortable utility called XLD that does the transcoding for you. Here's common misconception #2: Many people think AAC is proprietary to Apple, mostly because Apple is heavily advertising its use as their standard for music encoding. This is wrong. AAC is actually an open standard, it is part of the ISO/IEC MPEG-4 specification and it is therefore the legitimate successor to MP3. AAC delivers better audio quality at lower bitrates and even the inventors of MP3, the Fraunhofer IIS institute treat AAC as the legitimitate successor, just check their current projects page under the letter "A". Apple developed the "Fairplay" DRM extension to Quicktime (which is the official MPEG-4/AAC encapsulation format) to be able to sell their iTunes Music Store as a download portal to the music industry. Fairplay is proprietary to Apple, but has nothing to do with AAC per se. As much as I love Apple's way of using open standards wherever possible, I don't think it's a good thing that their marketing department creates the illusion of these technologies being Apple's own. This is actually an example of how AAC suffers in the public perception because people think it's proprietary where the opposite is true. How is the actual music, you ask? Good. The album is a nice mixture of jazz and classical music, both in smooth and in more lively forms, great for a nice dinner and produced with a very high quality. Being a sampler, this album gives you a good overview of current Linn Records productions, so you can choose your favourite artists and then dig deeper into the music you liked most. There's one drawback still: The high-res files available on the Linn Records download store are currently stereo only, while the physical SACD releases come with 5.1 surround sound. It would be nice if they could introduce 5.1 FLAC downloads in the future. That would make downloading high resolution audio content perfect, and this silly SACD/DVD-Audio/Dolby-TrueHD/DTS-HD Master Audio war would finally be over.
"How to burn high resolution DVD-Audio DVDs on Solaris and Linux (And it's legal!)" has been brought to you by Constantin's Blooog.
This entry was created on 2007-10-21 04:45:44.0 PST and is associated with the following tags:
audio
diy
dvd
dvd-a
dvda
hd-audio
howto
open
opensource
solaris
source
Robot Surgery 101
How come we have one? Well, during CeBIT 2006 I met Roger Meike. He works at SunLabs and was presenting one of my favourite projects: Sun SPOT. Anyway, we talked a bit about robots and if they really can be useful or just expensive toys. He recommended Roomba to me and said it would really work. So I checked out the iRobot home page. Gosh! Their main business is building robots for military purposes! You know, just like in the movies with robot arms and belt-drive, searching for bombs, that kind of thing. So if there is a company capable of building a real working vacuum bot, then it must be these guys. Millions of dollars of robot research hovering around my home for just a few hundred bucks. It actually works well and Roomba has been vacuuming our home for quite a while now. The deal is this: You save time because you don't have to vacuum your home, Roomba does it while you're away working or at the supermarket. It may be slower, but it doesn't steal you time, so it really acts as a time-saver. If you save, say 15 minutes of time per week by not vacuuming and value your free time at, say 10-20 dollars per hour, then you have more than paid off the cost of a Roomba after a year or two. And you can have a lot of geek fun too! Anyway, today Roomba decided to not work correctly anymore, it would spin around in circles and never go straight. After checking iRobot's support area and some forums, it seemed to be the bumper sensor. But thorough cleaning of the robot and more or less gentle banging on its bumper wouldn't improve Roomba's behaviour much. More drastic measures were needed. Thanks to some diagnostic instructions I found on the web, it became clear that the right bumper sensor was really kinda stuck. Fortunately, I found some well-documented disassembly instructions and was able to remove the bumper assembly to check out the sensors. Roomba uses a lot of optical sensors, even for the mechanical stuff (based on rods interrupting light flow etc.) which make them very robust, but sometimes sensitive to dust cluttering. Now that the sensors have all been cleared, our Roomba is back and can continue to happily vacuum our home again!
"Robot Surgery 101" has been brought to you by Constantin's Blooog.
This entry was created on 2007-09-20 14:33:36.0 PST and is associated with the following tags:
diy
geek
home
howto
irobot
robots
roomba
Cool Apple-Like Photo Animations With POV-Ray, ImageMagick and Solaris
Recently we took a team photograph for an internal web page. I wanted that effect and I love the open source raytracer POV-Ray so I wrote a script that renders the same animation effect and creates an animated GIF using ImageMagick. You can see an example output to the right featuring photos of some popular Sun products. BTW, check out photos.sun.com for free, high-quality access to Sun product photography. To create your own photocubes, you just need POV-Ray and ImageMagick in your path and the photocube.sh script. Being open source, all run on Solaris but also on Linux, NetBSD or any other operating system that can run open source software. I'd love to try this script out on a Niagara 2 system with its 8 cores, 16 pipelines, 64 threads and 8 FPUs. Hmmm, all rendering frames in parallel :). There are already precompiled distributions of POVRay and ImageMagick on Blastwave that you can install very easily onto your Solaris machine if you don't have them already. Just call the script with 6 URLs or pathnames. It will then automatically read in the images, render the animation frames and then combine them all into an animated GIF: -bash-3.00$ ../photocube.sh *.jpg The script uses ImageMagick to make the pictures quadratic and to limit their size to 1200x1200 pictures if necessary. Since the Feel free to modify this script to your needs. You may want to experiment with other ways of animating the cube or other image transition effects. Maybe you want to use ffmpeg to create real video files instead of animated GIFs. Be careful when cranking up the number of frames while using ImageMagick to create animated GIFs, ImageMagick wants to suck in all frames into memory before creating the animated GIF and so you may end up using a lot of memory. If someone has a more elegant, scriptable animated GIF creator, please leave me a comment. I hope you enjoy this little exercise in raytracing and animation. Let me know if you have suggestions or other ideas to improve this script!
"Cool Apple-Like Photo Animations With POV-Ray, ImageMagick and Solaris" has been brought to you by Constantin's Blooog.
This entry was created on 2007-08-23 13:20:47.0 PST and is associated with the following tags:
apple
cool
diy
howto
imagemagick
iphoto
opensolaris
opensource
photos
pov-ray
raytracing
script
slideshow
solaris
|
|