<?xml version="1.0" encoding="UTF-8"?>
<chapter id="ipv6"><title id="tipv6">
Streaming over IPv6
</title>

<!-- TODO: improve, GUI -->

<sect1><title>
Streaming over IPv6
</title>

<para>This chapter covers the specifics of streaming over IPv6. You
should still read the previous chapters if you are not confortable with
streaming in general.
</para>

<sect2><title>
Requirements
</title><para> You will obviously need an IPv6-aware operating system.
That includes Windows XP/2003, Linux 2.6, Mac OS X (starting from version
10.2). Windows 2000 and Linux 2.4 are supported too, but their IPv6
stacks are not as good, so upgrade if you can. IPv6 must be properly
configured and working on your system and network.
</para>
<para>On Linux, the <emphasis>ipv6</emphasis> kernel module must be
loaded (or compiled-in). On Windows, the IPv6 protocols suite can be
installed by running "ipv6 install" from the command line, or through
the Network configuration panel.
</para>

<note><para>
Under Windows 2000, you must add by hand a default
multicast IPv6 route, with the following command:
</para>

<screen>
<prompt># </prompt><userinput>ipv6 rtu ff::/8 4</userinput>
</screen>

<para>
where the last number (<emphasis>4</emphasis> in
this example) is the number of your true IPv6 interface. To have a list
of your IPv6 interfaces, run <command>ipv6 if</command>.
</para></note>

<warning><para>
Under Windows XP SP1, you may have problems with a hidden IPv6
firewall. To solve the problem, go to the list of Windows
Services and stop the IPv6 firewalling service. You should consider
upgrading to Service Pack 2 which provides an integrated IPv4/IPv6
firewall that can be configured through the GUI.
</para></warning>

<warning><para>
If you are using VMware under Linux, you will have
to stop VMware and unload the VMware kernel modules, because we noticed
it prevented IPv6 streaming !
</para></warning>
</sect2>

<sect2><title>
Limitations
</title><para>There are still some features of the VLC media player
which do not support IPv6. In particular, it is not possible to use
RTSP over IPv6 because the underlying library, Live.com, does not
support IPv6 at the time of writing.
</para>
<para>Additionnaly, note that at the moment, VLC defaults to using
IPv4 mostly every, as it is what most people uses. That might be
changed to something more transparent in future versions.
</para>
</sect2>

<sect2><title>
Streaming with VLC
</title>

<sect3>
<title>With the Streaming Wizard (GUI)</title>
<para>The streaming wizard accepts IPv6 addresses between braces, for
example:
<userinput>[2002:8ac3:802d:1242:211:11ff:fe25:e6b4]</userinput>.
If you specify a link-local address, you will most likely need to
specify the networking interface to use. On Unix, that can be done this
way: <userinput>[fe80::211:11ff:fe25:e6b4%eth0]</userinput> to attach
to eth0. Similarly, on Windows, you may specify
<userinput>[fe80::211:11ff:fe25:e6b4%1]</userinput> where 1 is the
number of the network interface as defined by the operating system.
</para>

<para>If you're streaming over HTTP, note that IPv6 is automatically
used by default (so that both IPv6 and IPv4 clients will be allowed).
</para>

<para>If you want to specify DNS hostname, keep in mind that the VLC
defaults to IPv4 resolution. You must either specify hostnames that
only resolves to IPv6 addresses, or enable the &quot;Force IPv6&quot;
<emphasis>advanced</emphasis> option in
<emphasis>Preferences / General Settings / Input</emphasis>.
</para>

</sect3>

<sect3>
<title>From the command-line</title>
<para>The <userinput>--ipv6</userinput> command line option force
the use of IPv6 by default (ie. IPv6 is always attempted before IPv4).
</para>

<screen>
<prompt>% </prompt><userinput>vlc -vvv video1.xyz --sout '#rtp{mux=ts,dst=ff08::1}' --ttl 12</userinput>
</screen>

<para>
where:
</para>

<itemizedlist>

<listitem><para><filename>video1.xyz</filename>
 is the file you want to stream (you can also put
<command>dvdsimple:///dev/dvd</command> to stream a DVD or any other input
configuration)
,</para></listitem>

<listitem><para><emphasis>ff08::1</emphasis> 
is either :
</para>

<itemizedlist>

<listitem><para>
the IPv6 address of the machine you want to unicast to;
</para></listitem>

<listitem><para>
or the multicast IPv6 address.
</para></listitem>

</itemizedlist>

</listitem>

<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></listitem>

</itemizedlist>

<note><para>
You may have to specify the output network interface:
</para>

<screen>
<prompt>% </prompt><userinput>vlc -vvv video1.xyz --sout '#rtp{mux=ts,dst=ff02::1%eth0}' --ttl 12</userinput>
</screen>

<para>
where <emphasis>eth0</emphasis> is the name of the
network interface (under Linux the network interfaces
are named <emphasis>ethX</emphasis>, under Mac OS X it's
<emphasis>enX</emphasis> and under Windows it's <emphasis>X</emphasis>,
where <emphasis>X</emphasis> is the appropriate number).
</para>

</note>
</sect3>

</sect2>

<sect2><title>
Receiving an IPv6 stream
</title>

<sect3><title>With the graphical user interface</title>
<para>Select File / Open Network Stream. To receive an UDP/RTP unicast
stream sent to your system, you should select the Force IPv6 option
(and possibly adjust the destination UDP port). To receive an UDP
multicast stream, select the UDP/RTP Multicast option, and specify the
multicast address to subscribe to inside square brackets. The IPv6
addresses syntax is the same as that explained in the
<emphasis>Streaming over IPv6</emphasis> section of this chapter.
</para>
</sect3>

<sect3><title>From the command line</title>
<para>IPv6 is used automatically if available (with version 0.8.6 or more).
</para>
<screen>
<prompt>% </prompt><userinput>vlc -vvv --ipv6 rtp://@[ff08::1]:5004</userinput>
</screen>

<note><para>
Under Unix/Linux, you may have to protect the square
brackets around the IPv6 address:
</para>

<screen>
<prompt>% </prompt><userinput>vlc -vvv -rtp:@//\[ff08::1\]:5004</userinput>
</screen>

</note>

<note><para>
You may have to specify the output network interface:
</para>

<screen>
<prompt>% </prompt><userinput>vlc -vvv rtp://@[ff02::1%eth0]:5004 --ttl 12</userinput>
</screen>

<para>
where <emphasis>eth0</emphasis> is the name of the
network interface (under Linux the network interfaces
are named <emphasis>ethX</emphasis>, under Mac OS X it's
<emphasis>enX</emphasis> and under Windows it's <emphasis>X</emphasis>,
where <emphasis>X</emphasis> is the appropriate number).
</para>

</note>
</sect3>
</sect2>

</sect1>
</chapter>

