Friday, July 26, 2019

MythTV v30 Example Installation Steps with Ubuntu 18.04

I used the steps shown below to install MythTV v30 on Ubuntu 18.04.  MythTV is open source media center software for a home theater or television computer and is often used to watch and record TV content.  Ubuntu is one of the most popular Linux operating system distributions.  The steps below are based on the installation instructions found on the MythTV wiki and this blog post.

The MythTV frontend and backend was installed so the system can be used to watch and record TV content, and the system can be used by other MythTV frontends in my home.  An Asus H110T was used with Intel graphics.  A single hard drive was used for the operating system and all other files.  Also, an HDHomeRun Prime was used with Comcast Xfinity.  The guide data source is from SiliconDust and TVMaze, and this differs from the more commonly used Schedules Direct source.
  1. Install Ubuntu using the minimal install option.  The installation iso file and instructions for installing Ubuntu Desktop LTS can be found at
  2. Boot into Ubuntu and start Software Updater.
  3. Install all available updates.
  4. Reboot, and repeat steps two and three until Software Updater indicates there are no more updates.
  5. Set a static IP address:
    • Left click on the network icon on the top-right of the screen, left click on the right arrow next to the network connection, and left click Wired Settings.
    • Left click the gear icon next to the current working network connection.
    • Left click the IPv4 tab.
    • Left click Manual, and enter appropriate values for the address, netmask, and gateway.
    • Left click the toggle to turn automatic DNS off, and enter appropriate values for the DNS addresses.
    • The automatic routes can be left on.
  6. Reboot, start Firefox, and verify the connection is working.
  7. Left click the lower left Show Applications icon, and left click on Terminal.
  8. Install MythTV v30, plugins, and do some miscellaneous tasks by entering the following in the terminal:
    • sudo add-apt-repository ppa:mythbuntu/30
    • sudo apt install mythtv
    • sudo apt install mythplugins
    • sudo adduser $USER mythtv
    • mkdir -p $HOME/.mythtv
    • ln -s -f /etc/mythtv/config.xml ~/.mythtv/config.xml
  9. Reboot the PC.
  10. Setup the backend (part one):
    • In the terminal, enter "sudo systemctl stop mythtv-backend".
    • In the terminal, enter "mythtv-setup".
    • In General, set the security pin to 0000.
    • In General, set the IPv4 primary IP address to the address used in setting the static IP address above.
    • In Capture Cards, press enter with new capture card highlighted, press the down key to highlight new capture card, and press enter.
    • Select HDHomeRun networked tuner, press the right arrow key, press enter with use HDHomeRun... selected to enable it, and in Recording Options, deselect EIT scanning.
    • Repeat the above step three times for the three available tuners.
    • In Video Sources, create a new source, name it NG, set the listing grabber to no grabber, the CF table to default, and the network ID to -1.
    • In Input Connections, create three connections, name them Prime1, Prime2 and Prime3, set the name to MPEG2TS, and set the source to NG.
    • In Storage Directories, set the default to /var/lib/mythtv/recordings/, and set live TV to /var/lib/mythtv/livetv/.
    • Save, and press Esc to exit myth-setup.  Do not start the backend, and do not update the database when prompted upon exiting.
  11. Reboot the PC.
  12. Scan for channels and add channels to MythTV:
    • Start Firefox, and access the HDHomeRun Prime's web page interface by going to
    • Left click HDHomeRun Prime.
    • Left click Channel Lineup.
    • Left click Detect Channels, and give it about 20 minutes to detect all channels.  The channel numbers should appear as the scan progresses.  Channels marked "DRM" will not work with MythTV.  With Comcast, only premium channels such as HBO are generally marked "DRM".
    • Add channels to MythTV using the script.  The usage instructions can be found at here.
  13. Setup the backend (part two):
    • In the terminal, enter "sudo systemctl stop mythtv-backend".
    • In the terminal, enter "mythtv-setup".
    • In Channels, delete the channels that are not needed.
    • Exit myth-setup.  Do not start the backend, and do not update the database when prompted upon exiting.
  14. Reboot the PC.
  15. Set the sound output in Ubuntu:
    • Left click the lower left Show Applications icon, and left click on Settings.
    • In Sound, set the output to HDMI/displayPort-Built-in Audio.
    • Close the settings window.
  16. Change settings in systmed so the backend will not start until the network is up:
    • In the terminal, enter "sudo systemctl edit mythtv-backend.service".
    • Once the nano edit mode starts, add only the following two lines:
      • [Unit]
      • After=NetworkManager-wait-online.service
    • Save and exit from nano edit mode.
    • Edit /etc/mysql/mysql.conf.d/mythtv.cnf, and delete "#" before "bind-address=::" if it is there
  17. Setup the frontend:
    • Left click the lower left Show Applications icon, and left click on MythTV Frontend.
    • In Setup, select Setup Wizard.
    • In the wizard, choose an audio device, and select Test Speakers.  Change the audio device and test again until the test sound can be heard.  
    • Also in the wizard, choose VAAPI Normal for the video playback profile.  After this step, it should be possible to watch live TV.
    • In Video, select Playback.
    • Use the arrow keys to highlight Current Video Playback Profile, and press the right arrow key.
    • For the vaapi entry, deselect Deblocking filter, and set the primary and fallback deinterlacer to none.
  18. Install hdhrepg2myth using the directions shown here.
  19. Install mythrecmaze using the directions shown here.
  20. Automatically start MythTV when the computer starts:
    • Open Terminal and enter "gnome-session-properties".
    • Left click on Add and enter bash -c "sleep 20 && ./ && mythfrontend --service" with the quotes included if mythrecmaze was installed.  Alternatively, enter bash -c "sleep 20 && mythfrontend --service" to just start the MythTV frontend.  No entry is needed for the backend.

Saturday, June 29, 2019

Hdhrchan2myth - Import Channels from HDHomeRun to MythTV

This small script can be used to add channels to MythTV from an HDHomeRun device.  It has been tested with only MythTV v30 on Ubuntu with an HDHomeRun Prime.  Also, it works with one HDHomeRun device and has not been tested with multiple HDHomeRun devices on the same network.

Before using this script, the channels must already be shown in the channel lineup by accessing the HDHomeRun's internal web page interface.  Scanning for channels and viewing the channel lineup can be done by opening a web browser and visiting

Usage instructions:
  1. Download the latest release from by clicking on releases.
  2. Extract, and move the file to the /tmp folder (not a tmp folder in the home folder).
  3. Right click on the file, left click on properties, left click on the permissions tab, and select "allow executing file as a program."
  4. Open a terminal and enter the following:
    • sudo su mythtv
    • /tmp/
    • exit
  5. All downloaded files can be deleted.

Wednesday, June 5, 2019

TiVo Roamio Motherboard Replacement with Asus Mini ITX and Core i3 CPU

The two videos below describe how to a replace a TiVo Roamio motherboard with an Asus Thin Mini-ITX H110T motherboard and Core i3-7100T processor.  The Tivo case is modified to be compatible with the Asus board, and the TiVo hard drive is used with new cables that come with the Asus board.  A new iCool low-profile fan 1U-LGA1150-CP is installed and new wires are used to connect the existing lights on the TiVo to be used as power and hard drive activity indicators.  Also, eight GB of Crucial DDR4 SODIMM RAM memory CT2K4G4SFS824A is installed.  I will plan on adding a future post that will describe setting up the TiVo remote with Ubuntu Linux.

The resulting home theater/TV PC (HTPC) is versatile and can be used with a large variety of applications such as MythTV and Kodi.  Install Ubuntu and the Google Chrome browser to use a streaming service such as CBS All Access to catch up on Star Trek Discovery or NCIS.  An over-the-air tuner such as a SiliconDust HDHomeRun OTA tuner can be used to watch and record free content using an antenna.  An HDHormeRun Prime or Hauppauge WinTV-DCR CableCARD tuner can be used to watch and record content from some cable TV providers. 

Part One - Tivo Roamio Motherboard Removal

Part Two - Asus Thin Mini-ITX Motherboard Installation and TiVo Case Modifications

If the above TiVo modifications sound a bit too complicated or cumbersome, the Mini-ITX cases available on Amazon such as the cases shown below are quite easy to use to build a small HTPC.