个人工具

“UbuntuHelp:MythTV Breezy”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/MythTV_Breezy}} {{Languages|UbuntuHelp:MythTV_Breezy}} <pre><nowiki> Note: This guide is part of the MythTV Community Documentation. If this is...)
 
第6行: 第6行:
 
</nowiki></pre>
 
</nowiki></pre>
 
[https://help.ubuntu.com/community/MythTV MythTV Community Documentation Main Page]  
 
[https://help.ubuntu.com/community/MythTV MythTV Community Documentation Main Page]  
 
 
== MythTV on 5.10 Breezy ==
 
== MythTV on 5.10 Breezy ==
 
=== Intro ===
 
=== Intro ===
 
[http://www.mythtv.org Mythtv] is a great PVR application and more!
 
[http://www.mythtv.org Mythtv] is a great PVR application and more!
 
See: [http://www.mythtv.org/docs/mythtv-HOWTO-1.html#ss1.1 What is MythTV]
 
See: [http://www.mythtv.org/docs/mythtv-HOWTO-1.html#ss1.1 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.
 
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.
 
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!'''''
 
'''''This information applies to Ubuntu 5.10 (Breezy Badger) only!'''''
 
 
=== Install ===
 
=== Install ===
 
 
==== Assumptions ====
 
==== Assumptions ====
 
 
* We'll be doing a 'server' install, as this is a relatively minimal set of packages.
 
* 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.
 
* 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.
 
* 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 [http://www.ubuntu.com/download Breezy Install CD].
 
* This tutorial assumes you're installing from the [http://www.ubuntu.com/download Breezy Install CD].
 
 
==== Steps ====
 
==== Steps ====
 
+
# 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.
** 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.
+
# In the partitioner, do not accept the default presented; go into the partitioner instead. Set up your partitions thusly:
 
+
** In the partitioner, do not accept the default presented; go into the partitioner instead. Set up your partitions thusly:
+
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
 
| Partition Number || Size || Type || Mount Point  
 
| Partition Number || Size || Type || Mount Point  
第41行: 第31行:
 
|                3 || Everything Left || lvm || none  
 
|                3 || Everything Left || lvm || none  
 
|}
 
|}
 
 
If you have any other drives you want to use, set them all up as LVM physical volumes.
 
If you have any other drives you want to use, set them all up as LVM physical volumes.
 
+
# #3 Select the "Set up LVM" option, and define a volume group named 'mythvg' containing all available physical volumes.
** #3 Select the "Set up LVM" option, and define a volume group named 'mythvg' containing all available physical volumes.
+
# Format it as JFS and mount it on `/video`. This is where your mythtv files will go.
 
+
# Finish the install as normal.
** Format it as JFS and mount it on `/video`. This is where your mythtv files will go.
+
 
+
** Finish the install as normal.
+
 
+
 
=== Install Packages ===
 
=== Install Packages ===
 
 
You need to install the following packages:
 
You need to install the following packages:
 
 
* linux-686 (or -386, or whatever is appropriate for your CPU)
 
* linux-686 (or -386, or whatever is appropriate for your CPU)
 
* linux-headers-686 (again, adjust as appropriate
 
* linux-headers-686 (again, adjust as appropriate
第60行: 第43行:
 
* build-essential
 
* build-essential
 
* x-window-system-core
 
* x-window-system-core
 
 
You'll probably want to reboot now, as you likely just installed a new kernel.
 
You'll probably want to reboot now, as you likely just installed a new kernel.
 
 
=== Install Capture Card Drivers ===
 
=== Install Capture Card Drivers ===
 
 
Now, we need to install the drivers for our video capture cards. I have a [http://www.hauppauge.com/ Hauppauge] [http://hauppauge.com/pages/products/data_pvr500mce.html PVR-500], so I downloaded the latest drivers from the [http://www.ivtvdriver.org/ IVTV] project.
 
Now, we need to install the drivers for our video capture cards. I have a [http://www.hauppauge.com/ Hauppauge] [http://hauppauge.com/pages/products/data_pvr500mce.html PVR-500], so I downloaded the latest drivers from the [http://www.ivtvdriver.org/ IVTV] project.
 
+
# Download the latest [http://www.ivtvdriver.org/index.php/Download 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)
** Download the latest [http://www.ivtvdriver.org/index.php/Download 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)
+
# cd to the driver's <code>driver</code> directory (ex: `ivtv-0.4.0/driver`
** cd to the driver's <code>driver</code> directory (ex: `ivtv-0.4.0/driver`
+
# make && sudo make install
** 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.
 
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 <code>/lib/modules/2.6.12/ivtv</code>  You want them in { { {/lib/modules/`uname -r`} } } so:  
**#4 (Assuming you have a 2.6.12 kernel): ivtv will install its drivers in <code>/lib/modules/2.6.12/ivtv</code>  You want them in { { {/lib/modules/`uname -r`} } } so:  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo cp -R /lib/modules/2.6.12/ivtv /lib/modules/`uname -r`
 
sudo cp -R /lib/modules/2.6.12/ivtv /lib/modules/`uname -r`
 
</nowiki></pre>
 
</nowiki></pre>
 
+
1.#5 Create a file named `/etc/modprobe.d/ivtv` with the following contents:
**#5 Create a file named `/etc/modprobe.d/ivtv` with the following contents:
+
 
<pre><nowiki>
 
<pre><nowiki>
 
alias char-major-81 videodev
 
alias char-major-81 videodev
第84行: 第60行:
 
alias char-major-81-1 ivtv
 
alias char-major-81-1 ivtv
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Note: this is only appropriate for ivtv drivers with a PVR-500.  You should read read the [http://www.ivtvdriver.org/index.php/Howto IVTV HOWTO] for more details on doing this with a different card. Especially the page about installing the firmware of your card is important: [http://www.ivtvdriver.org/index.php/Firmware]. Note that the directions on this page currently doesn't aply to Dapper Drake because Dapper doesn't use Hotplug. Udev is used instead.  
 
Note: this is only appropriate for ivtv drivers with a PVR-500.  You should read read the [http://www.ivtvdriver.org/index.php/Howto IVTV HOWTO] for more details on doing this with a different card. Especially the page about installing the firmware of your card is important: [http://www.ivtvdriver.org/index.php/Firmware]. 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`
***#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:
 
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  
***#7  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo dd if=/dev/video0 of=/tmp/tuner0.mpg bs=1M count=1
 
sudo dd if=/dev/video0 of=/tmp/tuner0.mpg bs=1M count=1
第97行: 第69行:
 
</nowiki></pre>
 
</nowiki></pre>
 
# copy the /tmp/tuner*.mpg files to a machine with X running, and play them to make sure they work.
 
# 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
 
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 ===
 
=== Set up X to display on the TV-Out of an nVidia card ===
 
+
# open /etc/X11/xorg.conf in your favourite editor
** open /etc/X11/xorg.conf in your favourite editor
+
# Search for Driver "nv" and replace "nv" with "nvidia"
** Search for Driver "nv" and replace "nv" with "nvidia"
+
# Add the following lines immediately after that:  
** Add the following lines immediately after that:  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
Option "TVStandard" "NTSC-M"
 
Option "TVStandard" "NTSC-M"
 
Option "ConnectedMonitor" "TV"
 
Option "ConnectedMonitor" "TV"
 
</nowiki></pre>  (substitute "NTSC-M" as appropriate to your locale)
 
</nowiki></pre>  (substitute "NTSC-M" as appropriate to your locale)
** Set the VertRefresh for the monitor to be 60 (in the US; probably 50 in PAL-land)
+
# 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:  
 
You will want to test this by creating a `~/.xinitrc` with one line in it:  
 
<pre><nowiki>
 
<pre><nowiki>
 
xterm
 
xterm
 
</nowiki></pre> and running `startx`.
 
</nowiki></pre> and running `startx`.
 
 
Now it's time for the  
 
Now it's time for the  
 
 
=== Final housekeeping steps ===
 
=== Final housekeeping steps ===
 
 
You're almost done!  Don't lose hope!
 
You're almost done!  Don't lose hope!
 
+
# Add the line `HOME=/home/mythtv` to `/etc/init.d/mythtv-backend`.
** Add the line `HOME=/home/mythtv` to `/etc/init.d/mythtv-backend`.
+
# Run `sudo /etc/init.d/mythtv-backend start`
 
+
# set the `mythtv` user's password (this might not be necessary):  
** Run `sudo /etc/init.d/mythtv-backend start`
+
 
+
** set the `mythtv` user's password (this might not be necessary):  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo passwd mythtv
 
sudo passwd mythtv
 
</nowiki></pre>
 
</nowiki></pre>
 
+
# Log in as the `mythtv` user, and create a `~/.xinitrc` file with the contents:  
** Log in as the `mythtv` user, and create a `~/.xinitrc` file with the contents:  
+
 
<pre><nowiki>
 
<pre><nowiki>
 
xset s off
 
xset s off
 
mythtv-setup
 
mythtv-setup
 
</nowiki></pre>
 
</nowiki></pre>
 
+
# run `startx` and follow the [http://mythtv.org/docs/mythtv-HOWTO-9.html#ss9.1 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.
** run `startx` and follow the [http://mythtv.org/docs/mythtv-HOWTO-9.html#ss9.1 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.
+
# [ as your main account ] run: `sudo /etc/cron.daily/mythtv-backend`
 
+
# Replace `mythtv-setup` in `mythtv`'s `~/.xinitrc` with `mythtv-frontend`
** [ as your main account ] run: `sudo /etc/cron.daily/mythtv-backend`
+
# run `startx` as the `mythtv` user.
 
+
# Enjoy!
** Replace `mythtv-setup` in `mythtv`'s `~/.xinitrc` with `mythtv-frontend`
+
 
+
** run `startx` as the `mythtv` user.
+
 
+
** Enjoy!
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月30日 (五) 20:25的版本


 
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.  

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)
  1. 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
  1. Log in as the `mythtv` user, and create a `~/.xinitrc` file with the contents:
xset s off
mythtv-setup
  1. 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.
  2. [ as your main account ] run: `sudo /etc/cron.daily/mythtv-backend`
  3. Replace `mythtv-setup` in `mythtv`'s `~/.xinitrc` with `mythtv-frontend`
  4. run `startx` as the `mythtv` user.
  5. Enjoy!