Home MythTV Download Scripts Projects Screenshots Links Contact

MythTV System Installing MythTV MythTV Setup MythTV Frontends Install DVB-S Inetbox 300s Extra functions Myth with NAS

Setting up MythTV

Now we should be ready to setup op our Backend for running the rigth setup and settings to fit our needs for this. We should have installed all the package needed for the backend server - and are ready to set this up with the different parameters,settings etc. To begin with - we need the rigth database with the rigth tables in. There's a script along with MythTV - so we need to use this to import the DB into MySQL:

$ mysqladmin -u root password "NEWPASSWORD"
$ mysql -u root -p < /usr/share/mythtv/mc.sql
$ /etc/rc.d/mysqld restart


This will put the Database into MySQL. Afterwards we're restarting the db -. to be sure that it's registred. The important thing here is to remember that we want a user (myth) to be the controlmaster to our system here. Now where ready to start it all:

$ X
(Now you should have a running windowmaker)
$ mythtv-setup



You'll properly be asked to set thew language - and off caurse - I choosed Danish - but afterwards you'll see 5 menu's here - Named like this:

  1. Generel - The generel main settings
  2. Capture Cards - You should be able to see your card here
  3. Video Sources - Creating a name for the video sources and freeview
  4. Input Connections - Connect the capture cards to the Video Source
  5. Channel Editor - Scan for channels here

On entering each screen, the cursor is positioned at the bottom right on the "Next" button. The cursor may not be visible. Use the up, down, left, and right cursor keys to make selections. Fields marked with up and down arrows can be modified by pressing the PageUp and PageDown keys or the left and right cursor keys; in some cases, the action is different. For example, when setting times, cursor left and cursor right change the time by minutes, while Page Up and Page Down change by half hours. Some fields, notably text fields, accept direct keyboard input. For many fields, context-sensitive help appears in the bottom part of the screen when you position on the field.

The Generel:

This menu is the settings for the backend, where you'll need to set the IP-address for the masterBackend and also some normal settings. The first page is the most important here:

1.page

  • IP-address for mythtv: 10.0.0.10 (If front/backend is running on the same - use 127.0.0.1 - otherwise use IP-address)
  • Port the server runs on: 6543 (DO NOT CHANGE)
  • Port the server shows status on: 6544 (DO NOT CHANGE)
  • Master Server IP-address: 10.0.0.10 ( Our masterbackend server)
  • Port the master runs on: 6543

2.page

  • Directory to hold recordings: /storage/records ( The mounted directory we'd maken earlier)
  • Directory to hold the Live-TV buffers : /storage/records (For used - when playing fast forward/reward

Those are the most important settings under Generel - There's off caurse many others - but those are only if you're needing those - but well - i didn't so haven't tried it yet ( but well - could come at some point)

Capture Cards:

This is where you define which capture card you got inside your MythTV installation. In my case - it's a standard card - so I just switched to PVR500 - and added 2 cards total /dev/video0 & /dev/video1.

Video Sources:

Here´s where you'll add the different videosource - which also means which channels there are available on which capture cards. As default when choosing danish language in the start - and here choose european-west - we'll use XMLTV to grab the different listening to the channels. Since I have also SateliteDish and the defaults TV2 XMLlist isn't updated etc - I needed to setup another listening - whichg I made another guide on.
(The setup will be handle in a consoile windows - REMEBER THAT IF YOU CAN'T GET FURTHER FROM HERE)

Input Connections:

This is where you put the VideoSources and Capturecards together. In other word. Which input connection in your capturecards holds the information for the channels here. Since I have a PVR500 which including 2tuners - I needing to setup both inputs here and at the same time I set my Inetboxes to the same VideoSource.

Channel Editor:

You can edit your channels here - but I find it much easiere to edit them after setting MythWeb up and running. - So don't do anything here!!!

Now you can exit the mythtv-setup - and you'll be asked to run mythfilldatabase manually - and there you can see if you're getting the input from TV2.dk. If you do that - you're ready to proceed further on.

 

MythTranscode MTD:

MTD is the daemon that makes it possible to transcode the TV-signal, rip a DVD/CD etc etc. This daemon can only run 1place in such a system, so since we'd chosen to run the system as our user myth - we need to be sure - that myth have the rigth permission and are the owner of this process. So instead of starting the process in /etc/rc.conf's DAEMON - I found it much easiere to avoid permission problems - to start the daemon with /etc/rc.local and put in:

$ su myth -c 'mtd -d'

This will start the MTD as a DAEMON with myth as user, which basicly means that other clients also can connect to the MTD and used it for encoding,transcoding or ripping recordings etc.

Mythfilldatabase:

I have several times tried that mythfilldatabase that way ( through mythTV) fails in the process, so I choosed to make this run as an cronjob instead. This means I'll put in under /etc/cron.daily and make a file called mythfilldatabase - and in that file I'll put the lines:

/usr/bin/mythfilldatabase

Afterwards I did a chmod +x /etc/cron.daily/mythfilldatabase and made it exedcuteable! now mythfilldatabase will run each nigth filling up info about TVlistening (Which is also easiere - when grabbing from more than I place)

MythWEB:

For being able to control your mythTV from the outside of your home, you'øre need to setup the mythweb plugin, so you'll get the http access til the MythTV (Remember to open the firewall only on port 80)

Starting out by making some small changes in /etc/php/php.ini - where several changes are needed - Here's the basic one - you need to make your lines look like mine:

# open_basedir = /home/:/tmp/:/usr/share/pear/ (!!! put a ; in front to outcomment this line)

in the bottom of the file remove the # from these lines:
extension=gd.so
extension=session.so
extension=mysql.so
extension=mysqli.so
extension=openssl.so
extension=calendar.so
extension=curl.so

This is the basic settings for the PHP5 - for integrating it into the Apache webserver. When installing Mythweb from package-repos you'll end up with an extra directory in /home/httpd/html/mythweb which is the basic $HOMEDIR for mythweb! So for being able to see what's recorded etc in mythweb - (and defendly download/stream it - you'll need to make som Symlinks to your storagebase - in my case /storage - so :

$ cd /home/httpd/html/mythweb

$ ln -s /storage/movies /home/httpd/html/mythweb/movies
$ ln -s /storage/music /home/httpd/html/mythweb/music
$ ln -s /storage/pictures /home/httpd/html/mythweb/pictures
$ ln -s /storage/records /home/httpd/html/mythweb/records

Which will make these directory's available on the webpage. Now you shall edit the file /etc/httpd/conf/httpd.conf ( Apache's configuration) - Here' s the changes I made to it - only!!!

LoadModule php5_module modules/libphp5.so (remove the # )
ServerAdmin <<PUT IN YOUR EMAIL>>
ServerName <<YOUR.DOMAIN.NAME>>:80
DocumentRoot "/home/httpd/html/mythweb" (sets the root dir of the webserver)

###### MAKE SURE THIS LOOK LIKE THIS #######
<Directory "/home/httpd/html/mythweb">
Options Indexes FollowSymLinks
AllowOverride Options FileInfo
php_admin_value allow_url_fopen On
AuthType Basic
AuthName "MythTV"
AuthUserFile /home/httpd/html/mythweb/.htpasswd
Require valid-user
Allow from all
</Directory>

this is the changes we're needing to make in the Apache webserver, so now lets try and see if the webserver is starting:

$ /etc/rc.d/httpd start

Securing the webaccess:

Check that the /home/httpd/html/mythweb/.htaccess - needs to define that db are localhost and password/username are correct. Also check that the uservalidation is commented out - caurse we'd made that directly in Apache's conf-file. Now we shall add the file where .htaccess should look into for the user to the webinterface:

htpasswd -c /home/httpd/html/mythweb/.htpasswd <<USERNAME>>

And you'll be prompted twice for a password. Now you can access the webinterface - try pointing a browser towards your CORE server http://10.0.0.10 if you have the same setup in network as I have (otherwise change the IP to YOUR CORESERBVER'S IP).

I have in this case heard from others that they had a really hard time - trying to get this to work, but I haven't got those problems everybody else had! Now is your Backend finished with the setup and are now ready for use in a normal day.

 

   
All written in these pages is made by Per Jørgensen.
Respect the original rigths on pages.
Creative Commons License
Denne værk er licensieret under en Creative Commons Navngivelse-Del på samme vilkår 2.5 Danmark Licens.