Welcome!

www.alacrity-solutions.com

Welcome to the Alacrity Solutions Blog Pages, a source for anything worthy of note (or that I might forget). I hope that what is contained herein is of use to others as well as myself and truely welcome any contributions and feedback.

Happy reading and I await your input!

Monday, 14 June 2010

MythTV - Open Source PVR & Now Media Server for Sharepoint - Part 3

Part 3 of the Series and we should now have a Media Server setup, the ability to record Live TV and stream those recordings as well as rip DVDs to the system and modify MythWeb to allow the streaming of these files too.

In order to watch Live TV through MythTV you could install the MythTV Frontend to another machine as there is a Windows version of this (should you want to install it on Windows - link is here).  I have not tried this route as I didn't feel it provided the kind of interface that staff would find easy to use should we distribute the system to them in order to watch Live TV.  Instead I looked at MythTV Player for watching TV channels - the Official Release of the software does not support watching the TV streams, only the recordings but downloading the developmental version 0.7.0 DOES allow to watch Live TV and thus far I have had no problems with it at all.  I got the files in zip format from sourceforge.net, didn't have to install it at all but put it on a share and ran it from there.
Opening the software, if there are any updates there is sometimes an error when looking for a particular database version.  To workaround this, simply open the config.xml and change the integer value to the one the system is looking for.








The MythTV Player is limited to using the number of tuners available in the card. Say for example you were recording two different channels, there would be no tuners free for the MythTV Player to connect to in order to show Live TV.  For us though this is not really an issue as it is us who set up the viewing of Live TV should it be necessary and should more tuners be required then staff would just be out of luck.



One thing we did find recently is if you start recording a program, it is then available to stream in the recordings section of MythWeb and so can be viewed in multiple classrooms at once with only the recording delay.
Stopping a recording stream does not work however, which is logical when thought about as stopping the stream breaks the connection with the server.  Unlike having the film on your HDD, a stream would not know where to restart playback from.

So there you have it, our new Media Server capable of recording Live Television, playing channels via the network and having a Media Library of ripped Videos.  Personally, I would also like to be able to stream Live TV but looking at solutions like MythStreamTV, they are no longer supported in newer versions of MythTV/MythWeb and I imagine they would suffer from similar tuner limitations as the MythTV Player.

The inspiration for getting this Media Server working in order to utilise it within Sharepoint came from examining Twynham School's usage of MOSS as a learning aid.  Their public pages can be viewed at Sharepoint @ Twynham but their technical team have a blog about their developments at http://www.sharepointedutech.com/.  They describe their utilisation of Windows Media Server to distribute videos, however I found MythTV to provide more features on the TV usage and after the Video MythTV Streaming Hack to be equally as useful with archived material.

Along the lines that Twynham do, I hope to make links in Sharepoint to the .asx streaming file in order to organise teaching resources.  Uploading the asx file itself to Sharepoint did not work but simply linking to the URL works well internally.  The next step is to extend this to staff, then external to the school but there is more organisational work to be done before we get to that stage.

I hope that this tutorial series has helped others and if it has then please feel free to let me know.

MythTV - Open Source PVR & Now Media Server for Sharepoint - Part 2

To recap, we should at the point where we have Ubuntu Server installed, MythTV working and Live TV viewable from the server.

Our next step is installing MythWeb, a web based listings viewer and recording portal for the Live TV.  Using our old friend havetheknowhow.com, at the bottom of the Install MythTV tutorial is "How to Configure MythWeb".  If you haven't already done so then you should follow this part of the guide.  Now the web based interface should be accessible on http://ip_of_server/mythweb allowing you to see TV listings and set up recordings.

Once you've recorded a program and gone into 'Recorded Programmes' you should see a thumbnail of the program with two icons next to it just like this:


The top icon is to stream the video from the server.  It opens a .asx file that will then play the video across the LAN.  We have VLC Player installed on all staff machines in school so we open the file with this and it plays without any problems.  Should you want to use Windows Media Player to play the recording, you will need to install dsmyth codecs available at sourceforge.net.  Should the file need to be directly downloaded then the clipboard icon is for this function.

These icons will be important later on but for now we will move on and configure the system to be able to store DVDs.  In order to add DVD videos to our system, we have to install MythVideo.  This will add an "Optical Disks" option in the MythTV Frontend where we can rip DVDs and they will be accessible through MythWeb in the Videos section.
In Synaptic Update Manager, search for MythVideo, Mark for Installation and Apply and now the Optical Disk option should be available.  If you now go in to the menu and rip a DVD, it should also appear in MythWeb in Videos.  For more information on MythVideo, setup and installation the MythVideo wiki is a good place to start.  The only issue I had setting the system to rip DVDs was that when I clicked Begin, nothing happened.  This was because in the Backend, Storage Directories for Videos did not have a path.  Entering /var/lib/mythtv/videos solved the issue and then ripping commenced.

Looking in our Videos section now of MythWeb we should see the name of the DVD we ripped or set at the ripping stage.  However the only option to play the video is by clicking the title to start a Direct Download.  If you install VLC player with the Mozilla Firefox plugin you can watch the video in the Firefox browser.  For us though this was not an option as we restrict users to Internet Explorer so we can control settings with Group Policy.  Therefore the easiest way to distribute videos that are not TV Recordings is to stream them the same way as recorded programmes.  Mythweb however does not have this function natively.



A lot of googling later (a LOT of googling), I came across the MythVideo Streaming Hack.  The article mentions enabling it for MP4 video files so after checking with the author of the article (thank you to Sune for replying to me and helping me out), I was able to add the same streaming capabilities to ripped videos as recorded ones.  On the Streaming Hack web page, there are some MythWeb patches that require to be run which can be downloaded from here.  If, like me, you have no idea how to apply a Linux patch then hopefully this tutorial (again kindly hinted at by Sune) will help.
Note: Any Mythweb update will overwrite the patch files and so remove the new streaming icons - as I have found to my detriment!



So we now have a Media server capable of not only recording and streaming TV programmes but now also streaming a Video Library which makes this a great option to link to Sharepoint for Teaching and Learning materials.  In the next part, we will look at how to do this, how others have set up their systems to do the same, and how to watch Live TV from another computer using MythTV Player.

MythTV - Open Source PVR & Now Media Server for Sharepoint - Part 1

With world sporting events as they are (World Cup 2010 and Olympics 2012 on the horizon), we as an IT Department thought it best to come up with a way to show Live TV in school before the rush of requests came.  In order to get it to all areas of school without needing an aerial at each point we needed a solution that we could run across the network.

After some research MythTV came to my attention as a server/client method of delivering TV across a LAN.  Having a Hauppauge WinTV-HVR-1300 at home, I knew I at least had something I could start to use without having to invest in a new system.

So, we began with the WinTV card just mentioned, an old Fujitsu-Siemens Scenic Edition X102, 250GB HDD and an installation of XUbuntu and a gnome desktop environment (us Windows boys and our GUI's!).  For help on installing Ubuntu Server (I used Karmic version for this project as had used it for Nagios setup - a blog for another time) check here.  When installing Ubuntu Server, I also installed LAMP at the same time.  This will be useful later on when we install the web based aspect of MythTV to manage, record and view programmes. Once MythTV was installed (again using havetheknowhow.com - Install MythTV) we were ready to try and watch Live TV on the Ubuntu Server.  Successfully we did but had a couple of issues, firstly we were only able to get a small range of Freeview channels and after trying many Google searches a couple of things became apparent which I feel I need to mention.

Firstly, the WinTV-HVR-1300 is an old card now and has problems in Linux.  After our first scan we got a small band of channels but subsequent searches revealed no channels at all.  Unfortunately our aerial was also pointing in the wrong direction so I cannot say with any certainty whether the card was at fault or the aerial was the problem.  After we found we'd lost all the channels following our initial success, the Hauppauge Nova-T range of TV cards seemed to be recommended most (and appeared on the MythTV wiki under Hardware) and so purchased the Model 909.  This discovery though was not before finding out about the v4l-dvb project at LinuxTV.org, it extends the hardware driver database in linux in case you have a different card that is not being picked up.  If hardware isn't the problem however, havetheknowhow.com also has another excellent troubleshooting tutorial "When 'Scan For Channels' finds no channels".

After the install of the new card, channel scanning was a lot better (as with the previous card it seemed to find nothing after our initial scan) and so we got back the few channels we started with.  We were able to confirm our aerial was also contributing to the problem when we tried using a freeview box to scan for channels.  Once it was pointing in the right direction we had all the channels we should be getting and were ready to move on.

In the next part, now that we are all hopefully up and running watching LiveTV, we will move onto a web based viewer and recordings scheduler that will help form the basis of MythTV being a Media Server also that we can integrate with Sharepoint.

Monday, 7 June 2010

Excel, Lookups and Headaches

So a nice challenge arose for a monday morning, a teacher wanted a grade level calculating as an average in order to input the data to our MIS system.  Using the format of 4a, 4b and 4c for grade levels and a complete fear of excel, the job was taken on by our kind selves.

The first task was to convert alpha-numeric characters into an integer value in order to perform the calculation.  After a little Googling the following link gave me exactly what I needed: http://www.ehow.com/how_5349505_use-letter-represent-value-excel.html.

Great! After demonstrating our new found use for Excel, it wasn't quite what was required as it wasn't an integer value that was needed for the average grade but a level (like 4a etc).  So now it's time to convert 4a from equalling 5 back to equalling 4a.  However this can't be done with the same vlookup function that kindly got us this far.  We now need to use the Index and Match functions (explained excellently on this link http://www.mrexcel.com/articles/excel-vlookup-index-match.php so I shaln't reinvent the wheel!)


A little more working on the Spreadsheet and we have what we want, getting an average grade from an alpha-numeric value.  Google I salute you!