User:Menny

From MythTV Official Wiki
Jump to: navigation, search

WORK IN PROGRESS

Machines

laura2

Combined backend/frontend running

  • Intel Core Duo (2.6GHz) with 2GB DDR2
  • Hauppauge PVR-150 with IR (and IR-Blaster, which I don't use). The IR receiver is lirc's "mceusb_hauppauge". Mythbuntu calls it "Windows Media Center remote control (all)".
  • nVidia 7300
  • 1TB Storage
  • Mythbuntu 10.10

Storage configuration

Two additional hard-drives are mounted via fstab (located at "/etc/fstab"). fstab contents:

UUID=32629BC9629B9069   /media/disk1/   ntfs    defaults        0       0
UUID=8E70C31F70C30D41   /media/disk2/   ntfs    defaults        0       0

I use ntfs since my HTPC used to run Windows Media Center. MythTV is better :)
The UUID values can be found by running this command in shell (note: this should be run as root)

sudo blkid

FillMythMetadata.pl

To ensure the script works as required, mplayer must be installed:

sudo apt-get install mplayer

FillMythMetadata.pl runs twice a day, using crontab:

crontab -e

And the contents:

# m h  dom mon dow   command
0 6 * * * cd /home/menny/fill-mythvideo-metadata/ && rm -f fill.log && ./FillMythMetadata.pl >> fill.log
0 18 * * * cd /home/menny/fill-mythvideo-metadata/ && rm -f fill.log && ./FillMythMetadata.pl >> fill.log

At 6am and 6pm, I change directory to the FillMythMetadata.pl folder, delete the log file, runs the script and pipes its output to a log file.

Mythfrontend

lirc

Mythbuntu comes with lirc installed, and it works gets out-of-the-box. I found that I require some small changes:
in the mythtv lirc configuration file (found at "~/.lirc/mythtv"):

  • Up, Down, Left and Right:
    • repeat = 3
  • VolUp and VolDown:
    • repeat = 2
  • ChanDown and ChanUp:
    • repeat = 5

BTW, irw can be used to figure out what are the names of the remote control's button.

Frontend start via remote

More detailed information can be found here.
Don't forget to change the paths to your user's.
I use irexec to start Mythfrontend via the remote control (if it crashes or whatever). irexec should be started at startup. To this, I tweak the lircd service init stript. All needed to be done is to create a lircrc file:

sudo touch /etc/lirc/lircrc

This will cause the init.d to start irexec along lircd.
And a new lirc file is added to the .lirc folder to catch the IR event and start a script (file "~/.lirc/irexec"):

begin
       remote = mceusb_hauppauge
       prog = irexec
       button = Home
       repeat = 0
       config = /home/menny/start_frontend.sh
end

And a reference to the new file should be added to .lircrc file ("~/.lircrc")

include ~/.lirc/irexec

This IR event will run the script "sstart_frontend.sh" (located at "~/"):

#!/bin/sh
#NOTE: the name of this script MUST NOT include 'mythfrontend'!
if [ ! "$(pgrep mythfrontend)" ]
then
       echo "Mythfrontend is not started. Starting Mythfrontend..."
       DISPLAY=:0 xset -dpms
       DISPLAY=:0 mythfrontend > /home/menny/mythfrontend.log 2>&1 &
else
       echo "Mythfrontend is already started."
fi

NOTE: the name of the file must NOT include mythfrontend. The script is looking for this name in the running processes list, so naming the script with wrongly will cause the script to malfunction.
Now, all you need is to restart your machine, or restart the service:

sudo service lirc restart

Mythbackend

channels

I'm connected to an analog cable signal of Hot Tel-Aviv, Israel. MythTV does not provide Hot's channels list, but the try-all finds the channels, and some more. After performing the channel scan, I would like to delete all the redundant channels. I use this SQL script to delete them:

delete from channel where freqid not in (132,139,146,160,167,174,209,223,230,251,272,279,321,328,335,342,349,356,363,370,440,447,454,468,475,503);

And fixing the channels data (name, epg data, etc):

update channel set callsign='Hallmark', name='Hallmark', xmltvid='hallmark' where freqid=132;
update channel set callsign='1', name='Israel 1', xmltvid='isr1' where freqid=139;
update channel set callsign='2', name='Israel 2', xmltvid='isr2' where freqid=146;
update channel set callsign='NG', name='National Geographics', xmltvid='ng' where freqid=160;
update channel set callsign='10', name='Israel 10', xmltvid='isr10' where freqid=167;
update channel set callsign='Viva', name='Viva', xmltvid='viva' where freqid=174;
update channel set callsign='Eurosport', name='Eurosport', xmltvid='eurosport' where freqid=209;
update channel set callsign='BBC', name='BBC Prime', xmltvid='bbcprime' where freqid=223;
update channel set callsign='Fox News', name='Fox News', xmltvid='foxnews' where freqid=230;
update channel set callsign='Sky News', name='Sky News', xmltvid='sky' where freqid=251;
update channel set callsign='Knesset', name='Knesset', xmltvid='knesset' where freqid=272;
update channel set callsign='24', name='Music 24', xmltvid='music24' where freqid=279;
update channel set callsign='espn', name='ESPN', xmltvid='espn' where freqid=321;
update channel set callsign='tv5', name='tv5monde', xmltvid='tv5' where freqid=328;
update channel set callsign='tve', name='TVE', xmltvid='tve' where freqid=335;
update channel set callsign='3', name='HOT 3', xmltvid='hot3' where freqid=342;
update channel set callsign='4', name='HOT Movies', xmltvid='hotmovies' where freqid=349;
update channel set callsign='8', name='HOT 8', xmltvid='channel8' where freqid=356;
update channel set callsign='Family', name='HOT Family', xmltvid='hotfamily' where freqid=363;
update channel set callsign='5', name='Sport 5', xmltvid='sport5' where freqid=370;
update channel set callsign='6', name='HOT Kids', xmltvid='hotkids' where freqid=440;
update channel set callsign='VH1', name='VH1', xmltvid='vh1' where freqid=447;
update channel set callsign='MTV', name='MTV', xmltvid='mtv' where freqid=454;
update channel set callsign='33', name='Israel 33', xmltvid='isr3' where freqid=468; 
update channel set callsign='23', name='Israel 23', xmltvid='education' where freqid=475;
update channel set callsign='Mezzo', name='Mezzo', xmltvid='mezzo' where freqid=503;