个人工具

UbuntuHelp:MythTV Breezy

来自Ubuntu中文

跳转至: 导航, 搜索
 
Note: This guide is part of the MythTV Community Documentation.  If this is the first page you are visiting, you should visit the main page instead to start.  

[[UbuntuHelp:MythTV|MythTV Community Documentation Main Page]]

MythTV on 5.10 Breezy

Intro

Mythtv is a great PVR application and more! See: What is MythTV This is an attempt at a comprehensive guide to getting a mythtv setup running from scratch. Right now, since all I have is a PVR-500, that's all I can document, but this is a wiki, so feel free to add instructions for other cards. For further instructions on how to install MythTV, visit InstallMythOnUbuntu. When this is written, October 2005, version 0.18.1 is the latest, and is available in Multiverse. This information applies to Ubuntu 5.10 (Breezy Badger) only!

Install

Assumptions

  • We'll be doing a 'server' install, as this is a relatively minimal set of packages.
  • For mythtv, you'll be doing a lot of IO, and will probably want a better-performing filesystem than the default ext3. I recommend JFS, and will be using that in this tutorial.
  • You'll also want to use LVM probably, so that if you start to run out of space, you can simply add new drives to your existing logical volumes. I will be explaining that in this tutorial as well.
  • This tutorial assumes you're installing from the Breezy Install CD.

Steps

  1. At the install prompt, type `server jfs`. This will ensure JFS is in the list of supported filesystems in the partitioner, and that only a minimal set of packages will be installed by default.
  2. In the partitioner, do not accept the default presented; go into the partitioner instead. Set up your partitions thusly:
Partition Number Size Type Mount Point
1 5G ext3 /
2 1.5G swap none
3 Everything Left lvm none

If you have any other drives you want to use, set them all up as LVM physical volumes.

  1. #3 Select the "Set up LVM" option, and define a volume group named 'mythvg' containing all available physical volumes.
  2. Format it as JFS and mount it on `/video`. This is where your mythtv files will go.
  3. Finish the install as normal.

Install Packages

You need to install the following packages:

  • linux-686 (or -386, or whatever is appropriate for your CPU)
  • linux-headers-686 (again, adjust as appropriate
  • nvidia-glx (If you have an ATI card, install xorg-driver-fglrx)
  • mythtv
  • build-essential
  • x-window-system-core

You'll probably want to reboot now, as you likely just installed a new kernel.

Install Capture Card Drivers

Now, we need to install the drivers for our video capture cards. I have a Hauppauge PVR-500, so I downloaded the latest drivers from the IVTV project.

  1. Download the latest driver, and unpack it in your home directory. Note that there are now two branches of drivers: 0.4.x is for kernels <= 2.6.15, whereas 0.6.x is for kernels 2.6.16 and later. Get the right one for your kernel or it won't work(type 'sudo uname -r' to get your kernelversion)
  2. cd to the driver's driver directory (ex: `ivtv-0.4.0/driver`
  3. make && sudo make install

At this point, you will see some warning message to the effect that the ivtv driver provides some modules that are already in the kernel. DON'T PANIC. This is okay. If you read them carefully, you will see they have instructions for fixing the problem built in. Just cut and paste the 'mv' commands, and run them with sudo.

1.#4 (Assuming you have a 2.6.12 kernel): ivtv will install its drivers in /lib/modules/2.6.12/ivtv You want them in { { {/lib/modules/`uname -r`} } } so:
sudo cp -R /lib/modules/2.6.12/ivtv /lib/modules/`uname -r`

1.#5 Create a file named `/etc/modprobe.d/ivtv` with the following contents:

alias char-major-81 videodev
alias char-major-81-0 ivtv
alias char-major-81-1 ivtv

Note: this is only appropriate for ivtv drivers with a PVR-500. You should read read the IVTV HOWTO for more details on doing this with a different card. Especially the page about installing the firmware of your card is important: [1]. Note that the directions on this page currently doesn't aply to Dapper Drake because Dapper doesn't use Hotplug. Udev is used instead. 1.#6 `sudo depmod -a; sudo modprobe ivtv` At this point, you should check the output of `dmesg` to make sure the driver was successfully loaded. Also, try to read video directly from the card to make sure it works:

1.#7
sudo dd if=/dev/video0 of=/tmp/tuner0.mpg bs=1M count=1
sudo dd if=/dev/video1 of=/tmp/tuner1.mpg bs=1M count=1
  1. copy the /tmp/tuner*.mpg files to a machine with X running, and play them to make sure they work.

Hooray, you've done it! Now all that's left is to

Set up X to display on the TV-Out of an nVidia card

  1. open /etc/X11/xorg.conf in your favourite editor
  2. Search for Driver "nv" and replace "nv" with "nvidia"
  3. Add the following lines immediately after that:
    Option "TVStandard" "NTSC-M"
    Option "ConnectedMonitor" "TV"
    
    (substitute "NTSC-M" as appropriate to your locale)
  4. Set the VertRefresh for the monitor to be 60 (in the US; probably 50 in PAL-land)
You will want to test this by creating a `~/.xinitrc` with one line in it:
xterm
and running `startx`.

Now it's time for the

Final housekeeping steps

You're almost done! Don't lose hope!

  1. Add the line `HOME=/home/mythtv` to `/etc/init.d/mythtv-backend`.
  2. Run `sudo /etc/init.d/mythtv-backend start`
  3. set the `mythtv` user's password (this might not be necessary):
    sudo passwd mythtv
    
  4. Log in as the `mythtv` user, and create a `~/.xinitrc` file with the contents:
    xset s off
    mythtv-setup
    
  5. run `startx` and follow the MythTV Docs on setting up your system. Note: For the case of a PVR-500, when you set up the Capture Devices, you will want to set up /dev/video0 and /dev/video1 as both using Tuner 0. That's because they're really two separate PVR-150 cards essentially "glued" together on one PCI card, instead of one card with two tuners.
  6. [ as your main account ] run: `sudo /etc/cron.daily/mythtv-backend`
  7. Replace `mythtv-setup` in `mythtv`'s `~/.xinitrc` with `mythtv-frontend`
  8. run `startx` as the `mythtv` user.
  9. Enjoy!