image_alt_text

8

Feb/10

MediaTomb DLNA To Playstation 3

Monday, February 8th, 2010

Overview

I found the Video plugin for MythTV 0.21 to be inadequate for streaming to the Sony Playstation 3. It didn’t update fast enough when you dropped a video into the UPnP directory and also there was no external way of telling it to refresh it’s list of files without starting up Myth Frontend.

MediaTomb

MediaTomb is a UPnP server which can run as a standalone or as a daemon. It uses an XML configuration file for it’s settings (pretty neat stuff) and is pretty small in size. The software comes with it’s own web server so you don’t have to install a full apache install to get to the control panel and it uses SQLite by default so no big database backend to be installed.

Install & Configure MediaTomb

Install MediaTomb and ffmeg thumbnailer
sudo apt-get install mediatomb ffmpegthumbnailer
That’s it for the install!

edit the file config file in /etc/mediatomb/config.xml and change the following settings:

Enable PS3 support change this:

<protocolInfo extend=”no”/><!– For PS3 support change to “yes” –>

to

<protocolInfo extend=”yes”/><!– For PS3 support change to “yes” –>

and also

<!– <map from=”avi” to=”video/divx”/> –>

to

<map from=”avi” to=”video/divx”/>

Add the line
<pc-directory upnp-hide="yes"/>
below
<webroot>/usr/share/mediatomb/web</webroot>
so that it looks like this
<webroot>/usr/share/mediatomb/web</webroot>
<pc-directory upnp-hide="yes"/>

This hides the full directory path from the Playstation so it can only view the directories added and not the full system.

Add the following to enable thumbnail previews. I have found this does not work 100% of the time.

Enable transcoding
<transcoding enabled="no">
to
<transcoding enabled="yes">

Add the following transcode mappings under <mimetype-profile-mappings> tag:

<transcode mimetype=”video/divx” using=”video-thumbnail”/>
<transcode mimetype=”video/mpeg” using=”video-thumbnail”/>
<transcode mimetype=”video/mp4″ using=”video-thumbnail”/>
<transcode mimetype=”video/x-ms-wmv” using=”video-thumbnail”/>

Add the following settings between the <profiles></profiles> elements. Not the parent is plural and each profile is singular.

<profile name=”video-thumbnail” enabled=”yes” type=”external”>
<mimetype>image/jpeg</mimetype>
<accept-url>yes</accept-url>
<thumbnail>yes</thumbnail>
<resolution>128×128</resolution>
<agent command=”/usr/bin/ffmpegthumbnailer” arguments=”-i %in -o %out -s 128″/>
<buffer size=”524288″ chunk-size=”512″ fill-size=”1024″/>
</profile>

Restart MediaTomb service sudo /etc/init.d/mediatomb restart If it fails to restart then double check the config file for errors.

Go to the machine in a web browser on port 49152 e.g http://localhost:49152

On this web page configures the directories available over UPnP. The Database section shows what directories are visible / registered to MediaTomb and Filesystem shows the computer directories that can be added for DLNA / UPnP visibility. When a directory is added MediaTomb scans the directory and register them so they show up on the Playstation. These can include music, videos and pictures.

In the top right hand corner there is a plus “+” with two arrows around it. Clicking on it loads a new page in the main window, replacing the file lists in the directory. This is the page for setting how often it scans for changes.

Go to the Playstation, turn it on and go to the relevant category e.g photo in the menu. There should be a MediaTomb server in the list. If it does not appear go towards the top and scan for more media servers to look for MediaTomb.

Summary

The software is pretty self contained but I would have liked the option to use Apache and MySQL because those are already installed on my system.

MediaTomb does the job for now and whilst I cannot get the thumbnails to work on all the media it still does a brillant job of streaming the media to the Playstation. Unfortunately it’s not integrated into MythTV so records will still have to be done via MythTV but this is not a problem because all recorded TV shows are registered in the database.

A problem I did encounter was that I added multiple directories but reguardless of where they reside on the computer, all videos appear in one directory on the Playstation. I’m not sure if this is a bug or how it’s suppose to work.

[HOWTO]:Stream DivX/XviD to a PS3 with firmware 2.10 using MediaTomb and Ubuntu 7

28

Dec/09

Unable to access MythTV Perl API. Try with –verbose to find out why.

Monday, December 28th, 2009

I have been getting the error message

Unable to access MythTV Perl API. Try with –verbose to find out why.

on MythTv running on Ubuntu 8.04. It wasn’t bothering me too much because the TV guide was still being updated. Also I believe this is something to do with MythTV-Status only which prints out in the console what is being recorded (if any), next up coming recording and the amount of available space.

The problem is the MythTv-Status program is ran on a schedule and is requires the config.xml in the ~/.mythtv directory to be copied or a symbolic link in /root/.mythtv Run the following commands to solve the problem:
$ sudo mkdir /root/.mythtv
$ sudo ln -s ~/.mythtv/config.xml
$ sudo /etc/init.d/mythtv-status reload

The last command will run MythTv-Status to read the new configuration XML file and run without any errors.

The only problem it has caused is that it does not say how many days worth or TV guide it has where as before this fix it specified it with errors.

Unable to access MythTV Perl API. Try with –verbose to find out why. Ubuntu Forum

1

Oct/09

Ubuntu No Monitor Defaults To 800×600

Thursday, October 1st, 2009

Overview

I recently moved my Long standing Linux box running Ubuntu 8.04 as a headless server which needs X running because of Mythtv. Once it was in place I remoted into the box running Remote Desktop on Linux and VNC client on the PC. When I got it the screen was squished to 800×600 resolution.

Auto Detect Monitor

Ubuntu tried to be too helpful in this scenario. It limited the resolution to 800×600 max with a smaller resolution. There was no option to increase it. I did not want to plug in a monitor so it could detect the correct screen resolution every time it started up. I knew this would lie in the Xorg configuration.

After some Google searches I found the solution which requires adding some entries into xorg.conf.

First create a backup:
$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

To restore the config use the following command:
$ cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

Edit the file /etc/X11/xorg.conf and find the section Section "Screen". My default config looked like this:

Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
Defaultdepth 24
EndSection

Add a sub section to the end with the resolution you want e.g:

Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
Defaultdepth 24
SubSection “Display”
Modes “1024×768″ “1024×1280″
Virtual 1024 768
Virtual 12804 1024
EndSubSection
EndSection

I’m not sure how it handles which resolution is default on start up but once it’s in you can remove change it via Gnome or only add one screen resolution to force it to boot into that resolution.

Edit: It takes the last virtual resolution defined in the sub section and does not allow users to pick and choose if more than one are defined.

screen resolution in remote desktop Ubuntu Forum Post

17

May/09

Hauppauge WinTV Nova TD-500 On MythTV

Sunday, May 17th, 2009

Overview

I was scouting for a new TV capture / tuner card for MythTV ever since I moved out and got MythTV running using the roof antenna. The PCI-E stuff is nice but not mature enough in Linux. From my understand Hauppauge is the best support TV cards in Linux and therefore I wanted to stick with them.

Picking TV Card

I waited to see if I could get Digital Freeview before splashing out an analogue again which are few and far between since the Digital switch over is coming soon. The website Freeview website stated I could get only channels 1-5, the normal terrestrial channels over the air. This didn’t fill me with much confidence.

My brother had a spare Freeview box which I borrowed off him and was happy when more than 5 channels were picked up in the scan. I ended up with more than 15 working channels in total on the box.

It was time to head to Google to do research. After finding out you needed one tuner per computer watching live TV e.g one master server with one front end connected to the TV in the living room and one front end on the computer you will need 2 TV tuners to watch live TV from the living room and on the computer at the same time. This does not affect recorded shows.

Few hours / days later I had my eye on Hauppauge WinTV Nova T-500. I wanted to stay on Ubuntu 8.04 LTS because it was supported for 2 years and ideally I would get it set up and leave it alone and not bother with the latest releases.

Nova T-500 Or Nova TD-500

During my research MythTV wiki had a great article on the Nova T-500. It states which hardware is truely a T-500 whether the box says so or not. I have found the original T-500 hard to come by but the things to look out for on the box are:

Ubuntu 8.04 & Nova TD-500

8.04 kernel was just one or two versions out when V4L drivers included TD-500 support in their DVB drivers. This means you have to patch or compile the kernel to include the driver. This also meant you had to do this every time a new kernel update came out from Canonical. This would not be a problem for me except I did not manage to patch / build a module that worked with this version. I did not want to go down the route of compiling a new kernel so I gave up.

Ubuntu 8.10

My DFI Infinity NF4 supposedly has a BIOS bug which does not show in Ubuntu 8.04. I have tried turning things off like acpi, apic, etc, etc but no luck. Also I tried removing compiz and not install the nVidia drivers. I did manage to get through a MythTV install and get it up and running to see it was working out of the box.

I have the latest BIOS update from DFI but no luck. I even went to the lengths of downloading and installing Mythdora 10 but that failed to start up X.

Ubuntu 9.04

I hoped this release would have been better but it was going along the same route as 8.10. I tried it and it had the same problems so I left it as that. I’m looking to either replace my motherboard or look into replacing the internals of the computer.

Summary

I wish the Ubuntu folks would update the kernel but from the feedback I got in the forum it’s not likely to happen. The best route would be to re-compile the kernel or figure out how to get the module working.

It’s not looking good for me to get this TV card working. The only option is to get a new motherboard but for an aging socket 939 is not going to be easy but will be the cheapest option with no 100% gaurentee.

Another route I can take is to scrounge enough parts to partially rebuild the PC. I do remember having enough bits but not sure if they all still work especially the graphics card.

The last option is to build a new PC for the sole use as a MythTV server. Whilst this has been brewing in my mind it’s not something I can commit to financially right now especiall when the current Linux box is aging and looking as though it will not handle another release by Ubuntu.

MythTV Article On Hauppauge WinTV Nova T(D)-500

Hauppauge WinTV Nova TD-500 Product Page

20

Feb/09

XMLTV Error 6400 And XMLTV Error 2304

Friday, February 20th, 2009

My MythTV had a problem with the getting the T.V schedule (guide) and all the channels just displayed “No Data”. I ran mythfilldatabase manually and it reported Error 6400.

I shutdown Myth Backend and started it back up and ran the T.V grabber again but this time it reported Error 2304. Luckily someone else had the same problem and it had been solved on the Ubuntu Forums.

According to the `Zidane the problem is the script used to get the T.V schedule found invalid characters in the T.V schedule file and fell over and died. To fix it you:

Allow read and write access to the script:

sudo chmod a+w /usr/bin/tv_grab_uk_rt

Find the line:

/^(\d+)\|(.+)/ or die “Bad channel entry seen in RT channels.dat: $_”;

Comment it out with a #:

#/^(\d+)\|(.+)/ or die “Bad channel entry seen in RT channels.dat: $_”;

Add a new line below it which detects less “illegal” characters:

#/^(\d+)\|(.+)/ or die “Bad channel entry seen in RT channels.dat: $_”;
^(\d+)\|(.+)/ or next;

Save and exit the from editing the file and re-apply the file permission:
sudo chmod a-w /usr/bin/tv_grab_uk_rt

Re-run the fill database command and it should go back to normal.

XMLTV Error 2304 Ubuntu Forum Post