HOWTO Setup MythTV
From Gentoo Linux Wiki
Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article
|
This HOWTO is designed to provide you with a fully working MythTV setup. It will only bring you up to a fully usable MythTV setup. It will not provide you with information how to configure it or any additional plug-ins. That is covered in HOWTO Use MythTV.
This guide will help you to:
- configure your hardware to work with MythTV;
- configure MythTV for initial use; and
- configure your system to boot directly to MythTV.
If you have any issues, feel free to stop by #mythtv-users on IRC.freenode.net and ask. We are always glad to help!
Also, the official MythTV wiki can help as well.
[edit] Installation
These installations assume you are root, if you are not, su to root, or research the sudo package.
As always with Gentoo, make sure portage is synced (but only if it's been more than 24 hours from the last time you synced. Please be nice to the rsync servers!):
emerge --sync
[edit] Qt3
MythTV 0.20 requires you to use Qt 3. It is not compatible with Qt 4 so if you have this make sure to add qt3 to your masked packages:
echo ">x11-libs/qt-3.3.9" >> /etc/portage/package.mask
Ensure Qt-3 is/was compiled with MySQL support:
emerge -pv =x11-libs/qt-3*
If you see -mysql on the line, we need to add MySQL (and other handy flags) support to qt:
echo "x11-libs/qt mysql opengl" >> /etc/portage/package.use emerge -1 =x11-libs/qt-3*
"-1" tells emerge to re-emerge qt without touching the world file, so it won't change anything, just rebuild qt in place.
When you install Qt for the first time, don't forget to update your environment, otherwise you could run into compiler errors with MythTV:
env-update && source /etc/profile
[edit] mythtv flags
We should now take a look at the MythTV flags:
emerge -pv --nodeps mythtv
You will likely want to add some support, I recommend
echo "media-tv/mythtv alsa opengl vorbis dvb dvd ieee1394 lirc mmx xvmc xv" >> /etc/portage/package.use
This will build myth with all of the common features.
Make sure you add the ivtv use flag if you plan on using the TV output on a PVR-350 card.
if you don't already have VIDEO_CARDS set in your /etc/make.conf, you might want to set that, as newer X.Org versions have moved to that style.
[edit] nVidia notes
If you have an nVidia graphics adaptor, you may have to perform the following steps:
Read NVIDIA drivers.
Have a look at the NVidia web site for the drivers to install.
http://www.nvidia.com/object/unix.html
I found I had to install and run NVIDIA-Linux-x86-169.12-pkg1.run to install the nVidia drivers before xorg would run.
If you installed the nVidia drivers, find out which opengl implementation you are using:
myth ~ # eselect opengl list Available OpenGL implementations: [1] nvidia [2] xorg-x11 *
If you find it is set to xorg-x11 you may need to set it to nVidia otherwise the mythtv emerge may fail with an error about not finding -lGL
myth ~ # eselect opengl set nvidia
[edit] mythtv
We now emerge MythTV:
emerge -av mythtv
Compiling MythTV will take a fairly long time, even on a fast machine. Probably about the same time it takes for Qt to compile.
Be warned: once completed, Portage will add a user "mythtv" you will need later. Don't forget to change its password.
You may now need to install XMLTV to retrieve TV listings over the Internet:
emerge -av xmltv
(MythTV users from outside the US or Canada, learn how to configure XMLTV to get a localized guide).
MythTV should now be installed and ready to configure.
[edit] Setup
[edit] Setting up the recording directory
In order to use MythTV, you'll need someplace to store your recordings and LiveTV data. It is recommended that you create a directory on a disk other than that which contains your root filesystem. Otherwise, you run the risk of filling up your root filesystem with TV recordings and causing major stability problems.
In this example, we have a disk that's already been partitioned and formatted. We wish to access it as /data and we want to put our recordings somewhere therein:
# mkdir /data # chmod 755 /data # mount /dev/hdb1 /data # mkdir /data/MythTV # chown mythtv:users /data/MythTV # chmod 775 /data/MythTV
The purpose of these commands is to make sure that your mythtv user has read/write/"execute" access to the recordings directory, and that the parent directory holding your recordings directory is itself readable and "executable" by that user as well.
If the permissions and ownership aren't exactly right, you'll run into errors later.
[edit] Setting up the initial database
If the system that you'll be using to maintain the MySQL database is running a version of MySQL older than 5.0.19, you'll need to run a few eselect commands (See http://bugs.gentoo.org/show_bug.cgi?id=126148):
# eselect mysql list # eselect mysql set <number in list of mysql version you are using> # eselect mysql show
If the database is on a non-MythTV machine you'll also need to copy the mc.sql file to it. (You may need to emerge eselect-mysql first.)
If you've never run MySQL before, you'll need to do a little preliminary database maintenance:
# /usr/bin/mysql_install_db
Now, start the MySQL server and add mysql to the default runlevel.
# /etc/init.d/mysql start # rc-update add mysql default
The next step is to set up the root passwords. If you're using MySQL version 4.0.24-r2 or newer, you'll need to hop over to http://www.gentoo.org/doc/en/mysql-howto.xml and follow the instructions there. Once you've set the password, come back to this page and skip to the 'mysql -u root' step below.
For versions older than 4.0.24-r2, do this:
# /usr/bin/mysqladmin -u root -h localhost password 'new-password'
Now set up the database used by MythTV.
# mysql -u root -p < /usr/share/mythtv/database/mc.sql
This command tells the MySQL server to login as root (-u root) and ask for a password (-p: only use if you have set a password as recommended). Then, the commands listed in the file are executed. You can `cat` the file to see what is in it.
If something happens and you've made an error in your password, head over to the forums and look at this post: forum
MySQL keeps logs of all database transactions in /var/lib/mysql/. Over the course of a few years, these can really add up, so it's useful to have these deleted after a small interval. Open /etc/mysql/my.cnf in an editor, find the section heading "[mysqld]", and add the following line somewhere in that section:
expire_logs_days = 7
This will cause MySQL to delete logs older than seven days. Be sure you restart MySQL after this change.
# /etc/init.d/mysql restart * Stopping mysql ... * Stopping mysqld (0) [ ok ] * Starting mysql ... * Starting mysql (/etc/mysql/my.cnf) [ ok ]
[edit] mythsetup
Next, we need to start the setup utility. A useful tip when doing so is to use the --geometry option to prevent the main part of mythtv-setup from taking over the whole screen (the initial all-grey setup screen will still be full-screen).
$ mythtv-setup --geometry 640x480
Answer yes to both questions on the initial run.
If desired, sign up for Schedules Direct for the your region (USA users may wish to use North America (DataDirect)), in the Video Sources option. As of 13 September 2007, there is a small charge for this service, but the cost is gradually dropping as more subscribers sign up.
While in setup make sure to select the proper cards and so forth. Since there is such a wide variety of TV/capture hardware to choose from, exactly what you'll need to configure here is beyond the scope of this document. However, most of the options should be self-explanatory.
Briefly, you'll need to associate your tuner card with a tuner in step 2. In step 3 you'll need to configure the channel listing. In step 4, you'll associate the tuner you configured in step 2, with the channel data you configured in step 3.
If during step 3 you're finding that you're having problems receiving your channel lineup, you may want to exit and do this:
# echo "net-misc/wget ~x86" >> /etc/portage/package.keywords # echo "net-misc/wget ssl" >> /etc/portage/package.use # emerge -v wget
...replacing "~x86" with the proper keyword for your architecture. This is to provide SSL support for the authorization connection to Schedules Direct. Re-run the setup program and try again.
Once you're done with that, exit from the setup program by pressing Esc a few times. Now, add any users that will be using MythTV to the video group or you will not be able to use your capture cards.
# gpasswd -a <username> video
Once you've done this, you'll probably need to log out of X, restart your display manager (if any), and log back in. Since some desktop environments only inherit group information at startup (KDE is a good example of this), this ensures that the changes you've just made with gpasswd are inherited into your X session and everything running in/on it.
Some nvidia users may run into trouble accessing the video card, and will need to run this also:
# chmod 660 /dev/nvidia*
[edit] mythbackend
Now it's time to start the backend server. If you don't, you won't be able to watch TV and you will get errors like "Unable to connect to backend server".
# /etc/init.d/mythbackend start
Sit and wait for 10 seconds or so, then check the process list:
# ps axwwww | grep myth 23822 ? Ssl 1:33 /usr/bin/mythbackend --verbose important,general --logfile /var/log/mythtv/mythbackend.log 24808 pts/1 S+ 0:00 grep --colour=auto myth
If the backend server successfully started, you'll see something similar to the above. If the backend server exited, you'll only see that "grep" line (if anything). The first thing to check in that case are the permissions and ownership of your recordings directory and the entire tree in which it sits. Remember, your mythtv user must have read and "execute" permission to each member of the entire tree leading up to you recordings directory. check the logs :
# tail /var/log/mythtv/mythbackend.log
you might see
No setting found for this machine's BackendServerIP
changing the ip address in the first page of mythtv-setup option General from 127.0.0.1 to your actual IP address can help as well. see here Once you've gotten the permissions right, try the backend again:
# /etc/init.d/mythbackend restart # ps axwwww | grep myth
Once you've got your recording directory sorted out and the backend remains running, the next step is to set up mythbackend to start on boot:
# rc-update add mythbackend default
If you need to configure verbose levels for troubleshooting, you can do so by (modifying and) adding this line to /etc/conf.d/mythbackend:
MYTH_VERBOSE="<comma separated levels>"
[edit] mythfilldatabase
First fill the database with all the needed channel info.
$ mythfilldatabase
If it complains that it can't connect (due to timeout errors), double-check that the mythtv user has read/write/"execute" access to the directory you plan to store your recordings in, and try running this command instead:
$ mythfilldatabase --refresh-all
Then re-run mythfilldatabase again, without any parameters.
If you run into errors of this nature (note that the webserver shown here is no longer in existance):
Resolving datadirect.webservices.zap2it.com... 206.18.98.160 Connecting to datadirect.webservices.zap2it.com[206.18.98.160]:80... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed.
Go back and make sure you have have a Schedules Direct account and that you entered your information correctly during mythsetup.
If you have MythTV set up to run mythfilldatabase automatically and use XMLTV, you may need to link your XMLTV configuration file to somewhere where the automated script can find it.
# ln -s /home/mythtv/.mythtv/*.xmltv /etc/mythtv/.mythtv/
[edit] mythfrontend
The frontend can use real-time scheduling for the video output thread. To enable this you need a kernel >= 2.6.12 and >= sys-libs/pam-0.79. Add the following to /etc/security/limits.conf :
* - rtprio 0 * - nice 0 @audio - rtprio 50 @audio - nice 0
As a normal user, run mythfrontend and see if it works. If it does, you've successfully installed MythTV.
$ mythfrontend
[edit] Final configuration
Within the MythTV frontend, there are numerous confguration options. Select "Utilities / Setup", then select "Setup", and browse around through this menu. Most of these configuration options are beyond the scope of this document, however, most of them need not be changed to get basic MythTV capabilities working.
[edit] Hardware Drivers
[edit] Joystick control
If you are planning to use MythGame, it may be helpful to be able to control MythTV with a joystick as well. MythTV 0.17 and higher support joystick control of the UI. To enable this feature, create a file called joystickmenurc in your .mythtv directory. The example that comes with the MythTV distribution is a good starting point:
| File: ~/.mythtv/joystickmenurc |
# # Joystick menu config file # Place in ~/.mythtv/ # # Format: # devicename <devname> Specify name of joystick device to use # (e.g. /dev/js0) # button num keystring Send 'keystring' when button 'num' is released # chord cnum bnum keystring If button cnum is down, and button 'bnum' # is released, send keystring # axis num from to keystring If axis num goes into the range of from-to # send keystring devicename /dev/js0 button 0 Enter button 1 Escape chord 2 5 Escape axis 0 -32767 -15000 Left axis 0 15000 32767 Right axis 1 -32767 -15000 Up axis 1 15000 32767 Down axis 5 -32767 -15000 Left axis 5 15000 32767 Right axis 6 -32767 -15000 Up axis 6 15000 32767 Down |
[edit] Odds and Ends
Now that myth is running and working it is time to make the computer boot directly to mythtv and have a few more little cool features.
[edit] ANALOG and no XMLTV
I found that we can get around the xmltv by using xawtv to generate a channel list.
do
# emerge -av xawtv
if emerge fails, checkout http://bugs.gentoo.org/show_bug.cgi?id=112429
do this:
# mkdir -p /usr/local/portage/media-tv/xawtv/files
save the ebuild to /usr/local/portage/media-tv/xawtv/ save the two patchs to /usr/local/portage/media-tv/xawtv/files
# nano -w /etc/make.conf
add this line: PORTDIR_OVERLAY="/usr/local/portage"
setup the new xawtv
# ebuild /usr/local/portage/media-tv/xawtv/xawtv-3.95.ebuild digest
now set it unmasked
# echo "media-tv/xawtv ~x86" >> /etc/portage/package.keywords
and you are clear to go:
# emerge -av xawtv
[edit] KDM
Lets setup kdm and make it start evilWM and mythfrontend.
- Set kdm as your xdm by editing /etc/conf.d/xdm (in old versions it was in /etc/rc.conf)
| File: /etc/conf.d/xdm |
... DISPLAYMANAGER="kdm" ... |
- If you run evilWM, set the session type for mythuser to custom. You can do this within KDM or by creating ~/.dmrc.
| File: ~/.dmrc |
[Desktop] Session=custom |
This will cause KDM to execute your .xsession file at logon, for this to work .xsession must be executable!.
- If you run KDE, set mythfrontend to auto-load on login
ln -s /usr/bin/mythfrontend /home/username/.kde/Autostart/mythfrontend
(if it complains about 'No such file or directory' do a mkdir /home/username/.kde/Autostart)
Alternatively, if you don't use KDE, this howto explains how one might autostart applications.
Alternatively, create a session type for mythfrontend. Create the file /usr/share/xsessions/mythfrontend.desktop:
File: /usr/share/xsessions/mythfrontend.desktop
[Desktop Entry] Encoding=UTF-8 Name=MythTV Comment=This session starts the MythTV frontend Exec=mythfrontend TryExec=mythfrontend # no icon yet, only the top three are currently used Icon= Type=Application |
|
{{{2}}}
|
Now select this session type for the user at the KDM login screen (or set in ~/.dmrc) and mythfrontend will be started with much more ease than the other methods listed.
- Set it to autoload your user
Run kcontrol and select the login manager section. Set the convenience section to boot directly to your user.
Or modify the kdmrc file directly by configuring the AutoLogin settings under the [X-:0-Core] section. For example (substitute 3.4 for your relevant version):
| File: /usr/kde/3.4/share/config/kdm/kdmrc |
[X-:0-Core] AutoLoginEnable=true AutoLoginUser=mythuser |
- Add it to boot
rc-update add xdm default
[edit] NTP
NTP will allow your computer to set its time based off internet time. This is very important, as it will affect how accurately the machine records scheduled programs.
see HOWTO NTP
[edit] Samba
Samba will allow you access files on a Windows network. This can be useful to access music or video files, or just for testing.
[edit] File Transfers
There are two options for making files accessible from other machines. The first option is to use SCP (WinSCP for Windows), a secure file transfer protocol (using SSH). This is perfectly acceptable (and secure) for most uses. However, if unlucky enough to have a slow MythTV machine and no hardware acceleration (e.g. the VIA Padlock), the added computations needed to encrypt outgoing file transfers could overtax the system. In this case, it would be advisable to setup an FTP server, which is an unencrypted file transfer protocol that is fast and requires fewer resources.
see ProFTPd
[edit] SSH
You may like to set up an SSH server on your machine. This is particularly useful if you have a combined front and backend machine, as you can administer the backend machine without trying to read the blurry writing on the TV screen, or having a monitor in your living room.
[edit] mythweb
The following USE flags allow PHP5 to compile and run Mythweb:
| File: /etc/portage/package.use |
dev-lang/php dbase gd session pcre mysql apache2 posix |
Note: The USE flag dbase is not supported in older ebuilds. Replace dbase with dba instead.
# echo "www-apps/mythweb ~x86" >> /etc/portage/package.keywords # emerge mythweb
This will install apache2 if neccessary and put mythweb in your htdocs directory. Start apache with the command '/etc/init.d/apache2 start' and browse to "http://name_or_ip_address/mythweb/" to access the web interface.
# rc-update -a apache2 default
This will start apache2 when you boot.
see HOWTO Apache2 with PHP MySQL and MythWeb's Documentation for more information
In order for the status pages to work, you need to enable allow_url_fopen in php.ini.
| File: /etc/php/apache2-php4/php.ini |
allow_url_fopen = On |
(note: this should be /etc/php/apache2-php5/php.ini If you have changed your use flags to emerge php 5)
You will also need to make sure you have PHP enabled in your /etc/conf.d/apache2 file. with the line:
| File: /etc/conf.d/apache2 |
APACHE2_OPTS="-D PHP4" |
(note: this should be APACHE2_OPTS="-D PHP5" If you have changed your use flags to emerge php 5)
Please note: For each option on the APACHE_OPTS line you need a -D preceeding it. For example:
| File: /etc/conf.d/apache2 |
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP4 -D DAV -D SSL -D DAV_FS" |
If you are getting a Database Setup Error when you try to open the MythWeb page, and you've confirmed that your database settings are correct, make sure you have Apache configured to recognize the .htaccess file in the mythweb directory:
| File: /etc/apache2/httpd.conf |
<Directory /var/www/localhost/htdocs/mythweb>
AllowOverride All
Options FollowSymLinks
</Directory>
|
[edit] Recommended: Require authentication to view MythWeb
Create an apache users file:
# htpasswd2 -c /etc/apache2/users USERNAME
where USERNAME is any name of your choosing. The -c switch allows for creating the file if it does not exist. If you are adding another user to an already existing file do not use the -c switch. Follow the two password prompts to set the password. Note that it is important that you keep this file in a directory that apache is not serving, this is to prevent anyone/everyone from downloading and viewing the contents of it. /etc/apache2/users was the location I used but is by no means the only one that will work. Just make sure to use the correct location of this file in the following step.
Edit your httpd.conf file to allow overrides. These edits occured around line 435 in my httpd.conf for loose reference.
| File: /etc/apache2/httpd.conf |
<Directory />
Options FollowSymLinks
AllowOverride AuthConfig
</Directory>
<Directory "/var/www/localhost/htdocs/mythweb">
AllowOverride All
Options FollowSymLinks
Options +Indexes
Order deny,allow
deny from all
AuthType Basic
AuthUserFile /etc/apache2/users
AuthName "Mythtv Web Frontend"
require valid-user
satisfy any
</Directory>
|
Note: The <Directory /> section should already be in httpd.conf by default, you may have "AllowOverride None" or "AllowOverride AuthConfig" depending on if other websites you are serving allow .htaccess overrides (from my understanding.) The <Directory "/var/www/localhost/htdocs/mythweb"> section needed to be added to my conf file. The settings above worked fine for me. A more detailed how-to on authentication can be found at the Apache website
[edit] mythmusic
If you are using mythmusic to store and listen to music and also happen to like using iTunes on different platforms adding support for creating an iTunes share can be accomplished easily. Read mt-daapd to find out more! Note to not use "perfect quality" in your import options as this will generate .flac files iTunes will not recognise.
# echo "media-plugins/mythmusic ~x86" >> /etc/portage/package.keywords # emerge -av mythmusic
[edit] mythdvd
If you are using mythdvd and want to copy files to your movies directory, you must emerge mythdvd with the transcode use flag set. Even if you're just copying, not transcoding, the option won't exist unless the use flag is present.
# echo "media-plugins/mythdvd ~x86" >> /etc/portage/package.keywords # echo "media-plugins/mythdvd transcode" >> /etc/portage/package.use # emerge mythdvd
If you are going to use MythDVD to transcode DVDs, and have set up your partitions according to this guide (Ie. 4GB for /), you must run these commands or transcoding will fail on anything but short clips.
# mkdir -p /var/lib/mythdvd # mkdir /media/tmp # ln -s /media/tmp /var/lib/mythdvd/temp
[edit] mythtv-themes
Adding more themes to choose from, than the default two.
# emerge mythtv-themes
[edit] mythgallery
# echo "media-plugins/mythgallery ~x86" >> /etc/portage/package.keywords # emerge mythgallery
[edit] mythnews
# echo "media-plugins/mythnews ~x86" >> /etc/portage/package.keywords # emerge mythnews
[edit] mythbrowser
# echo "media-plugins/mythbrowser ~x86" >> /etc/portage/package.keywords # emerge mythbrowser
[edit] mythflix
# echo "media-plugins/mythflix ~x86" >> /etc/portage/package.keywords # emerge -av mythflix
To configure MythFlix, see the MythFlix README
[edit] mythphone
# echo "media-plugins/mythphone ~x86" >> /etc/portage/package.keywords # emerge -av mythphone
[edit] mythweather
# echo "media-plugins/mythweather ~x86" >> /etc/portage/package.keywords # emerge -av mythweather
[edit] mythgame
# echo "media-plugins/mythgame ~x86" >> /etc/portage/package.keywords # emerge -av mythgame
To install and configure emulators for MythGame, see MythGame Emulation Setup
[edit] MythStream
Currently there are no ebuilds for MythStream. See INSTALL instruction in the source found here: http://home.kabelfoon.nl/~moongies/streamtuned.html 27-09-2007: There is a Gentoo-specific guide that worked for me: http://wisppa.com/publishing/documentation/gentoo-mythtv-pvr#plugins. 26-03-2008: That site has not been updated for Mythtv 0.21. The patch available on MythStream website needs to be applied before compiling (copy the patch in the MythStream source directory):
patch -p0 < mythstream.cpp.patch
[edit] Setting up a frontend on a different computer
In mythsetup, be sure to use an externally accessible address when setting the IP address for the backend.
By default, the mythtv mysql database is only set up to allow connection from the localhost. To allow all computers on the network 192.168.1.*, do the following:
#mysql -u root -p mythconverg
mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by "mythtv"; mysql> flush privileges;
where the string after "identified by" is the mythtv user's password
For different authentication methods, see the mythtv documentation
It's also necessary to stop the mysql server binding to localhost only for connections (as is currently the default) edit /etc/mysql/my.cnf to bind it to an IP address accessible from anywhere in your network. (In the example, 192.168.0.15)
| File: /etc/mysql/my.cnf |
# security: # using "localhost" in connects uses sockets by default # skip-networking bind-address = 192.168.0.15 |
Run mythtv-setup and set the IP address for the backend to an IP address accessible from anywhere in you network.
Restart mysql (on the server)
# /etc/init.d/mysql restart
Now on the frontend:
# echo "media-tv/mythtv frontendonly" >> /etc/portage/package.use # emerge mythtv
In /etc/mythtv/mysql.txt, replace localhost with the address or hostname of the backend on this line:
| File: /etc/mythtv/mysql.txt |
DBHostName=localhost ... |
Now you should have a fully functioning frontend.
If you need to set the frontend up on a windows computer, look into WinMyth; however, it is still in the alpha stage and doesn't have nearly as many features as the linux frontend.
[edit] Diskless frontends in an OpenMosix cluster with a 2.6 kernel
Setup diskless frontends in an OpenMosix cluster with a 2.6 kernel so all you can have a really fast setup.
see HOWTO Install Mythtv With Diskless Workstations in an OpenMosix Cluster (under heavy development right now, join in and help out)
[edit] Troubleshooting
[edit] Transcode fails with 247
[edit] Audio
- If you receive the error, "Unable to create AudioOutput", put the following as the Audio output device in general settings:
for alsa use "ALSA:default", for arts use "ARTS:". Note that you have to type these settings manually, as they may not be available in the drop-down list.
- If you get no sound when playing back a DVD but sound works everywhere else, make sure you have a52 decoder library installed (add a52 to your USE flags and reimerge ffmpeg).
- No sound when using ALSA *
Current versions of MythTV (I'm using 0.18.1 right now) allow you to specify a mixer device in the audio settings. While changing the output device from "/dev/dsp" to "ALSA:default" is well documented in this howto and in the official documentation, neither of them mention the necessary changes to the mixer device: If you're using ALSA, change the mixer device from "/dev/mixer" to "default". Again, you may have to type this text manually, as "default" may not be available in the drop-down list.
Note that the necessity of specifying a mixer device might be removed in future versions of MythTV. Currently the developers seem to be uncertain if there might be some people out there needing a mixer device other than "default".
[edit] Video
- If after installing NVidia drivers version 1.0.8174 or later, you have high load when viewing video, disable opengl: Add "media-tv/mythtv -opengl" to /etc/portage/package.use. Then remerge mythtv.
- If you have an older video card and get a segmentation fault when playing fullscreen video, try disabling "Use hardware XvMC MPEG Decoding" in TV Settings -> Playback.
- Enabling the XvMC option within MythTV without having all the required support can also result in hiccups or hitches in the video playback. When playing back video, if you see what appears to be a single frame that's "out of context", or that you've seen before, that may be a sign you're using XvMC without having everything properly configured. Try turning it off in MythTV and see if that fixes the problem.
- Bob deinterlacing will mess with OSD along with XvMC and DirectFB. If you have the processor power, turn off XvMC and use linear or kernel deinterlacing. If the OSD flickers with kernel or linear deinterlacing and XvMC is off, then check that you compiled with -directfb in your package.use file.
- Jerky video on Hauppauge PVR-250 / 350 cards. If your Live TV video is playing jerky (i.e. running too fast, then stopping every 1-2 seconds) and you keep getting "prebuffering pause" errors in the console, try adjusting the video format in the recording profiles. The default format used in all of my installation's profiles was set to 480x480, which might be suitable for NTSC regions. But I'm using a PAL version of the PVR-250 which obviously doesn't like this setting. After changing the format to 720x576, all problems just vanished: watching and recording tv in MythTV are now working perfectly.
- A problem I encountered with the Hauppauge PVR-350 card connected to a separate TV was a "ground loop". This results in a noticable hum in the audio, even when nothing is being played by the card. Also, there may be slow rolling lines in the video. This can be caused by a ground loop - frequently between the antenna/cable and the rest of the system. An easy test is to temporarily remove the antenna/cable from the TV and see if the problem goes away. If it turns out this is the problem, you can use a antenna isolator, such as this one, available for about $10. More details about ground loops can be found at this site.
[edit] Other
- If mythbackend fails (say path for video storage does not exist) without calling /etc/init.d mythbackend stop - it will leave link in /var/lib/init.d/started/mythbackend that makes gentoo think it is still running even if it's not.
# /etc/init.d/mythbackend start * WARNING: "mythbackend" has already been started. # /etc/init.d/mythbackend stop * Stopping myth backend... start-stop-daemon: warning: failed to kill 7447: No such process [ !! ]
The following command fixes this
/etc/init.d/mythbackend zap
- If mythfrontend experiences crashes during the course of skipping through a recorded video, check to make sure that the nvidia use flag was not set when compiling mythtv (if you are using less than a Geforce 4 graphics card).
- One problem I had was with the change channel script for my cable box not working on lower channels. I found that the freqid was being sent to the script by the frontend rather then the channel id. The fix was to change the freqid in the channels table to match the channel number. They were the same already on higher number channels.
- If frontend complains about QMYSQL3 driver not loaded make sure the qt library that mythtv is using has mysql support. I had added the use flag mysql and recompiled qt. However I had several versions of qt and mythtv was using an older version rather then the version emerge qt had picked up by default.
- The error message below is also an indicator that the qt library is lacking mysql support
.. Query was: SELECT NULL; No error type from QSqlError? Strange... 2006-06-01 23:40:59.298 Unable to connect to database! 2006-06-01 23:40:59.298 No error type from QSqlError? Strange... QSqlQuery::exec: database not open QSqlQuery::exec: database not open ...
emerge the qt package again with mysql in the use flags. If the sql database is on a separate computer then also make sure that ~/.mythtv/mysql.txt is configured properly.
If your small fonts are unreadable include DisplaySize 162 121 under the Monitor section of your /etc/X11/xorg.conf:
- I had a problem with a corruption of the database in that it would not schedule any programs. This may help if you have other sorts of corruptions. First delete the contents of the tables program, programrating, and recordmatch.
~ $ mysql -u root -p -D mythconverg mysql> truncate program; mysql> truncate programrating; mysql> truncate recordmatch;
And then run mythfilldatabase to grab the data again and reschedule the recordings.
EDIT: The Way described above might be not the best solution. I fixed it myself some minutes ago. I had a corrupt table, so I executed REPAIR TABLE on all tables. (Note that this will only work, if one of the tables itself is currupt. It does not help on inconsistent data!) You would not lose your program information, if you use the command. Just try
~ $ mysql -u root -p -D mythconverg
and execute the following commands (as script or via copy and paste):
repair table callsignnetworkmap; repair table capturecard; repair table cardinput; repair table channel; repair table codecparams; repair table credits; repair table customexample; repair table diseqc_config; repair table diseqc_tree; repair table dtv_multiplex; repair table dtv_privatetypes; repair table dvdinput; repair table dvdtranscode; repair table eit_cache; repair table favorites; repair table filemarkup; repair table gallerymetadata; repair table housekeeping; repair table inuseprograms; repair table jobqueue; repair table jumppoints; repair table keybindings; repair table keyword; repair table music_albums; repair table music_artists; repair table music_genres; repair table music_playlists; repair table music_smartplaylist_categories repair table music_smartplaylist_items; repair table music_smartplaylists; repair table music_songs; repair table music_stats; repair table musicmetadata; repair table musicplaylist; repair table mythlog; repair table networkiconmap; repair table newssites; repair table oldfind; repair table oldprogram; repair table oldrecorded; repair table people; repair table pidcache; repair table playgroup; repair table profilegroups; repair table program; repair table programgenres; repair table programrating; repair table recgrouppassword; repair table record; repair table record_tmp; repair table recorded; repair table recordedcredits; repair table recordedmarkup; repair table recordedprogram; repair table recordedrating; repair table recordedseek; repair table recordingprofiles; repair table recordmatch; repair table schemalock; repair table settings; repair table tvchain; repair table videocategory; repair table videocountry; repair table videogenre; repair table videometadata; repair table videometadatacountry; repair table videometadatagenre; repair table videosource; repair table videotypes; repair table websites;
This will repair all corrupted tables. It worked well with the version 0.20 of MythTV.
Or use the following command:
mysql mythconverg -uroot -p<passwd> -e "show tables;" | \
awk '{print "\"repair table mythconverg." $1 ";\""}' | \
xargs -n 1 mysql -uroot -p<passwd> -e
remember to replace <passwd> with your mysql root password.

