From Fedora Project Wiki
(initial draft of Digital TV in Fedora page.)
 
m (Dtimms moved page DavidTimms/DVB to DavidTimms/DVBFedoraLegacy: Some of the dvb related apps have changed, including the paths. yum is only used on Fedora 21 and older. Keeping the old version for Fedora lagards :.))
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Digital Television in Fedora =
= Digital Television in Fedora =


This page provides information on setting up a Fedora based system to operate with Digital Video Broadcasting tuner hardware, so that television programs can be viewed.
This page provides information on setting up a Fedora based system to operate with Digital Video Broadcasting (DVB) tuner hardware, so that television programs can be viewed.


== Introduction ==
== Introduction ==
In many parts of the world, television stations have begun transmitting digital television signals. While different digital transmission systems have been created, this document is about devices and viewers using the Digital Video Broadcasting (DVB) standard.
In many parts of the world, television stations have begun transmitting digital television signals. While different digital transmission systems have been created, this document is about devices and viewers using the [[http://en.wikipedia.org/wiki/Dvb DVB]] standard.


Typically, as digital TV is introduced to a region, the TV stations continue to transmit their older analogue signals, and add the newer digital TV signals on a previously unused TV channel. By adding a DVB compliant TV tuner to a PC, a Fedora PC will be able to access these channels. There is however, some setup of hardware, drivers, and application software required so that the full range of tuning channels, recording, watching and manipulation of off-air TV channels can be enjoyed.
Typically, as digital TV is introduced to a region, the TV stations continue to transmit their older analogue signals, and add the newer digital TV signals on a previously unused TV channel. By adding a DVB compliant TV tuner to a PC, a Fedora PC will be able to access these channels. There is however, some setup of hardware, drivers, and application software required so that the full range of tuning channels, recording, watching and manipulation of off-air TV channels can be enjoyed.


Note: Since the Fedora distribution is based in a country where MPEG patents are recognised, it is not possible to play back DVB TV channels using only Fedora software. This guide shows how to use the external software repository RPM Fusion to provide pre-compiled software for the actual TV playback.
{{admon/note|DVD playback within RPM Fusion|Since the Fedora distribution is based in a country where MPEG patents are recognised, it is not possible to play back DVB TV channels using only Fedora software. This guide shows how to use an external software repository to provide pre-compiled software for the actual TV playback.}}


== Hardware Setup ==
== Hardware Setup ==
There are at least three major types of DVB tuner: PCI, USB and FireWire. Your choice about which type to use should depend on things like:
There are at least three major types of DVB tuner: [[http://en.wikipedia.org/wiki/PCI_Local_Bus PCI]], [[http://en.wikipedia.org/wiki/Usb USB]] and [[http://en.wikipedia.org/wiki/Firewire FireWire]]. Your choice about which type to use should depend on things like do I:
- do I have a PCI slot available ? (-> PCI)
* have a PCI slot available ? (-> PCI)
- do I have a USB port available ? (-> USB)
* have a USB port available ? (-> USB)
- do I have a FireWire port available ? (-> Firewire)
* have a FireWire port available ? (-> Firewire)
- do I mind opening my PC up ? (-> PCI)
* mind opening my PC up ? (-> PCI)
- do I want to be able to use the tuner on different PCs ? (-> USB, maybe Firewire)
* want to be able to use the tuner on different PCs ? (-> USB, maybe Firewire)
- do I want it to be portable ? (-> USB)
* want it to be portable ? (-> USB)
- do I want it to be a clean installation ? (-> PCI)
* want it to be a clean installation ? (-> PCI)
- some notebook PCs might come with a miniPCI or USB tuner built-in.
* some notebook PCs might come with a miniPCI or USB tuner built-in.
A good starting point for determining if specific hardware will work with Linux is the <span class="plainlinks">[http://www.mythtv.org/wiki/Category:Hardware hardware page at Mythtv.org]</span>.
 
In all cases, a good antenna signal, and cable will be required to plug into the RF antenna socket of the device; "rabbit ears" antennas might work in an area of excellent TV coverage.
In all cases, a good antenna signal, and cable will be required to plug into the RF antenna socket of the device; "rabbit ears" antennas might work in an area of excellent TV coverage.


=== PCI ===
=== PCI ===
Use the manufacturer's instructions to install the card into the system. When Fedora is booted, attempt to locate the device using  
Use the manufacturer's instructions to install the card into the system. When Fedora is booted, attempt to locate the device using  
{{{ lspci |grep Multimedia }}}
<pre>lspci |grep Multimedia</pre>
Find out more information by using the pci identifier listed in the previous result:
Find out more information by using the pci identifier listed in the previous result:
{{{ lspci -v -s 01:09.0 }}}
<pre>lspci -v -s 01:09.0</pre>
With luck this includes a line indicating the kernel module loaded that is handling the device, eg. bttv.
With luck this includes a line indicating the kernel module loaded that is handling the device, eg. bttv.


=== USB ===
=== USB ===
Start a terminal session and
Start a terminal session and
{{{ su -c 'tail -f /var/log/messages' }}}
<pre>su -c 'tail -f /var/log/messages'</pre>
Plug the tuner device into the machine. In the terminal some information about detection of the USB hotplug and perhaps some firmware and or driver loading activity will be seen.
Plug the tuner device into the machine. In the terminal some information about detection of the USB hotplug event and perhaps some firmware and or driver loading activity will be seen.
(To be improved ;-) Instead of lspci, use lsusb to determine which usb ID is the TV tuner device, and then use lsusb -v to determine more information about that item.
(To be improved ;-) Instead of <code>lspci</code>, use <code>lsusb</code> to determine which usb ID is the TV tuner device, and then use <code>lsusb -v</code> to determine more information about that item.


=== FireWire ===
=== FireWire ===
Line 40: Line 42:
== Firmware ==
== Firmware ==
Some devices require the machine that they are plugged into to download the firmware into the device before the device can begin to work. Firmware for some devices might:
Some devices require the machine that they are plugged into to download the firmware into the device before the device can begin to work. Firmware for some devices might:
- be included inside the device; the device just works
* be included inside the device; the device just works
- already be packaged as part of the kernel-firmware package
* already be packaged as part of the kernel-firmware package (this is true for some of the Hauppauge cards)
- be available as an internal something-firmware package within the Fedora software repository
* be available as an internal something-firmware package within the Fedora software repository
- be available outside Fedora, but already packaged as an RPM
* be available outside Fedora, but already packaged as an RPM
- be available as some other archive (perhaps the windows driver disk), that needs to be manually extracted and placed in the appropriate place
* be available as some other archive (perhaps the windows driver disk), that needs to be manually extracted and placed in the appropriate place
Various pieces of technology can assist with loading the device firmware. However, this relies on users reporting the steps needed to be taken to enable specific hardware. This includes getting information on lsusb/lspci device tables, HAL event triggers, and PackageKit software installation triggers.
Various pieces of technology can assist with loading the device firmware. However, this relies on users reporting the steps needed to be taken to enable specific hardware. This includes getting information on ''lsusb/lspci'' device tables, ''HAL'' event triggers, and ''PackageKit'' software installation triggers.


== Driver ==
== Driver ==
All devices require a series of drivers to enable their capabilities. There will be a hardware specific driver eg. dvb_bt8xx, pvrusb2. This driver is often a kernel module, but it might have been accepted to be a part of the kernel proper, or might be an external compilable module.  
All devices require a series of drivers to enable their capabilities. There will be a hardware specific driver eg. ''dvb_bt8xx'', ''pvrusb2''. This driver is often a kernel module, but it might have been accepted to be a part of the kernel proper, or might be an external compilable module.  
If the driver is already loaded, it may have been shown in the earlier lspci status example. If the driver is not loaded automatically, it will be necessary to read the manufacturer's instructions, web site and google to determine how to proceed.
If the driver is already loaded, it may have been shown in the earlier ''lspci'' status example. If the driver is not loaded automatically, it will be necessary to read the manufacturer's instructions, web site and google to determine how to proceed.


If a driver makes it into the kernel-firmware package, it can then be trigger to load automatically when a device that it is known to support is detected.
If a driver makes it into the ''kernel-firmware package'', it can then be trigger to load automatically when a device that it is known to require it is detected.


== DVB utilities ==
== DVB utilities ==
All the DVB drivers make use of the kernel DVB subsystem module dvb_core. There are user tools to work with the DVB subsystem. They are found in the dvb-apps package:
All the DVB drivers make use of the kernel DVB subsystem module ''dvb_core''. There are user tools to work with the DVB subsystem. They are found in the ''dvb-apps'' package using [[dnf|DNF]]:
{{{ yum install dvb-apps }}}
<pre>dnf install dvb-apps</pre>
 
To see what tools get installed:
To see what tools get installed:
{{{ rpm -q --fileprovide dvb-apps }}}
<pre>rpm -q --fileprovide dvb-apps</pre>
Use these tools to confirm correct detection and operation of DVB subsystem using the following tools.
Use these tools to confirm correct detection and operation of the DVB subsystem using the following tools.


=== Initial tuning data file ===
=== Initial tuning data file ===
/usr/share/dvb-apps/dvb-t/country-location: provides an initial-tuning-data-file for a specific country-location
<code>/usr/share/dvbv5/dvb-t/country-location</code>: provides an initial-tuning-data-file for a specific country-location. If available for your area tuning time will be shortened.
If there is no initial file for your area, and you create one, it should be sent upstream to the dvb-apps authors.


=== scandvb ===
=== scandvb ===
scan for all channels on all transponders (carriers) present in the the initial tuning data file, and create a channels.conf eg:
Scan for all channels on all transponders (carriers) present in the the initial tuning data file, and create a channels.conf eg:
scandvb /usr/share/dvb-apps/dvb-t/au-Coonabarabran
<pre>scandvb /usr/share/dvbv5/dvb-t/au-Coonabarabran</pre>
If this creates output, then repeat it with:
If this creates output, then make a channels.conf with:
{{{ scandvb /usr/share/dvb-apps/dvb-t/au-Coonabarabran >channel.conf }}}
<pre>scandvb /usr/share/dvbv5/dvb-t/au-Coonabarabran >channels.conf</pre>
to create the channels definition file.
to create the channels definition file.
=== w_scan ===
If there is no initial file for your area, you can use '''w_scan''' to scan for providers.
<pre>dnf|yum install w_scan
w_scan -X -c au
... wait 10 minutes.
</pre>
If this is successful, please send the created file upstream to the dvb-apps authors.


=== Xzap ===
=== Xzap ===
Uses the channels.conf to tune the frontend to a specific transponder (carrier) and demultiplex the particular channel. The preceding X represents either ATSC, Cable, Satelite, or Terrestrial
Uses the channels.conf to tune the frontend to a specific transponder (carrier) and demultiplex the particular channel. The preceding X represents either ATSC, Cable, Satellite, or Terrestrial.
<pre>tzap -c ~/.xine/channels.conf -r "channelname"</pre>


A status line is shown indicating information such as signal strength, bit error rate and so on. It is updated once each second.
A status line is shown indicating information such as signal strength, bit error rate and so on. It is updated once each second.
Line 78: Line 89:
=== femon ===
=== femon ===
Shows the current tuning and decoding statistics of the tuner each second.
Shows the current tuning and decoding statistics of the tuner each second.
<pre>femon</pre>
Press '''[control-c]''' to finish monitoring.


=== lowlevel recording of a digital TV station ===
=== lowlevel recording of a digital TV station ===
Once a Xzap has tuned a station, another terminal window can be used to record DVB channel (aka MPEG2 Program Stream), to a file:
Once a Xzap has tuned a station, another terminal window can be used to record DVB channel (aka MPEG2 Program Stream), to a file:
{{{ cat /dev/dvb/adapterX/dvr0 >/mediastoragepath/programname.datetime.mpg }}}
<pre>cat /dev/dvb/adapterX/dvr0 >/mediastoragepath/programname.datetime.mpg</pre>


Once that has run for a minute or so, press control-c to terminate the concatenation. The stream can then be viewed using any mpeg2 video decoding software.
Once that has run for a minute or so, press '''[control-c]''' to terminate the concatenation. The stream can then be viewed using any mpeg2 video decoding software.


== DVB Application Software ==
== DVB Application Software ==


=== Live TV playback ===
=== Live TV playback ===
There are various mpg2 playback software available for Fedora, none of which are available in Fedora's own repos. Use an external rpm repository like RPM Fusion, by first enabling the repository.
There are various mpeg2 playback software available for Fedora, none of which are available in Fedora's own repos. Use an external rpm repository like RPM Fusion, by first enabling the repository.
Since you will probably like to examine a few different applications to determine which is the most suitable for you needs:
Since you will probably like to examine a few different applications to determine which is the most suitable for your needs:
{{{ yum install mplayer-gui xine gstreamer-plugins-ugly w_scan dvbcut }}}
<pre>yum install mplayer-gui xine gstreamer-plugins-ugly w_scan dvbcut</pre>
... please provide some simple usage information if you know how ;-)
... please provide some simple usage information if you know how ;-)


The "ABC TV" name must exactly match the channel name in your channels.conf file.
The "ABC TV" name must exactly match the channel name in your channels.conf file.
- mplayer dvb://"ABC TV"
<pre>mplayer dvb://"ABC TV"
- xine dvb://ABC TV
xine dvb://ABC TV</pre>


=== Recording and scheduled recordings ===
=== Recording and scheduled recordings ===
{{{ yum install vdr-femon klear }}}
<pre>yum install vdr-femon klear</pre>
... please provide some simple usage information / page if you know how ;-)
... please provide some simple usage information / page if you know how ;-)


=== Full TV / media recording and playback suite ===
=== Full TV / media recording and playback suite ===
{{{ yum install mythtv-suite }}}
<pre>yum install mythtv-suite</pre>
... please provide some simple usage information / page if you know how ;-)
... please provide some simple usage information / page if you know how ;-)
An alternate method could be using the Fedora-based MythTV distribution known as <span class="plainlinks">[http://www.mythdora.com/?q=download Mythdora]</span>.  In either case, MythTV brings together a number of features/functions into what is generally known as a home theater server.  MythTV features can include (assuming proper hardware, subscriptions, and/or plugins):
* Viewing of live television
* Automated recordings of shows based on search terms (show, title, date/time, actor or character name, etc.)
* Playback on your computer, a remote computer, or to a television
* Playback of locally (or remotely) stored media (audio and/or video)
* Playback of Internet streams (audio and/or video)
* Streaming of media (audio and/or video) to other devices or services
* Clustering of MythTV services on multiple devices
* Announcement of incoming calls
* The local weather conditions/forecast
* A web interface for scheduling and playback of recordings
* A slide show of stored pictures
* <span class="plainlinks">[http://www.slimdevices.com/pi_features.html A SqueezeCenter interface]</span>
* A SIP interface (think Asterisk!)
* Themes and skins for the front end, backend, and some remote players
* and much more


== Updates ==
== Updates ==
We hope this has been useful in getting your DVB hardware working with Fedora. In any case feel free to update text on this page or link to other references if you feel they would have helped you get your tuner going more easily ;-)
We hope this has been useful in getting your DVB hardware working with Fedora. In any case feel free to update text on this page or link to other references if you feel they would have helped you get your tuner going more easily ;-)
Note: after review, this will possibly have links to [[http://rpmfusion.org external software repositories]] [[https://fedoraproject.org/wiki/Help:Editing#Do_not_provide_details_of_forbidden_items removed]].
== Sources/Further Reading ==
* <span class="plainlinks">[http://www.mythtv.org/wiki/Main_Page The MythTV web site]</span>
* <span class="plainlinks">[http://www.mythdora.com/ The Mythdora web site]</span>
* <span class="plainlinks">[http://www.mythpvr.com/mythtv/ The MythPVR web site]</span>
* [http://www.linuxtv.org/wiki/index.php/Dvbscan LinuxTV wiki] especially:
* [http://www.linuxtv.org/wiki/index.php/Dvbscan#A_word_about_dvbscan_and_audio_streams Missing AC-3 audio streams]. Note: in the second step, change '''dvbscan -c''' to '''scandvb -c'''.

Latest revision as of 05:39, 29 November 2015

Digital Television in Fedora

This page provides information on setting up a Fedora based system to operate with Digital Video Broadcasting (DVB) tuner hardware, so that television programs can be viewed.

Introduction

In many parts of the world, television stations have begun transmitting digital television signals. While different digital transmission systems have been created, this document is about devices and viewers using the [DVB] standard.

Typically, as digital TV is introduced to a region, the TV stations continue to transmit their older analogue signals, and add the newer digital TV signals on a previously unused TV channel. By adding a DVB compliant TV tuner to a PC, a Fedora PC will be able to access these channels. There is however, some setup of hardware, drivers, and application software required so that the full range of tuning channels, recording, watching and manipulation of off-air TV channels can be enjoyed.

DVD playback within RPM Fusion
Since the Fedora distribution is based in a country where MPEG patents are recognised, it is not possible to play back DVB TV channels using only Fedora software. This guide shows how to use an external software repository to provide pre-compiled software for the actual TV playback.

Hardware Setup

There are at least three major types of DVB tuner: [PCI], [USB] and [FireWire]. Your choice about which type to use should depend on things like do I:

  • have a PCI slot available ? (-> PCI)
  • have a USB port available ? (-> USB)
  • have a FireWire port available ? (-> Firewire)
  • mind opening my PC up ? (-> PCI)
  • want to be able to use the tuner on different PCs ? (-> USB, maybe Firewire)
  • want it to be portable ? (-> USB)
  • want it to be a clean installation ? (-> PCI)
  • some notebook PCs might come with a miniPCI or USB tuner built-in.

A good starting point for determining if specific hardware will work with Linux is the hardware page at Mythtv.org.

In all cases, a good antenna signal, and cable will be required to plug into the RF antenna socket of the device; "rabbit ears" antennas might work in an area of excellent TV coverage.

PCI

Use the manufacturer's instructions to install the card into the system. When Fedora is booted, attempt to locate the device using

lspci |grep Multimedia

Find out more information by using the pci identifier listed in the previous result:

lspci -v -s 01:09.0

With luck this includes a line indicating the kernel module loaded that is handling the device, eg. bttv.

USB

Start a terminal session and

su -c 'tail -f /var/log/messages'

Plug the tuner device into the machine. In the terminal some information about detection of the USB hotplug event and perhaps some firmware and or driver loading activity will be seen. (To be improved ;-) Instead of lspci, use lsusb to determine which usb ID is the TV tuner device, and then use lsusb -v to determine more information about that item.

FireWire

(To be improved ;-) Need information on how this stuff works with FireWire.

Firmware

Some devices require the machine that they are plugged into to download the firmware into the device before the device can begin to work. Firmware for some devices might:

  • be included inside the device; the device just works
  • already be packaged as part of the kernel-firmware package (this is true for some of the Hauppauge cards)
  • be available as an internal something-firmware package within the Fedora software repository
  • be available outside Fedora, but already packaged as an RPM
  • be available as some other archive (perhaps the windows driver disk), that needs to be manually extracted and placed in the appropriate place

Various pieces of technology can assist with loading the device firmware. However, this relies on users reporting the steps needed to be taken to enable specific hardware. This includes getting information on lsusb/lspci device tables, HAL event triggers, and PackageKit software installation triggers.

Driver

All devices require a series of drivers to enable their capabilities. There will be a hardware specific driver eg. dvb_bt8xx, pvrusb2. This driver is often a kernel module, but it might have been accepted to be a part of the kernel proper, or might be an external compilable module. If the driver is already loaded, it may have been shown in the earlier lspci status example. If the driver is not loaded automatically, it will be necessary to read the manufacturer's instructions, web site and google to determine how to proceed.

If a driver makes it into the kernel-firmware package, it can then be trigger to load automatically when a device that it is known to require it is detected.

DVB utilities

All the DVB drivers make use of the kernel DVB subsystem module dvb_core. There are user tools to work with the DVB subsystem. They are found in the dvb-apps package using DNF:

dnf install dvb-apps

To see what tools get installed:

rpm -q --fileprovide dvb-apps

Use these tools to confirm correct detection and operation of the DVB subsystem using the following tools.

Initial tuning data file

/usr/share/dvbv5/dvb-t/country-location: provides an initial-tuning-data-file for a specific country-location. If available for your area tuning time will be shortened.

scandvb

Scan for all channels on all transponders (carriers) present in the the initial tuning data file, and create a channels.conf eg:

scandvb /usr/share/dvbv5/dvb-t/au-Coonabarabran

If this creates output, then make a channels.conf with:

scandvb /usr/share/dvbv5/dvb-t/au-Coonabarabran >channels.conf

to create the channels definition file.

w_scan

If there is no initial file for your area, you can use w_scan to scan for providers.

dnf|yum install w_scan
w_scan -X -c au
... wait 10 minutes.

If this is successful, please send the created file upstream to the dvb-apps authors.

Xzap

Uses the channels.conf to tune the frontend to a specific transponder (carrier) and demultiplex the particular channel. The preceding X represents either ATSC, Cable, Satellite, or Terrestrial.

tzap -c ~/.xine/channels.conf -r "channelname"

A status line is shown indicating information such as signal strength, bit error rate and so on. It is updated once each second.

femon

Shows the current tuning and decoding statistics of the tuner each second.

femon

Press [control-c] to finish monitoring.

lowlevel recording of a digital TV station

Once a Xzap has tuned a station, another terminal window can be used to record DVB channel (aka MPEG2 Program Stream), to a file:

cat /dev/dvb/adapterX/dvr0 >/mediastoragepath/programname.datetime.mpg

Once that has run for a minute or so, press [control-c] to terminate the concatenation. The stream can then be viewed using any mpeg2 video decoding software.

DVB Application Software

Live TV playback

There are various mpeg2 playback software available for Fedora, none of which are available in Fedora's own repos. Use an external rpm repository like RPM Fusion, by first enabling the repository. Since you will probably like to examine a few different applications to determine which is the most suitable for your needs:

yum install mplayer-gui xine gstreamer-plugins-ugly w_scan dvbcut

... please provide some simple usage information if you know how ;-)

The "ABC TV" name must exactly match the channel name in your channels.conf file.

mplayer dvb://"ABC TV"
xine dvb://ABC TV

Recording and scheduled recordings

yum install vdr-femon klear

... please provide some simple usage information / page if you know how ;-)

Full TV / media recording and playback suite

yum install mythtv-suite

... please provide some simple usage information / page if you know how ;-)

An alternate method could be using the Fedora-based MythTV distribution known as Mythdora. In either case, MythTV brings together a number of features/functions into what is generally known as a home theater server. MythTV features can include (assuming proper hardware, subscriptions, and/or plugins):

  • Viewing of live television
  • Automated recordings of shows based on search terms (show, title, date/time, actor or character name, etc.)
  • Playback on your computer, a remote computer, or to a television
  • Playback of locally (or remotely) stored media (audio and/or video)
  • Playback of Internet streams (audio and/or video)
  • Streaming of media (audio and/or video) to other devices or services
  • Clustering of MythTV services on multiple devices
  • Announcement of incoming calls
  • The local weather conditions/forecast
  • A web interface for scheduling and playback of recordings
  • A slide show of stored pictures
  • A SqueezeCenter interface
  • A SIP interface (think Asterisk!)
  • Themes and skins for the front end, backend, and some remote players
  • and much more

Updates

We hope this has been useful in getting your DVB hardware working with Fedora. In any case feel free to update text on this page or link to other references if you feel they would have helped you get your tuner going more easily ;-)

Note: after review, this will possibly have links to [external software repositories] [removed].

Sources/Further Reading