MythTV/MythTv/OldSetup

Introduction
''MythTV is a free Linux application which turns a computer with the necessary hardware into a network streaming digital video recorder, a digital multimedia home entertainment system, or Home Theater Personal Computer. It can be considered as a free and open source alternative to Tivo or Windows Media Center.'' -- MythTV

MythTV Use Flags
We should now take a look at the MythTV use flags. The following command will display all the use flags you have in place, the total of your profile, the files(s), and your :

For example, here is a working example set of use flags for a MythTV front and back-end:

USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apache2 avahi berkdb bindist bluetooth branding bzip2 cairo cdb cddb cdparanoia cdr cli cracklib  crypt css cups daap dbus directfb dri dts dvb dvd dvdr dvdread eds  emboss encode esd evo exif fam ffmpeg firefox flac fortran gdbm gif gpm  gstreamer gtk hal iconv ipv6 isdnlog java javascript joystick jpegldap  libnotify lirc lm_sensors mad mdnsresponder-compat midi mikmod mmx  mmxext mp3 mpeg mudflap multilib mysql ncurses nls nptl nptlonly  nsplugin ogg opengl openmp oss pam pcre pdf perl png posix ppds pppd  python qt3 qt3support qt4 quicktime readline reflection rss samba sdl  server session spell spl sqlite sse sse2 sse3 ssl startup-notification  svg sysfs tcpd tiff transcode truetype type1 unicode usb v4l vcd vorbis  wifi wma xcomposite xine xml xorg xv xvid xvmc zlib"

If you set your profile to the Gentoo 2008 'Desktop' profile:

These are the extra flags you would need in addition to the 'Desktop' profile to achieve the above:

This will build myth with all of the common features. It's probably worth taking this time to highlight a few individually:


 * MythTV 0.21 requires you to use Qt 3. It is not compatible with Qt 4 so you need to install version 3 as well as 4 if you have that installed.

Here are some other flags useful to MythTV that are not included above:


 * Make sure you add this use flag if you plan on using the TV output on a PVR-350 card.


 * If you will be using any Firewire devices.


 * To support Direct Graphics Address.


 * To support the x264 free software library for encoding H.264/MPEG-4 AVC video streams.

Emerging Mythtv
In order to ensure you install a recent version, make sure the portage tree has been synced recently.

1. Emerge MythTV

Portage will configure your application and add the 'mythtv' user and 'mythtv' group.

2. Once the emerge process completes, ensure that MySQL is running.

3. If your MySQL is configured correctly, issue the following command to complete the initial fill of the MythTV database:

You may now need to install XMLTV to retrieve TV listings over the Internet:

(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.

X Setup
if you don't already have VIDEO_CARDS set in your, 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:

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

VGA to SCART adapter
Using The 'TV out' on most graphics cards to output to a SD TV produces a less than acceptable picture. The 'TV out' also has 'hardware locked' resolutions/refresh rates. Using the VGA (RGB) out allows you to have total control.

This method will achieve, by far, the best result when outputting to a SD TV. The picture quality will be equal or better than that of a digibox and motion problems (unsmooth news tickers & camera 'pans') linked with resolution and refresh rates can be fine tuned with modelines. You will need to have an RGB capable SCART input on your TV.

Building a VGA to SCART adapter
Materials (aside from leads):


 * 3.3K Ohm Resistor - (R1) - (Farnell order No. 934-3040)
 * 1.2K Ohm Resistor - (R2) - (Farnell order No. 934-2524)
 * 820 Ohm Resistor - (R3) - (Farnell order No. 934-3563)
 * 68 Ohm Resistor - (R4) - (Farnell order No. 934-3490)
 * BC548B Transistor - (Q1) - (Farnell order No. 933-910)

The easiest way to do this is to buy a VGA monitor extender lead (just male to male) and a SCART lead that has one of the plastic case connectors you can open. Cut one end off the VGA lead, open and unsolder the SCART connector then solder it to the VGA lead as follows:

Converter Schematic:



These connections should be made:

You may need to use a multimeter to figure out what number pins on the VGA side where what colour wires, be prepared for the wire colours to make no sense.

Make sure you connect the 'Chassis ground' on the VGA to pin 21 (SCART-GND) on the SCART. The 'GND' on the converter schematic is referring to VGA pin 10 (Sync Ground) which, as the table says, connects to SCART pin 17.

When you are done soldering you can clip the SCART connector casing back around the connector keeping all your work safe! Remember to insulate anything that might contact when enclosed in the small space.

Extra info you may need:

Some TVs do not automatically know they are receiving an RGB signal and so all you will get is a blank screen. This can be overcome by giving pins 16(+) and 18(-) on the SCART ~1-3V. This tells the TV it is receiving an RGB signal. You can do this using a 3V DC adapter. A tidier setup is to take power from the PC. Using one pair of CAT5e wire, connect the pins to the +5v and 0v on a PSU molex connector.

The other pin it can be useful to power is SCART pin 8. With ~5-8V it will set the TV to '16:9 AV mode' and with ~9.5-12V '9.5 to 12V'. Powering this will also automatically change the TV to the input when it is active.



Using modelines to control the adapter
To get fine control over the resolution and be able to use a VGA to SCART converter you need to use modelines. Modelines go in the 'Monitor' section and are then referenced in the 'Screen' section of your xorg.conf eg.

Some more modelines that may be helpful:

Mode lines for SD PAL TV resolutions Modeline "800x576pali" 15.38 800 823 895 984  576 580 583 625 -hsync -vsync interlace Modeline "800x288pal-half" 15.38  800 823 895 984  288 290 292 313 -hsync -vsync Modeline "768x576pali" 14.76 768 789 858 944  576 580 583 625 -hsync -vsync interlace Modeline "768x288pal-half" 14.76  768 789 858 944  288 290 292 313 -hsync -vsync Modeline "720x576pali" 13.88 720 742 808 888  576 580 583 625 -hsync -vsync interlace Modeline "720x288pal-half" 13.88  720 742 808 888  288 290 292 313 -hsync -vsync Modeline "704x576pali" 13.50 704 722 786 864  576 580 583 625 -hsync -vsync interlace Modeline "704x288pal-half" 13.50  704 722 786 864  288 290 292 313 -hsync -vsync Modeline "650x576pali" 12.50 650 669 728 800  576 580 583 625 -hsync -vsync interlace Mode lines for SD NTSC TV resolutions Modeline "800x480ntsci" 15.10 800 808 879 960  480 484 487 525 -hsync -vsync interlace Modeline "800x240ntsc-half" 15.10  800 808 879 960  240 242 244 263 -hsync -vsync Modeline "720x480ntsci" 13.59 720 727 791 864  480 484 487 525 -hsync -vsync interlace Modeline "720x240ntsc-half" 13.59  720 727 791 864  240 242 244 263 -hsync -vsync Modeline "704x480ntsci" 13.34 704 714 776 848  480 484 487 525 -hsync -vsync interlace Modeline "704x240ntsc-half" 13.34  704 714 776 848  240 242 244 263 -hsync -vsync Modeline "657x480ntsci" 12.50 657 667 725 792  480 484 487 525 -hsync -vsync interlace Modeline "657x240ntsc-half" 12.50  657 667 725 792  240 242 244 263 -hsync -vsync Modeline "640x480ntsci" 11.32 640 646 703 786  480 484 487 525 -hsync -vsync interlace Modeline "640x240ntsc-half" 11.32  640 646 703 786  240 242 244 263 -hsync -vsync

If you use the Nvidia proprietary driver you will need to make some alterations to your xorg.conf file:

Credits
http://www.idiots.org.uk/vga_rgb_scart/index.html

http://www.nexusuk.org/projects/vga2scart/circuit

Mythweb
/etc/conf.d/apache2 contains APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5"