LDP/LDP/howto/docbook/VideoLAN-HOWTO/src/hardencoding.sgml

116 lines
2.7 KiB
Plaintext

<chapter id="hardencoding"><title id="thardencoding">Stream from an MPEG
encoding card</title>
<note><para>Streaming from a Kfir card is only supported under
Linux.</para></note>
<sect1><title>Install the drivers</title>
<para>If you want to be able to stream from a Kfir
card, you need to install its Linux drivers. Download
the latest release of the drivers from the <ulink
url="http://www.linuxtv.org/download/mpeg2/">drivers download
page</ulink> of the <ulink url="http://www.linuxtv.org/">LinuxTV</ulink>
Project.</para>
<para>Uncompress the tarball and follow the instructions written in
the <filename>README</filename> file to compile and install the
drivers.</para>
<note><para>If you have a VIA chipset, you need to disable USB in the
BIOS.</para></note>
<sect1><title>Stream with VLC</title>
<screen>
<prompt>% </prompt><userinput>vlc kfir:/dev/video --sout udp:192.168.0.42 --ttl 12</userinput>
</screen>
<para>where :</para>
<itemizedlist>
<listitem><para><filename>/dev/video</filename> is the device
corresponding to the Kfir card,</para>
<listitem><para><emphasis>192.168.0.42</emphasis> is either :
<itemizedlist>
<listitem><para>the IP address of the machine you want to unicast to ;</para>
<listitem><para>or the DNS name the machine you want to unicast to ;</para>
<listitem><para>or the multicast IP address.</para>
</itemizedlist>
<listitem><para><emphasis>12</emphasis> is the value of the TTL (Time To
Live) of your IP packets (which means that the stream will be
able to cross 11 routers).</para>
</itemizedlist>
</sect1>
<sect1><title>Stream with VLS</title>
<para>There is no command line interface for this input for the
moment... so you will have to use the configuration file.</para>
<para>Here is a typical configuration file <filename>vls.cfg</filename> to run VLS with a kfir encoding card:</para>
<programlisting>
# vls.cfg (VLS configuration file)
# Example of the VideoLAN HOWTO for the Kfir encoding card
BEGIN "Inputs"
kfir = "video"
END
BEGIN "kfir"
# Kfir device
Device = "/dev/video"
# Stream type (default is "Mpeg2-PS")
Type = "Mpeg2-PS"
END
BEGIN "Channels"
channel1 = "network"
END
BEGIN "channel1"
# Unicast or multicast IP address
DstHost = "192.168.0.42"
# Destination port
DstPort = "1234"
# If it's a multicast IP address, uncomment the line below
#Type = "multicast"
# If it's a multicast IP address, set the "Time To Live" below
#TTL = "12"
END
BEGIN "LaunchOnStartUp"
command1 = "start video channel1 kfir"
END
</programlisting>
<para>Once you have adapted the configuration file above, run VLS:</para>
<screen>
<prompt>% </prompt><userinput>vls -vv -f vls.cfg</userinput>
</screen>
</chapter>