<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY dvb-apps-download-http
    "http://anduin.linuxfromscratch.org/sources/BLFS/svn/d/dvb-apps-2012-06-10.tar.xz">
  <!ENTITY dvb-apps-download-ftp  " ">
  <!ENTITY dvb-apps-md5sum        "6102338db203f9808b433d513e648f8e">
  <!ENTITY dvb-apps-size          "368 MB">
  <!ENTITY dvb-apps-buildsize     "17 MB">
  <!ENTITY dvb-apps-time          "0.1 SBU">
]>

<sect1 id="dvb-apps" xreflabel="dvb-apps-&dvb-apps-version;">
  <?dbhtml filename="dvb-apps.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2012-10-31 12:49:58 -0400 (Wed, 31 Oct 2012) $</date>
  </sect1info>

  <title>DVB-Apps-&dvb-apps-version;</title>

  <indexterm zone="dvb-apps">
    <primary sortas="a-dvb-apps">dvb-apps</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to DVB-Apps</title>

    <para>
      The <application>DVB-Apps</application> package contains a collection of
      command line utilities for controlling and using a digital television
      card/chip installed (possibly through a USB port) on your computer. These
      are useful for scanning to make an index of the available channels, tuning
      the chip to a chosen station or recording the channel to a file on your
      computer so you can watch it at a later date.
    </para>

    &lfs71_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&dvb-apps-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&dvb-apps-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &dvb-apps-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &dvb-apps-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &dvb-apps-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &dvb-apps-time;
        </para>
      </listitem>
    </itemizedlist>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/dvb-apps"/>
    </para>
  </sect2>

  <sect2 role="kernel" id="dvb-apps-kernel">
    <title>Kernel Configuration</title>

    <para>
      There are many TV chips available so it is not possible to give guidance
      on the kernel config for all of them. <command>lspci</command> from
      <xref linkend="pciutils"/> and Goggle are your friends. One possible
      gotcha is that some pci cards (such as the <ulink
      url="http://www.amazon.co.uk/Hauppauge-WinTV-Nova-digital-tuner/dp/B000I1RHWA">
      Hauppauge Nova T 500</ulink>) present themselves to the motherboard as a
      USB controller and the TV chip on the card communicates with the
      motherboard via this USB interface.
    </para>

<screen>General setup  ---&gt;
  [*] Prompt for development and/or incomplete code/drivers
Device Drivers  ---&gt;
  Generic Driver Options  ---&gt;
    [*] Userspace firmware loading support
    [*]   Include in-kernel firmware blobs in kernel binary
    (list of)    External firmware blobs to build into the kernel binary
    (/lib/firmware) Firmware blobs root directory
  [*] I2C support  ---&gt;
    [*]   I2C device interface
    I2C Algorithms  ---&gt;
      [*] I2C bit-banging interfaces
  [*] Multimedia support  ---&gt;
    [*]   Video For Linux
    [*]   DVB for Linux
    [*]     DVB Network Support
    [*]   Video capture adapters  ---&gt;
      [*]   V4L USB devices  ---&gt;
      (as required depending on your hardware)
      [*]   V4L PCI(e) devices  ---&gt;
      (as required depending on your hardware)
    [*]   DVB/ATSC adapters  ---&gt;
    (as required depending on your hardware)</screen>

    <para>
      Select the appropriate sub-options that appear when the above options are
      selected and recompile your kernel.
    </para>

    <indexterm zone="dvb-apps dvb-apps-kernel">
      <primary sortas="d-dvb-apps">dvb-apps</primary>
    </indexterm>
  </sect2>

  <sect2 role="installation">
    <title>Installation of DVB-Apps</title>

    <para>
      Install <application>DVB-Apps</application> by running the following
      commands:
    </para>

<screen><userinput>sed -i 's/ $(lib_name).a//' Make.rules &amp;&amp;
sed -i 's/\.a/.so/g' test/*/Makefile &amp;&amp;
make</userinput></screen>

    <para>
      This package does not come with a test suite.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install</userinput></screen>
  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <command>sed -i 's/ $(lib_name).a//' Make.rules</command> and
      <command>sed -i 's/\.a/.so/g' test/*/Makefile</command>: These seds
      disable compiling the static libraries.
    </para>
  </sect2>

  <sect2 role="configuration">
    <title>Configuring DVB-Apps</title>

    <sect3 id="dvb-apps-config">
      <title>Config Files</title>
      <para>
        <filename>~/.tzap/channels.conf</filename> and
        <filename>/etc/channels.conf</filename>.
      </para>

      <indexterm zone="dvb-apps dvb-apps-config">
        <primary sortas="e-AA.tzap-channels.conf">~/.tzap/channels.conf</primary>
      </indexterm>

      <indexterm zone="dvb-apps dvb-apps-config">
        <primary
        sortas="e-etc-channels.conf">/etc/channels.conf</primary>
      </indexterm>
    </sect3>

    <sect3><title>Configuration Information</title>

      <para>
        For a user to be able to use the device files in /dev the simplest
        solution is to make the user part of the video group. As the
        <systemitem class="username">root</systemitem> user:
      </para>

<screen role="root"><userinput>usermod -a -G video &lt;USERNAME&gt; </userinput></screen>

      <para>
        Create a channels.conf file listing the channels available from your
        local transmitter. If it's a terrestrial transmitter there should be a
        file with its details in /usr/share/dvb/dvb-t. If it's a satellite the
        file should be in /usr/share/dvb/dvb-s.
      </para>

<screen><userinput>scan /usr/share/dvb/dvb-t/uk-WinterHill > channels.conf &amp;&amp;
mkdir -p ~/.tzap &amp;&amp;
cp channels.conf ~/.tzap</userinput></screen>

      <para>
        If that went Ok and you saw some familiar TV channels listed in your
        terminal, as the <systemitem class="username">root</systemitem> user
        copy it to a system wide location:
      </para>

<screen role="root"><userinput>cp channels.conf /etc/channels.conf</userinput></screen>
    </sect3>
  </sect2>

  <sect2 role="using">
    <title>Using DVB-Apps</title>

    <para>
      To record a channel to a file:
    </para>

<screen><userinput>gnutv -out file bbc1.mpeg "BBC ONE"</userinput></screen>

    <para>
      If you give it ten seconds or so to buffer you can then start to watch the
      file with a video player such as <command>xine</command> or
      <command>mplayer</command>. The advantage of watching TV via a file in
      this way is that it allows you to pause playback and rewind if you want,
      plus you can watch the file again later.
    </para>
  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          atsc_epg,
          av7110_loadkeys,
          azap,
          czap,
          dib3000-watch,
          dst_test,
          dvbdate,
          dvbnet,
          dvbscan,
          dvbtraffic,
          femon,
          gnutv,
          gotox,
          lsdvb,
          scan,
          szap,
          tzap and
          zap,
        </seg>
        <seg>
          libdvbapi.so,
          libdvbcfg.so,
          libdvben50221.so,
          libdvbsec.so and
          libesg.so,
          libucsi.so
        </seg>
        <seg>
          /usr/include/libdvbapi,
          /usr/include/libdvbcfg,
          /usr/include/libdvben50221,
          /usr/include/libdvbsec,
          /usr/include/libesg,
          /usr/include/libucsi and
          /usr/share/dvb
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="atsc_epg">
        <term><command>atsc_epg</command></term>
        <listitem>
          <para>
            prints out the next three hours worth of programs on a given
            frequency (for ATSC only)
          </para>
          <indexterm zone="dvb-apps atsc_epg">
            <primary sortas="b-atsc_epg">atsc_epg</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="av7110_loadkeys">
        <term><command>av7110_loadkeys</command></term>
        <listitem>
          <para>
            is a utiltity to load IR remote keymaps into an av7110 based card
          </para>
          <indexterm zone="dvb-apps av7110_loadkeys">
            <primary sortas="b-av7110_loadkeys">av7110_loadkeys</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="azap">
        <term><command>azap</command></term>
        <listitem>
          <para>
            is a tuning utility for ATSC
          </para>
          <indexterm zone="dvb-apps azap">
            <primary sortas="b-azap">azap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="czap">
        <term><command>czap</command></term>
        <listitem>
          <para>
            is a tuning utilities for DVB-C (cable)
          </para>
          <indexterm zone="dvb-apps czap">
            <primary sortas="b-czap">czap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dib3000-watch">
        <term><command>dib3000-watch</command></term>
        <listitem>
          <para>
            is a tool to monitor DIB3000 demodulators
          </para>
          <indexterm zone="dvb-apps dib3000-watch">
            <primary sortas="b-dib3000-watch">dib3000-watch</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dst_test">
        <term><command>dst_test</command></term>
        <listitem>
          <para>
            is a utility for DST based cards
          </para>
          <indexterm zone="dvb-apps dst_test">
            <primary sortas="b-dst_test">dst_test</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dvbdate">
        <term><command>dvbdate</command></term>
        <listitem>
          <para>
            is a utility that can read date time information from the currently
            tuned multiplex
          </para>
          <indexterm zone="dvb-apps dvbdate">
            <primary sortas="b-dvbdate">dvbdate</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dvbnet">
        <term><command>dvbnet</command></term>
        <listitem>
          <para>
            is a utility to control digital data network interfaces, a DVB
            network interface manager (IP over DVB) for streaming programs from
            one computer to another over a network.
          </para>
          <indexterm zone="dvb-apps dvbnet">
            <primary sortas="b-dvbnet">dvbnet</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dvbscan">
        <term><command>dvbscan</command></term>
        <listitem>
          <para>
            is another frequency scanning tool used to generate channel lists
          </para>
          <indexterm zone="dvb-apps dvbscan">
            <primary sortas="b-dvbscan">dvbscan</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dvbtraffic">
        <term><command>dvbtraffic</command></term>
        <listitem>
          <para>
            is a utility to monitor traffic on a digital device and perform PID
            analysis of currently tuned multiplex
          </para>
          <indexterm zone="dvb-apps dvbtraffic">
            <primary sortas="b-dvbtraffic">dvbtraffic</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="femon">
        <term><command>femon</command></term>
        <listitem>
          <para>
            is a frontend monitor, it monitors the tuning status on a digital TV
            device
          </para>
          <indexterm zone="dvb-apps femon">
            <primary sortas="b-femon">femon</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gnutv">
        <term><command>gnutv</command></term>
        <listitem>
          <para>
            is a utility to tune and stream your TV
          </para>
          <indexterm zone="dvb-apps gnutv">
            <primary sortas="b-gnutv">gnutv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="gotox">
        <term><command>gotox</command></term>
        <listitem>
          <para>
            is a utility for calculating the position of satellites
          </para>
          <indexterm zone="dvb-apps gotox">
            <primary sortas="b-gotox">gotox</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lsdvb">
        <term><command>lsdvb</command></term>
        <listitem>
          <para>
            is a simple utility to list PCI/PCIe DVB devices
          </para>
          <indexterm zone="dvb-apps lsdvb">
            <primary sortas="b-lsdvb">lsdvb</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="scan">
        <term><command>scan</command></term>
        <listitem>
          <para>
            is a utility to generate channel lists
          </para>
          <indexterm zone="dvb-apps scan">
            <primary sortas="b-scan">scan</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="szap">
        <term><command>szap</command></term>
        <listitem>
          <para>
            is a tool to tune a satellite DVB receiver
          </para>
          <indexterm zone="dvb-apps szap">
            <primary sortas="b-szap">szap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tzap">
        <term><command>tzap</command></term>
        <listitem>
          <para>
            is a tool to tune a terrestrial DVB receiver
          </para>
          <indexterm zone="dvb-apps tzap">
            <primary sortas="b-tzap">tzap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="zap">
        <term><command>zap</command></term>
        <listitem>
          <para>
            just tunes a digital device (and is really intended for developers)
          </para>
          <indexterm zone="dvb-apps zap">
            <primary sortas="b-zap">zap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libdvbapi">
        <term><filename class="libraryfile">libdvbapi.so</filename></term>
        <listitem>
          <para>
            is an interface library for digital TV devices
          </para>
          <indexterm zone="dvb-apps libdvbapi">
            <primary sortas="c-libdvbapi">libdvbapi.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libdvbcfg">
        <term><filename class="libraryfile">libdvbcfg.so</filename></term>
        <listitem>
          <para>
            contains functions that parse/create digital TV channel
            configuration files
          </para>
          <indexterm zone="dvb-apps libdvbcfg">
            <primary sortas="c-libdvbcfg">libdvbcfg.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libdvben50221">
        <term><filename class="libraryfile">libdvben50221.so</filename></term>
        <listitem>
          <para>
            contains functions that implement the CENELEC (European Committee
            for Electrotechnical Standardization) EN 50221 CAM stack
          </para>
          <indexterm zone="dvb-apps libdvben50221">
            <primary sortas="c-libdvben50221">libdvben50221.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libdvbsec">
        <term><filename class="libraryfile">libdvbsec.so</filename></term>
        <listitem>
          <para>
            is a library for Satellite Equipment Control operations
          </para>
          <indexterm zone="dvb-apps libdvbsec">
            <primary sortas="c-libdvbsec">libdvbsec.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libesg">
        <term><filename class="libraryfile">libesg.so</filename></term>
        <listitem>
          <para>
            contains functions for an Electronic Service Guide parser
          </para>
          <indexterm zone="dvb-apps libesg">
            <primary sortas="c-libesg">libesg.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libucsi">
        <term><filename class="libraryfile">libucsi.so</filename></term>
        <listitem>
          <para>
            is a Fast MPEG2 Transport Stream SI table parsing library
          </para>
          <indexterm zone="dvb-apps libucsi">
            <primary sortas="c-libucsi">libucsi.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>
  </sect2>
</sect1>
