Select Page

This guide is intended to outline the general setup procedure for a DVR system that has multiple tuners using MythBuntu 12.04 and Hauppauge 2250 tuners.

mythbuntu-logo

1. Install the base MythBuntu 12.04 operating system.

2. Set root password

[sourcecode language=”plain”]
sudo passwd XXXXXXXX
[/sourcecode]

3. Update Ubuntu / Mythbuntu Dist

[sourcecode language=”plain”]
apt-get update
apt-get upgrade
apt-get dist-upgrade
[/sourcecode]

4. Once in the OS, the first step will be getting the firmware loaded for the tuner cards.

[sourcecode language=”plain”]
mkdir /home/mythtv/dvr-firmware
cd /home/mythtv/dvr-firmware
wget http://www.larrystendebach.com/DVR-Files/v4l-saa7164-1.0.3.fw
wget http://www.larrystendebach.com/DVR-Files/v4l-saa7164-1.0.3-3.fw
wget http://www.larrystendebach.com/DVR-Files/dvb-fe-tda10048-1.0.fw
wget http://www.larrystendebach.com/DVR-Files/NXP7164-2010-03-10.1.fw
wget http://www.larrystendebach.com/DVR-Files/v4l-saa7164-1.0.2.fw
sudo cp *fw /lib/firmware
reboot
[/sourcecode]

    • Check if firmware installed correctly: dmesg | grep saa7164
    • On the 3rd or 4th line you should see what you are looking for it will look like this: [card=8,autodetected]
    • Now we need to enter this card number into modprobe.d/options.conf file  – sudo nano /etc/modprobe.d/options.conf
    • place this line of code in the file: options saa7164 card=x
      • *x = your card’s number*
    • Reboot and check mythtv backend to see if it is listed correctly.

5. Run Mythbackend Setup

    • For the Hauppauge 2250, set them up as DVB tuners. Each can be multiplexed up to 4 times per tuner on the card.
    • Make sure to scan for channels with each tuner. MythTV seems to use this information to determine which tuners have access to which channels. Skipping some of your tuners will lead to recording conflicts / not being able to use all your tuners.
    • Set up a program data via Schedules Direct: schedulesdirect.org
    • If scanning does not show all the channels expected, try to increase the tuning and scanning delay. Sometimes even changing this to 10+ seconds will help during the scanning phase.
    • If an internal TV system is in use and the channel numbers have been remapped, use the channel editor after scan to enter the correct XMLTV ID for that channel and it will resolve any issues. the XMLTV ID can easily be found within the Schedules Direct channel lineup.

6. Set up file naming user job: /usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl –link /path/to/mythtv/videos –chanid “%CHANID%” –starttime “%STARTTIME%” –format ‘%cN-%T-%S-%m%d%y-%G-%i-%s’

7. Download MythBrake Script (remember to edit the file to fix directories and language).

[sourcecode language=”plain”]
cd /home/mythtv/
wget http://www.larrystendebach.com/DVR-Files/mythbrake.sh
[/sourcecode]

8.Set up transcoding job via Mythbrake: /path/to/mythbrake.sh “%DIR%” “%FILE%” “%CHANID%” “%STARTTIME%” “%TITLE%” “%SUBTITLE%” “%CATEGORY%”

[sourcecode language=”plain”]
sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk handbrake-cli
[/sourcecode]

    • Make sure to change the mythbrake.sh script to have English as the primary language and correct permissions on the source, destination and log folders.

9. Set up recording rules

    • To record each show on a channel 24/7, create a custom recording rule in the MythTV frontend or MythWeb: channel.callsign = ‘CALLSIGN’ . Make sure to press the test button to make sure the callsign is correct. After which, click the record button and select to record this show any time on this channel. Select your user jobs in the Post Processing tab, and click the record button to save.

 BONUS. Helpful Commands

  • See back-end log quickly: mythbackend –logpath
  • Force full program data refresh: mythfilldatabase –dd-grab-all
  • Organize each days recordings into a folder with that days date: wget http://www.larrystendebach.com/DVR-Files/dailymove.sh
    • Then create a cron: */15 * * * * sh /path/to/dailymove.sh
  • Fix mythweb downloads:
    • sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/cgi.load
    • nano /etc/apache2/mods-available/mime.conf
    • AddHandler cgi-script .cgi .pl
    • Restart Apache2
  • In order to fix handbrake cli in 14.04
    • sudo apt-add-repository ppa:stebbins/handbrake-snapshots
    • sudo apt-get update
    • sudo apt-get upgrade
    • apt-get dist-upgrade