Friday, November 30, 2007

Ubuntu 7.10 + mythtv

Last month I thought I would return to give Ubuntu a shot at mythtv. This time it was the new release ubuntu 7.10. Last time I tried ubuntu the drivers were so bad for my Nova-T and it was hard to setup that I gave up.

This time around though things were very different. I mainly returned to using this because I've started development on mythtv with Bill, and he suggested that we use ubuntu 7.10 as our OS for development. After setting it up on my notebook with a USB TV stick (Avermedia Vector A808) I was quite impressed at the ease and features which ubuntu 7.10 offered.

Installation was pretty simple, it consisted of these steps
1. install ubuntu
2. install mythtv package using 'sudo apg-get install mythtv' or the gui package manager
3. edit the ~/.mythtv/mysql.txt file and enter the password given to you through the setup of mythtv
4. build the mysql database by copying the command from the information box after the install of mythtv.
5. run mythtv-setup
6. run mythfrontend

This was it and it lead me to think why do we have mythbuntu at all and this seems much better than mythdora also.

Keeping everything standard makes installing software, getting help and configuring the OS much easier.

It was also easy to make ubuntu auto login and start mythfrontend.

Sunday, October 21, 2007

Transcoding in better quality

Yesterday we spent some time looking at transcoding under mythtv and how we can get better results.

We tried the following with their pros and cons listed underneath them.

mythtranscode
+ uses cut list
+ smaller file size but not by much.
- don't know how to run the profiles
- quality wasn't great
- no aspect ratio

nuvexport
- really crap quality
- wrong aspect ratio
- unsure of parameters
+ 1/3 the filesize

$ nuvexport

acidrip/mencoder
- no audio
+ small filesize
+ keeps aspect ratio
+ good quality


So we really wanted to get mencoder working as it seemed like the best. Someone also said to us that "nuvexport just calls mencoder/ffmpeg and mencoder and ffmpeg are both built on libavcodec, the same as mythtranscode so likely you just need to play with the settings more".

After playing with the settings for 4hours this was getting pretty frustrating.

To fix the no audio problem when encoding in mencoder we had to update mplayer to the latest SVN release. This is done by the following:

Make sure you install subversion first. (this is done through the Add/Remove programs in the menu or 'yum install subversion').
$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
$ cd mplayer
$ ./configure
$ make
# make install

We finally found a command in mencoder which produces really good output:

Works, aspect, with sound, good quality, small size, with index and seeking.
$ mencoder /mnt/recordings/test.mpg -oac mp3lame -lame opts "abr:br=128" -ovc lavc -lavcopts "vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=1500" -vf "pp=de,crop=0:0:0:0,scale=480:-2" -o "/home/mythtv/outfile.avi"

However putting this into mythtv has yet to be done successfully. To enter these types of command you have to:
stop your backend
# service mythbackend stop

go into mythtvsetup -> general, hit next till you see user jobs, then enter the commands in there. You can setup different quality etc.

I've put this command in, even hardwiring the intput and output doesn't work! I've tried putting this into a simple script then calling that from mythtv, which doesn't work. There has to be something simple to fix this. I'm going to ask a few questions and get this working. At least now I can run it on the command line and compress some of my recorded shows so it will take much less space.

Thursday, October 11, 2007

blu-ray and 5.1

Last night I burnt 9.8GB to a blu-ray BD-RE disk successfully and read the data from it.

I also got SPDIF (5.1) DTS and Dolby Digital working with mplayer on the command line through the optical cable. I haven't yet got this working through Mythtv. It nearly does though. I'm close but at 1am in the morning I had to give up.

Sunday, September 09, 2007

Mythdora-Transcoding

We got Mythdora to transcode so now we can convert our recorded programs into xVid, DVD or DIVX automatically.

First stop the backend
# service mythbackend stop

Go to setup
# mythtv-setup

Hit Next 6 times till you get to Job Queue (Host-Specific) section:

In here make sure you have selected the following:

In here make sure you have selected the following:
"Allow Commercial Detection Jobs"
"Allow Transcoding jobs"
"Allow 'User Job #1' Jobs"
"Allow 'User Job #2' Jobs"
"Allow 'User Job #3' Jobs"
"Allow 'User Job #4' Jobs"

Hit Next

Now select 'Save original files after transcoding'

You can also enter the commands and description on the next page.

User Job #1 Description: Convert to Xvid
User Job #1 Command: /usr/bin/nuvexport-xvid --nice 19 --input="%FILE%"
User Job #2 Description: Convert to DIVX
User Job #2 Command: /usr/bin/nuvexport-divx --nice 19 --input="%FILE%"
User Job #3 Description: Convert to dvd
User Job #3 Command: /usr/bin/nuvexport-dvd --nice 19 --input="%FILE%"

# service mythbackend start

Tuesday, August 21, 2007

VIA EPIA board

My mate which has been working on this project with me has recently brought himself a VIA Mini-ITX board, with small power supply and CF card to IDE.

This we hope will work nicely with mythdora 4.0. It has an onboard mpeg2 decoder which will help.

Last sunday we spent some time configuring this and trying to get something to run on the small CF card we had (512MB). Andy is getting a Sandisk UltraII 4GB drive soon and we'll install Mythdora on that. The idea is we will use that along with a 1TB NAS drive so that it's all fanless and low powered.

I'll post specs and pictures soon.

Sunday, July 22, 2007

Mythdora4.0 Continue, close to the end

We started early, with a plan. The plan was:
1. Get a remote control working
2. Work out why the EPG isn't working
3. Work out a budget for our custom box

If we had time we would get games working under various emulators.

Remote control
We have a MCE remote control

We plugged in the MCE receiver and 'dmesg' command shows us that we have a: lirc_mceusb2 and it links to device: uhci_hcd.
It also said we have the 'Phillips eHome' model so it looks like we the newer style of remote, with the research we did. Here is a link:
http://www.mythtv.org/wiki/index.php/MCE_Remote#Configuring_the_Buttons

Here are a summary of the commands we used:

Check that the receiver is in plugged in.
# lsusb
Bus 003 Device 004: ID 0471:0815 Philips

Load module
# modprobe lirc_mceusb2

Checking with lsmod
# lsmod | grep mceusb2

Did a search on lircd.conf files
# locate lircd.conf

Found a mce related one and copied that to /etc/lircd.conf
# cp /usr/share/doc/lirc-0.8.2/remotes/mceusb/lircd.conf.mceusb /etc/lircd.conf

Starting lircd
# lircd

Check the buttons are working
# irw


Then get lircrc from http://www.hauppauge.co.uk/board/showthread.php?t=8048
and dumped this into the file: /home/mythtv/lircrc and made symlinks

Bugs with lircrc file
VolUp on the mplayer, it is VoleUp, change this to VolUp
When playing music Fast forward is backwards, and Rewind is forwards, I also noticed it does this when playing a video

# cd /home/mythtv
For mythtv control do:
# ln -s lircrc .mythtv

For mplayer do:
# ln -s lircrc .lircrc



EPG update
I entered mythfilldatabase in 'crontab -e', but this wasn't working for some reason. I think it may have been a busy time when I was trying to update my EPG.

We entered the following into /etc/crontab:
0 16 * * * mythtv /usr/bin/mythfilldatabase

It's wise to use a time which isn't popular, so don't update between 2am and 6am because that's when everyone is trying.

We tested this and it seemed to be working.


Budget for custom case
We are using an old Pioneer CD Player and we are looking at a via motherboard etc.

We are thinking of this hardware at the moment:
VIA mini-itx EN12000EG $309 eyo.com.au
1GB DDR 400 $80 msy.com.au
Pioneer DVD-RW DVR-112 $38 msy.com.au
picoPSU-120 ~$90 mini-box.com
CF to IDE adapter & power cable. ~$18 mini-box.com
Sandisk CF 2GB $45 i-store.com.au
Hauppauge Nova-T WinTV DVB $60 USED - Brad.

OR swap the VIA mobo for:
VIA mini-itx LN10000EG $198 www.pioneercomputers.com.au

This would allow us to have a fanless, quiet, low powered and cool looking box. I will try and get some photos soon.

At the end we even had time to get quiet a list of games working
Sam n Max ScummVM
Doom Dosbox
Wolf3D Dosbox

We had heaps of problems with ZSNES and SNES9X.
ZSNES has problems with audio
SNES9X has problems with fullscreen.

Saturday, June 23, 2007

Mythdora 4.0

This is the best distro for myth we have tested so far.

It uses the latest myth version 0.20 on Fedora Core 6.

It auto detected the Hauppauge WinTW Nova-T DVB and everything was installed already such as myth packages for, video, pictures, music, game, internet streaming, phone, etc.

It didn't properly work with the graphics card, sometimes it's all discoloured when running mythfrontend. I still cannot work it out.

We could watch tv, record tv, what the video collection, listen to music, view images, burn dvd's straight out of the box.

EPG
We've tried to configure the EPG (Electronic Program Guide) and we have it half working. We are using shepard as it's a perl script which auto updates itself and gets all the EPG information for free. We have SBS News, Seven and all the HDTV channels working.

We are very close to getting this working and it really helps with recording anything you want so you can watch it later.

Video, Music, Gallery
When we linked to the shared drives we had to use this type of command:
//10.1.1.2/pictures /mnt/pictures cifs defaults,guest 0 0

For the video we have changed to xine (default) to mplayer instead because it's so much better.

Games
Used ZSNES, this worked quite well but fullscreen is a bit hard to get working correctly.

Joysticks were detected on /dev/js0, tested this with:
$ snes9x -joydevl /dev/input/js0

Remote control
I got a new remote control receiver called a ma-620, and nearly got it working the other night at the mlug meeting.