WARNING: you are not looking at the live version but at an older version.

Installing MythTV 0.18.1 on Linux Fedora Core 4

Live example

To be completed

Overview

To be completed

Description

Installed MythTV and dvb-apps
Configured Dvico Fusion HDTV DVB-T Plus
- See http://www.users.on.net/~jani/dvico-mythtv.html (MythTV with Dvico DVB-T)
- See http://wilsonet.com/mythtv/fcmyth.php (MythTV on Fedora)
- See http://www.mythtv.org (MythTV)
- See http://www.ethics-gradient.net/myth/mythdvb.html (DVB tuning)
- See http://www.dvico.com/products_dvbt_plus.html
- See http://www.itee.uq.edu.au/~chrisp/Linux-DVB/DVICO
- See http://www.dba.org.au/index.asp?sectionID=22&recLocation=Melbourne
- See http://www.linuxtv.org (DVB, VDR and V4L)
- See http://www.linuxtv.org/wiki/index.php/Main_Page (VERY GOOD REFERENCE)
- See http://www.videolan.org
- See http://www.onlinetractorparts.com.au/rohbags/xmltvau (XMLTV grabber)
- See http://gstreamer.freedesktop.org (GStreamer)
- See http://robin.geekscape.org/mythweb

  cd /etc/yum.repos.d
  wget http://wilsonet.com/mythtv/atrpms.repo
  rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

  yum install mythtv-suite
  yum install dvb-apps

# Set-up /home/users/mythtv, so that processes can run as ~mythtv
  cd /etc
  vi passwd group shadow
  mkdir -p /home/users/mythtv
  chown -R daisy:daisy /home/users/daisy

  chmod 666 /dev/dvb/adapter0/*  # [TODO] Use "udev" !

# scandvb /usr/share/dvb-apps/dvb-t/au-sydney_north_shore >channels.conf
# cp channels.conf ~/.mplayer
# cp channels.conf ~/.xine

  touch ~/.tzap/channels.conf
  scandvb -5 /usr/share/dvb-apps/dvb-t/au-sydney_north_shore | \
    cat ~/.tzap/channels.conf - | \
    grep -v :0:0:[0-9]*$ | sort | uniq > ~/.tzap/channels.conf.new; \
    cp -f ~/.tzap/channels.conf.new ~/.tzap/channels.conf
# ABC Melbourne, Seven Network, Nine Melbourne, Network TEN

  tzap -r -c ~/.tzap/channels.conf "Nine Digital" # Leave running
# Extract -t[PID] from channels.conf (convert 3rd last parameter to hexadecimal)  mpeg2dec -oxv -t0x207 /dev/dvb/adapter0/dvr0    # video only
  xine stdin://mpeg2 </dev/dvb/adapter0/dvr0      # video and audio out-of-sync

  rpm -i dvbtune-0.5-4mdk.i586.rpm
  rpm -i --nodeps dvbstream-0.5-2mdk.i586.rpm  # Ignore "perl-base" dependency

  dvbstream -o -ps -qam 64 -cr 3_4 519 720 | xine stdin://mpeg2
  dvbstream -o -ps -qam 64 -cr 3_4 519 720 | mplayer -cache 1024 -

# Simple recording
  dvbstream -o -ps -qam 64 -cr 3_4 519 720 >record.mpeg
  mplayer record.mpeg; rm record.mpeg

# Simple network RTP stream
  dvbstream -ps -qam 64 -cr 3_4 519 720  # System A
  dvb_dumprtp | mplayer -                # System A or B, C ...
# Configure LIRC for Dvico FusionHDTV remote control
  vi /etc/sysconfig/lirc
    LIRCD_OPTIONS="--driver=dvico --device=/dev/hiddev0"
  vi /etc/lircd.conf
# Added DVICO and DVICO_MCE remotes
  /etc/rc.d/init.d/lirc restart

# MySQL is already set-up and running
# /sbin/chkconfig mysqld on
# /sbin/service mysqld start
# mysql -u root -p mysql
#   mysql> UPDATE user SET Password=PASSWORD('ROOT_PWD') WHERE user='root';
#   mysql> FLUSH PRIVILEGES;
#   mysql> quit

# Backup MYSQL database(s) before proceeding !
  mysqldump -u root -p --all-databases >~/mysql_backup-2005-09-01.sql

# Set-up MythTV database called "mythconverg"
  mysql -u root -p < /usr/share/doc/mythtv-0.18.1/database/mc.sql

# Tune parameters for MythTV
  vi /etc/my.cnf
    [mysqld]
    key_buffer = 16M
    table_cache = 128
    sort_buffer_size = 2M
    myisam_sort_buffer_size = 8M
    query_cache_size = 16M
  /etc/rc.d/init.d/mysql restart

# Downgrade Fedora Core 4 "urw-fonts" to get around a font size too large bug
  rpm -Uvh --force ftp://rpmfind.net/linux/fedora/core/2/i386/os/Fedora/RPMS/urw-fonts-2.1-7.noarch.rpm
  vi /etc/apt/preferences  # To prevent "urw-fonts" being upgraded !
    Package: urw-fonts
    Pin: version 2.1*
    Pin-Priority: 1000
# Restart X server so that change works

# Set-up channels
  cat ~/channels.conf.old |grep -v :0:0:[0-9]*$|sort |uniq > ~/channels.conf
  cp channels.conf ~mythtv/channels.conf
# Set-up EPG (Electronic Program Guide)
  mkdir /usr/share/xmltv/tv_grab_au
  tar -zxf /usr/local/download/linux/xmltv/tv_grab_au-0.6.2.tar.gz -C /usr/share/xmltv/tv_grab_au
  mv /usr/share/xmltv/tv_grab_au/tv_grab_au /usr/bin/tv_grab_au
  mv /usr/share/xmltv/tv_grab_au/tv_grab_au.1.gz /usr/share/man/man1
# Changed "askQuestion" to "ask_choice"
  sed -i 's/askQuestion/ask_choice/g' /usr/bin/tv_grab_au

  tv_grab_au --configure
  tv_grab_au --days 1 --output test-1.xml  # Test it !

# Set-up the /video directories [TODO] MAKE THIS A MAXTOR "xfs" filesystem
  mkdir -p /home/spool/video
  ln    -s /home/spool/video /video
  mkdir -p               /video/mythtv/buffer /video/mythtv/recordings
  chown -R mythtv:mythtv /video/mythtv/buffer /video/mythtv/recordings

# Login as ~mythtv and set-up MythTV
  xhost +
  su - mythtv
  mythtv-setup
# - See http://www.users.on.net/~jani/dvico-mythtv-11.html
  mkdir ~/.xmltv
  ln -s ~/.mythtv/d1.com.au.xmltv ~/.xmltv/tv_grab_au.conf
  tv_grab_au --list-channels
# Use the following output to determine the XMLTV ID for each channel
# For example ... "free.Melbourne.10.d1.com.au"
  tv_grab_au --list-channels --loc Melbourne --srv free

  mythfilldatabase

  mythbackend
  mythbackend --printexpire  # List auto-expire list
  mythbackend --printsched   # List upcoming schedule
  mythfrontend
# /usr/share/doc/mythtv-0.18.1/keys.txt  # mythfrontend shortcuy keys

# Update the MythTV EPG daily (as ~mythtv)
  crontab -e
    ### Run mythfilldatabase every night at some random time after 3:01am
    01 3 * * * sleep $(expr $RANDOM \% 14400) && mythfilldatabase > /var/log/mythtv/mythfilldatabase.log 2>&1

# Ensure that MythTV Backend starts at boot time
  /sbin/chkconfig mythbackend on
# Custom configuration of mythfrontend
  cd ~mythtv
  cd /usr/share/mythtv/mainmenu.xml .
  vi mainmenu.xml  # Can do the same for most other files !

# Optionally useful things
# Disable dynamic power management (screen blanking)
  /usr/X11R6/bin/xset -dpms
# Disable screen saver
  /usr/X11R6/bin/xset s off

# Provide web access to MythTV (mythweb)
  cd /home/httpd/html/robin.geekscape.org
  ln -s /var/www/html/mythweb mythweb

  firefox http://robin.geekscape.org/mythweb

# Make Maxtor /video partition with "xfs" filesystem [TODO] FINISH

# Set-up MythTV remote front-end [TODO] FINISH
# - See http://wilsonet.com/mythtv/tips.php, section "Remote front-ends"

Further thoughts

To be completed

Copyright Notice

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Comments (0)