Wednesday, March 24, 2010

Media Center IV

The Final Chapter

Now that Windows media center is out of the running the search continues for the solution. Here are the requirements:

- must work with an Xbox 360 as the client (not going to use 2 devices)
- must be non-proprietary (no iTunes-like control)
- must work with all or almost all media (multiple formats) on the server
- no TV recording or pvr functions needed as i don't use cable or sat

The xmbc linux solution was perfect except it would not sync the hdmi video thru the pre-amp and plasma tv (worked fine with lcd). So we are looking for plan B.

Since all the media is stored on the network i just need something to read the files and produce a display than is picked up by the xbox client.

The solution seems to be TVersity (http://tversity.com/) a software server. It currently only runs on windows and uses windows media player 11 for some functions but i can live with that for now as they have a linux version under development. The software is only $39 and can be purchased online (which i did). It will also work with some of our other devices such as the bedroom netbook, liam's psp and wii, my iTouch and the various computers strewn about the house. The website has lots of information.

Once purchased a download link is sent in an email message. The only problem was the link did not work - because the email is automated and adds a period after each sentence it thought the url was a sentence, once the ending period was stripped off the URL worked fine and i downloaded the .exe setup file.

Installed without a hitch and had it index the my music, my video and my pictures folders on the network. Next we went upstairs and fired up the xbox and the server showed right up. Connected and everything worked except most of the audio files could not be played. This is because they are high-rez flac, which every audiophile uses - get with the program microsoft!

So back downstairs. Adding flac support to windows media player is not easy. It requires downloading and installign the madFlac datashow decoder (tvsersity uses datashow) and then hacking the registry. Here is the registry patch:

[HKEY_CLASSES_ROOT\.flac]
@="FlacAudio"
"Content Type"="audio/x-flac"
"PerceivedType"="audio"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-flac]
@="FlacAudio"
"UserApprovedOwning"="yes"
"Extensions.SpaceSep"=".flac"
"Extensions.CommaSep"="flac"
"Extension.Key"=".flac"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\Groups\Audio\flac]
@="FlacAudio"
"Description"="Includes files with .flac extensions."
"Extensions"=".flac"
"FriendlyTypeName"="Flac Audio File"
"MIME Types"="audio/x-flac"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.flac]
"Permissions"=dword:0000000f
"UserApprovedOwning"="yes"
"Runtime"=dword:00000007
"PerceivedType"="audio"
"MediaType.Description"="Flac Audio File"
"Extension.Handler"="FlacAudio"
"Extension.MIME"="audio/x-flac"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\Player\Extensions\Descriptions]
"414"="Flac Audio File (.flac)"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\Player\Extensions\MUIDescriptions]
"414"="Flac Audio File"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\Player\Extensions\Types]
"414"="*.flac"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\MLS\Extensions]
"flac"="audio"

Now flac files play in the media play. I also set up the Wii to connect to the tvestity media center using the flash interface. Kind of ugly but it works with the wii web browser, which is Opera. You can download it for free. It's quite a bit slower than the xbox which is connected via 100mb cable while the wii is such wireless G. One annoyance is that the xbox doesn't have a web browser per se so getting to online content is a bit harder - you have to see up RSS feeds or playlists for internet content. I want to get Hulu channels set up. Of course, since this is Canada we are not allowed to get Hulu (ban the CRTC!) but since i live in Detroit it's no problem. In face, there is a web site called bugmenot.com that has usernames for sites that require registration that you can use for such things...

Anyway dragged some hulu channels into the media server - will see how it works later. Must say hulu is getting some decent content.

PS - xbox live has a facebook extension so you can connect to fb, but it is kind of lame...

Monday, March 22, 2010

Media Center III

This is turning into an epic...

We installed ubuntu 9.10 on the revo and then xbmc and all the goodies. Everything worked perfectly, the mediaplayer skin on the 24 inch lcd was very sweet. Only problem was the remote would not work. Installed and configured lirc and everything else but no joy. I also found out the remote also workd with the xbox - turning on the media center also turned on the xbox!

What to do? This got me interested in the xbox - which had been a throw-in trade item. It was able to browse the windows shares on xp and pick up video, audio and pics in windows-friendly formats. A neat program called connect 360 for osx set up the mac pro to share its itunes library with the xbox. So far so good. To get this to work on the pc i had to install windows media player and set it to share the files. It works but the windows media player keeps crashing.

This led me to windows media center, it has an xbox extender to allow and xbox to connect to it. So i installed the media center 2005 version on the revo. Took a while to download all the revo drivers and set the whole thing up. You have to download an update and the extender from microsoft and then enter a number from your xbox and after a few error messages it found the xbox. From the now xbox client i could run the media center. This seemed good - a nice skin and it picked up the local content. However, it couild play very few formats that are essential to a media center like FLAC and quicktime etc and while the online channels were neat like NPR it could not play any content as it did not support FLASH..so it is useless.

So we are back to square 1 - cant use apple tv as it is proprietary and doesnt support file formats in common use for content, ms media center is worse, and the open source xbmc is the best but would only sync with my lcd and not the big plasma. We could try the standalone players like popcorn etc but really why have so many devices?

The xbox seems to be the best possibility, the wireless controllers work well and are sturdy, the hdmi video/sound is excellent and the gui is ok. The question is how to set up the back end so that all content is served and played. So we need to test out a number of media types, esp flac for audio and videos. If the windows media player stability could be fixed and configured so it plays all types then that is a livable solution but i find it odd in 2010 to have to still deal with all these problems. I had a living room media center 10 years ago, a pc hooked to a zenith professional 29 inch tube tv that had vga input. The best solution would be to run xbmc as a client on the xbox 360 but ms does not allow that..

tomorrow - improve xbox back end

Wednesday, March 10, 2010

Senayan Library System

Today we looked at the Senayan library system. We have been using OpenBiblio in class but the pace of development is practically non-existent. The other alternative is we have been looking at running Koha on USB - more to report on that as we gain some experience.

We downloaded the portable senayan version. It contains it's own xampp stack of apache, php, mysql. To run just extract and copy it to your USB stick and run the apache-start.bat and mysql-start.bat files and then goto http://localhost to see the system. Youl could run this on a hard drive by editing those files so that the path is correct.

This is good - but the students already have an existing xampp installation. The solution is fairly easy:

First we ran the portable version off a USB stick without an existing lamp stack. Next we exported the senyanadb database to a .sql file. This can be done using the mysql command line client, the web-based phpMyadmin or any other client such as Navicat. We used the excellent HeidiSQL client.

The next step was to edit the configuration file which is sysconfig.inc.php
This is found in the apache/htdocs/senayan3-stable12 folder. The lines you want to change are:

define('DB_HOST', 'localhost'); <-- Your database host or IP number

define('DB_PORT', '3306'); <-- Your database server port

define('DB_NAME', 'senayandb'); <-- Your database name

define('DB_USERNAME', ' senyanuser '); <-- Your database connection user

define('DB_PASSWORD', ' password_senayanuser '); <-- Your database connection password


NOTE: for an XAMPP setup on a usb stick you have to change the path of the mysql backup utility. Find the section beginning with //* DATABASE BACKUP and for xampplite use:

$sysconf['mysqldump'] = '/xampplite/mysql/bin/mysqldump.exe';

For a quick install we changed the username to root and the password to blank to match the default XAMPP install. Obviously totally insecure and not recommended! The better way would be to create a the above user in mysql with privileges for the senyandb database.

Then we copied the senayan3-stable12 folder to the htdocs directory on the USB Stick.

Next we connected to the mysql database as root and created a new blank database called senayandb and then imported the .sql file from the backup and executed it to build and populate the tables.

When finished we flushed the database and went to http://localhost/senyan3-stable12/index.php and viola - the system appears.

more later...

a student reported that when adding a user the Birth Date field only goes back to 1985! While a date before that can be added manually it does seem odd...she also noted that changes such as adding an author or a book seem to take some time (1-2 minutes) to show up.

Monday, March 8, 2010

Another windows PC bites the dust

The list of purchased but not used Windows licenses continues to grow....

The kitchen laptop, a DEll D400 with 1gig ram, 40gig hd and 11" screen has now been converted to Ubuntu. It has been used the last few years as a replacement for the daily newspaper. Google News is vastly preferable to the local rag. I get to read the Washington Post, the National Post and the Yarmouth Vanguard while having breakfast. Out of laziness it was running windows xp because that is what came with it. Besides the worry of viruses and malware, windows was old and lacked the stuff i needed and use. While it doesn't have great speakers it would be useful to be able to play some of the many tunes in the media center. I did a test of the xbmc client running on windows and then thought if i was going to do that i might as well go the whole hog.

First task was to backup the important stuff - no not the programs or the OS and any data is on the server anyway but the bookmarks, passwords, cookies, form fill data and all the other stuff in Firefox. I use the excellent FEBE extension which creates backups. I backed up to a USB stick and then away we go...

A hour later it was goodbye XP and hello Ubuntu 9.10 - unfortunately the wireless did not work but getting the updates fixed that problem. Installed the FEBE extension and restored the Firefox data and away we go...The window environment is so much nicer and all my stuff is available. Next to install the xbmc client.

This got me thinking about how much i am forced to spend on windows licenses i don't need and don't want. A lot of people are in the same fix as microsoft forces vendors to include windows on their machines or else it will yank their windows license. Very few allow you to substitute linux for windows. Just looking around the room i see:

  • Dell D400 - came with windows xp now running ubuntu
  • Dell 1520 - came with Vista, now running ubuntu
  • Dell 470 - came with windows 2000, now running ubuntu
  • Dell 620 - came with windows xp, now running freenas
  • Dell mini9 - came with windows xp, now running ubuntu
  • Acer Revo - was supposed to ship with windows xp...now running ubuntu
  • Mac pro - does not run windows but i'm thinking of vmware...
  • Macbook - does not run windows
  • G4 Tower - runs apple OS9
There is one machine left running xp and you would not believe the problem i had re-installing xp - their 'genuine advantage' program had some problem and so i had to use the telephone of all things to call a number and get a long code to type in. It was such a pain. Had to do the same thing when i tried vista for a day...

I have a banker's box filled with unused microsoft software. They sell lots for sure, wonder how much sits unused and unloved...

Wednesday, March 3, 2010

Media Center Project II

The Acer Revo arrived and it is cute. It sits on a little stand and is less than 2" thick but packed with ports. We fired it up and the installed OS is freeDOS!  That's ok, it was supposed to ship with Windows which we were going to wipe anyway. I was just thinking that i've purchased 5 windows licenses in the last year when i bought computers and i use none of them. Sales figures are not the same as 'in use' figures.


As a bonus it shipped with the wireless keyboard and mouse, i'll take that anyday over a version of windows. The included hard disk is SATA but small - 160gig and there is only 1 gig of ram and the usual Atom cpu. I have read that microsoft forces manufactures to adhere to those low end specs if they want to sell windows. Not a problem for this application, as a media center client it only needs an OS and the client software, in fact i could take out the hd and run it from a usb stick. All the audio/video/picture files are stored on the media server (\\megatron). The revo has a wired ethernet port which is ok because we want high speed to the living room. Other media clients can use wireless - we should install the xbmc client on the laptops and liam's iMac. That means all the computers can access the content files which are stored centrally.

We popped open the machine by removing 1 screw and squeezing the side panel. The inside is neat. Added a second 1gig sodimm to bring it up to 2 gig. This is necessary as the video uses the ram, like a cheap laptop it has no dedicated video ram. A setting in the BIOS controls the amount of ram allocated to the nvidia ion chip - we set it to 512mb as we want to output high def video (and sound) via HDMI.

Anyway, we hooked up a usb optical drive, went into the BIOS and changed the 1st boot device to USB and rebooted into an XBMC liveCD. We wiped the hard disk clean and installed - it puts a stripped down version of ubuntu 9.10 with the nvidia ion drivers and the xbmc client on the disk. The internal HD is easy to remove if you want a larger drive, but for heat reasons i would use the eSata connector.

The install and configuration of XBMC was a breeze, the network and all devices were picked up. I plugged in the little dongle for the wireless and the keyboard/mouse were recognized. The network speed was fine, i could browse windows shares (uck) and it picked up the UpnP media server no problem. The skin is incredible, very nice look. Then i plugged in the Vista media center remote and rebooted, it picked it up and worked like a charm. Able to perform all functions, including turning off the unit from the remote. Set up the audio/video settings to 1080i with hdmi sound out and shut down the machine. For setup and testing it was hooked to a 24" LCD via a vga cable.

Then we moved the unit upstairs and plugged it into the Onkyo Integta 9.8 pre-amp. This should route the video and audio to the pre-amp so that any desired video or audio processing takes place in the digital domain and direct the video out via hdmi to the 54" Panasonic and the audio via XLR cables to the power amps and then to the speakers.

This is where we hit the first problem occurred. At boot time the text was shown but with red streaking dashed lines all over the screen and after the XBMC logo appeared the screen went blank and the pre-amp displayed 'no video signal'. So i tried hooking it directly to the Panasonic and no signal at all. It was if the two devices were not syncing the video signal. I hauled up a vga monitor and changed the resolutions - cycling though 480i,480p,720p etc without joy. So off to searching the internet for answers. It seems there are a number of issues with using the liveCD and with HDMI audio/video under Ubunutu/XBMC. Some people appeared to have them solved but there are different approaches and no clear cut answer. This means some trial and error - which will take time. The unit will have to be returned to the basement for more tests.

The other issue is around the updating of the liveCD - once installed, updating is not clear to me. It can be done but again would require research and trial and error. I am thinking a better option would be to just go ahead and install 9.10 on the box along with the XBMC client repositories. This way i get the updates automatically. Plus, i can set it to auto boot the xbmc client anyway. Looks like i need some time...

Finally, i went with xbmc instead of mythTV because i don't have cable or satellite. However, i did install a small, cheap HDTV antenna in the attic and ran coax cable down to the Panasonic which has an HD tuner. I get one channel (SUN TV) over the air. The quality is fantastic. This makes me think that next year when analog over the air TV is finally gone that their would be more OTA high def signals. At that point it would make sense to purchase a tv-tuner card for the media server. The card would have to be supported by linux but once that is installed and setup then any of the clients could get TV as well as being able to record shows (as if there was anything on....)