VideoLAN HOWTO

Alexis de Lattre

Marc Ariberti

Anil Daoud

Cl�ment Stenac

   Copyright � 2002, 2003 the VideoLAN project

   Questo documento descrive come usare VideoLAN, una soluzione
   completa di streaming. Traduzione a cura di Ignazio Testoni,
   ignazio.testoni@gmail.com. Revisione a cura di Elisa Chiorrini,
   elisa.chiorrini@gmail.it.

   Permission is granted to copy, distribute and/or modify this
   document under the terms of the GNU Free Documentation License,
   Version 1.2 or any later version published by the Free Software
   Foundation; with no Invariant Sections, with no Front-Cover
   Texts, and with no Back-Cover Texts. The text of the license
   can be found in the appendix GNU Free Documentation License.
     __________________________________________________________

   Sommario
   1. Introduzione

        1.1. Cos'� il progetto VideoLAN?

              1.1.1. Panoramica
              1.1.2. Software VideoLAN

        1.2. Che cos'� un codec?
        1.3. Come si pu� usare VideoLAN?

              1.3.1. Documentazione
              1.3.2. Supporto utente

        1.4. Uso dalla riga di comando

              1.4.1. Aprire un terminale

   2. Installare il software e l'hardware necessari

        2.1. Installare VLC

              2.1.1. Windows
              2.1.2. BeOS
              2.1.3. Mac OS X
              2.1.4. Debian GNU/Linux
              2.1.5. Linux Mandrake
              2.1.6. Linux Redhat
              2.1.7. Compilare i sorgenti (per ogni altro S.O.)

        2.2. Installare VLS

              2.2.1. Windows
              2.2.2. GNULinux & Mac OS X

   3. Ricevere e salvare uno stream

        3.1. Ricevere uno stream con VLC

              3.1.1. Ricevere uno stream unicast
              3.1.2. Ricevere uno stream multicast
              3.1.3. Ricevere uno stream HTTP/FTP/MMS

        3.2. Salvare uno stream con VLC
        3.3. Ricevere uno stream con un set-top-box

   4. Stream di un file

        4.1. Stream di un file con VLC
        4.2. Stream di un file con VLS

   5. Trasmettere in stream un DVD

        5.1. Trasmettere in stream un DVD con VLC
        5.2. Trasmettere in stream un DVD con VLS

   6. Trasmettere in stream un canale DVB (satellitare o TV
          digitale terrestre)

        6.1. Installare i driver DVB
        6.2. Trasmettere in stream con VLS
        6.3. Trasmettere in stream con VLC

   7. Trasmettere in stream da una scheda di codifica MPEG

        7.1. Trasmettere in stream con la scheda Hauppauge
                WinTV-PVR-250

              7.1.1. Installare i driver
              7.1.2. Trasmettere in stream con VLC
              7.1.3. Trasmettere in stream con VLS

        7.2. Trasmettere in stream con la scheda Visiontech Kfir

              7.2.1. Installare i driver
              7.2.2. Trasmettere in stream con VLC
              7.2.3. Trasmettere in stream con VLS

   8. Trasmettere in stream da una scheda di acquisizione o da una
          webcam

        8.1. Installare i driver Video per Linux
        8.2. Trasmettere in stream con VLC
        8.3. Trasmettere in stream con VLS

   9. Uso avanzato dello streaming in uscita di VLC
          (transcodifica, streaming multiplo, ecc...)

        9.1. Sintassi
        9.2. Esempi

              9.2.1. Transcodifica
              9.2.2. Streaming multiplo
              9.2.3. Transcodifica e streaming multipli
              9.2.4. Streaming via HTTP
              9.2.5. Utilizzare il modulo es

   10. Stream in IPv6

        10.1. Stream in IPv6

              10.1.1. Trasmettere in stream con VLC
              10.1.2. Trasmettere in streaming con VLS

        10.2. Ricevere in IPv6

              10.2.1. Ricevere uno stream unicast
              10.2.2. Ricevere uno stream multicast

   11. Video On Demand

        11.1. Panoramica
        11.2. Sul lato server
        11.3. Sul lato client

   12. Aggiungere un servizio di informazione sui canali

        12.1. Inviare annunci mentre si effettua uno streaming con
                VLC

        12.2. Inviare annunci per i programmi trasmessi in stream
                da VLS tramite il mini-SAP-server

              12.2.1. Installare il mini-SAP-server
              12.2.2. Configurare il mini-SAP-server
              12.2.3. Eseguire il mini-SAP-server

        12.3. Avviare VLC sul(i) client

   A. GNU Free Documentation License

        A.1. PREAMBLE
        A.2. APPLICABILITY AND DEFINITIONS
        A.3. VERBATIM COPYING
        A.4. COPYING IN QUANTITY
        A.5. MODIFICATIONS
        A.6. COMBINING DOCUMENTS
        A.7. COLLECTIONS OF DOCUMENTS
        A.8. AGGREGATION WITH INDEPENDENT WORKS
        A.9. TRANSLATION
        A.10. TERMINATION
        A.11. FUTURE REVISIONS OF THIS LICENSE
        A.12. ADDENDUM: How to use this License for your documents

   Lista delle Figure
   1-1. Soluzione globale VideoLAN
   1-2. Terminale Windows
   1-3. Terminale Linux X
   1-4. Terminale Mac OS X
   1-5. Terminale BeOS
     __________________________________________________________

Capitolo 1. Introduzione

1.1. Cos'� il progetto VideoLAN?

1.1.1. Panoramica

   VideoLAN � una soluzione software completa per il video
   streaming, sviluppata da studenti della Ecole Centrale Paris e
   da sviluppatori di tutto il mondo, secondo la GNU General
   Public License (GPL). VideoLAN � progettato per trasmettere,
   tramite stream, video MPEG su reti a banda larga.

   La soluzione VideoLAN include:

     * VLS (VideoLAN Server), che pu� trasmettere files MPEG-1,
       MPEG-2 ed MPEG-4, DVD, canali digitali satellitari, canali
       della tv digitale terrestre e video in diretta sulla rete
       in modalit� unicast o multicast;
     * VLC (inizialmente VideoLAN Client), che pu� essere usato
       come server per trasmettere files MPEG-1, MPEG-2 ed MPEG-4,
       DVD e video in diretta sulla rete in modalit� unicast o
       multicast; o essere usato come client per ricevere,
       decodificare e visualizzare stream MPEG con diversi sistemi
       operativi.

   Ecco un esempio della soluzione VideoLAN completa:

   Figura 1-1. Soluzione globale VideoLAN

   [global-diagram.jpg]

   Maggiori dettagli sul progetto possono essere trovati sul sito
   Web VideoLAN.
     __________________________________________________________

1.1.2. Software VideoLAN

1.1.2.1. VLC

   VLC lavora su molteplici piattaforme: Linux, Windows, Mac OS X,
   BeOS, *BSD, Solaris, Familiar Linux, Yopy/Linupy e QNX. Pu�
   leggere:

     * MPEG-1, MPEG-2 e MPEG-4 / file DivX da un hard disk, dal
       drive CD-ROM,...;
     * DVD e VCD;
     * da scheda decoder satellitare (DVB-S);
     * stream MPEG-1, MPEG-2 e MPEG-4 dalla rete inviati da VLS o
       da uno stream in uscita di VLC.

   VLC pu� anche essere usato come server per inviare i seguenti
   stream:

     * MPEG-1, MPEG-2 e MPEG-4 / file DivX;
     * DVD;
     * da una scheda codificatrice MPEG;

   verso:

     * una sola macchina (es. ad un indirizzo IP): questo viene
       detto unicast;
     * un gruppo dinamico di macchine a cui i client possono
       connettersi o disconnettersi (es. verso un indirizzo IP
       multicast): questo viene detto multicast;

   in IPv4 o IPv6.

   Per avere la lista completa delle possibilit� che VLC offre su
   ciascuna delle piattaforme supportate, guardare la pagina delle
   caratteristiche di VLC.

   Nota

        VLC non funziona su Mac OS 9 e probabilmente mai lo far�.
     __________________________________________________________

1.1.2.2. VLS

   VLS pu� mandare in stream:

     * file MPEG-1, MPEG-2 o MPEG-4 salvati su hard drive o CD;
     * un DVD inserito in un DVD drive locale o copiato su hard
       disk;
     * una scheda televisiva satellitare (DBV-S) o digitale
       terrestre (DVB-T);
     * una scheda codificatrice MPEG;

   verso:

     * una sola macchina (es. un indirizzo IP): questo viene detto
       unicast;
     * un gruppo dinamico di macchine a cui i client possono
       connettersi o disconnettersi (es. verso un indirizzo IP
       multicast): questo viene detto multicast;

   in IPv4 o IPv6.

   Un Pentium 100 MHz con 32 MB di memoria dovrebbe essere
   sufficiente ad inviare uno stream sulla rete. Nello spedire una
   moltitudine di video salvati su hard drive, il limite effettivo
   non � il processore ma l'hard drive e la connessione di rete.

   VLS funziona su Linux e Windows. Per avere la lista completa
   delle possibilit� che VLS offre su ciascuna delle piattaforme
   supportate, guardare la pagina delle caratteristiche di VLC.
     __________________________________________________________

1.1.2.3. Mini-SAP-server

   � possibile aggiungere alla soluzione VideoLAN un servizio di
   informazione sui canali televisivi basato sullo standard
   SAP/SDP. Il mini-SAP-server trasmette annunci sui programmi
   multicast in rete in IPv4 o IPv6 e i VLC ricevono questi
   annunci e li aggiungono automaticamente alle loro playlist.

   Il mini-SAP-server funziona su Linux e Mac OS X.
     __________________________________________________________

1.2. Che cos'� un codec?

   Per comprendere pienamente la soluzione VideoLAN, � necessario
   comprendere la differenza fra un codec e un container format

     * Un codec consiste in un algoritmo di compressione, usato
       per ridurre la dimensione di uno stream. Esistono codec
       audio e video. MPEG-1, MPEG-2, MPEG-4, Vorbis, DivX,...
       sono tutti dei codec.
     * Un container format contiene uno o pi� stream gi�
       codificati dai codec. Molto spesso vi si possono trovare
       uno stream audio ed uno video. AVI, Ogg, MOV, ASF,... sono
       tutti dei container format. Gli stream in esso contenuti
       possono essere codificati per mezzo di differenti codec. In
       teoria si dovrebbe poter utilizzare qualsivoglia codec in
       qualunque container format. Purtroppo esistono alcune
       incompatibilit�. � possibile trovare una matrice di
       possibili codec e container format nella pagina delle
       caratteristiche.

   Per decodificare uno stream, VLC prima lo demultiplexa. Ci�
   significa che ne legge il container format e separa audio,
   video e, se presenti, i sottotitoli. Quindi ciascuno di questi
   viene passato ai decoder che effettuano il processo matematico
   per decomprimere gli stream.

   Ci sono alcune considerazioni da fare circa MPEG:

     * MPEG � un codec. Ne esistono diverse versioni, dette
       MPEG-1, MPEG-2, MPEG-4,...
     * MPEG � altres� un container format, talvolta riferito come
       MPEG System. Esistono diversi tipi di MPEG: ES, PS e TS.
       Quando si riproduce un video MPEG da un DVD, per esempio,
       lo stream MPEG risulta in realt� composto da diversi stream
       (detti Stream Elementari, ES): si ha uno stream per il
       video, uno per l'audio, un altro per i sottotitoli, e cos�
       via. Questi stream diversi sono mescolati insieme in un
       unico Program Stream (PS). Dunque, i file .VOB che si
       trovano nei DVD sono in realt� dei file MPEG-PS. Questo
       formato PS non � adatto per� allo streaming video
       attraverso una rete o via satellite, per esempio. A questo
       scopo, un altro formato detto Transport Stream (TS) � stato
       progettato per trasmettere stream MPEG attraverso detti
       canali.
     __________________________________________________________

1.3. Come si pu� usare VideoLAN?

1.3.1. Documentazione

   La documentazione per l'utente di VideoLAN � composta da 4
   documenti.

     * VideoLAN Quickstart. Questo documento fornisce una veloce
       panoramica su VLC, lo streaming in uscita di VLC, la
       soluzione Video On Demand ed il servizio di informazione
       sui canali televisivi.
     * VideoLAN HOWTO. � la guida completa della soluzione di
       streaming VideoLAN.
     * VLC User Guide. � la guida completa per VLC.
     * VLS User Guide. � la guida completa per VLS.
     * VideoLAN FAQ. Contiene le domande frequenti su VideoLAN.

   L'ultima versione di questi documenti si pu� trovare nella
   pagina di documentazione.

   Si pu� altres� guardare la VideoLAN Wiki. � un sito web che
   ciascuno pu� modificare. Viene utilizzato per documentare tutto
   ci� che non � contenuto nella documentazione "ufficiale":
   trucchi e consigli per ciascun S.O., le interfacce grafiche,
   etc...
     __________________________________________________________

1.3.2. Supporto utente

   Nel caso di problemi nell'uso di VideoLAN e se non si trova fra
   la documentazione una risposta ai problemi riscontrati,
   guardare nell'archivio della mailing-list in rete. Ci sono due
   mailing-list in lingua inglese per gli utenti:

     * vlc@videolan.org per domande su VLC;
     * streaming@videolan.org per domande su VLS, mini-SAP-server
       e la rete.

   Nel caso ci si voglia iscrivere o cancellare dalle
   mailing-list, andare sulla pagina delle mailing-list.

   Si possono anche contattare utenti e sviluppatori di VideoLAN
   tramite IRC: server irc.freenode.net, canale #videolan .

   Se si dovesse riscontrare un bug, seguire le istruzioni sulla
   pagina di segnalazione dei bug.
     __________________________________________________________

1.4. Uso dalla riga di comando

     * VLC dispone di diverse interfacce grafiche, organizzate in
       maniera diversa allo scopo di armonizzarsi con le linee
       guida di ciascuno dei sistemi operativi supportati.
       Documentare l'uso di ciascuna di queste interfacce grafiche
       sarebbe troppo lungo e alcune peculiarit� sono disponibili
       solo tramite la riga di comando. Dunque si � deciso di
       documentare solo l'interfaccia a riga di comando, comunque
       nella maggior parte dei casi dovrebbe essere facile intuire
       come utilizzare l'interfaccia grafica per ottenere le
       stesse funzioni.
     * VLS dispone di un'interfaccia a riga di comando e di una di
       tipo telnet, ma di nessuna di tipo grafico.

   Tutti i comandi mostrati in questo documento dovrebbero essere
   eseguiti in un terminale.
     __________________________________________________________

1.4.1. Aprire un terminale

1.4.1.1. Windows

   Premere su Avvio, Esegui ed inserire:

     * cmd Enter(Windows 2000 / XP),
     * command Enter(Windows 95 / 98 / ME).

   Appare il terminale

   Figura 1-2. Terminale Windows

   [terminal-windows.jpg]

   Nota

        Su Windows � necessario trovarsi nella directory dove �
        installato il programma per poterlo eseguire.
     __________________________________________________________

1.4.1.2. Linux / Unix

   Aprire un terminale:

   Figura 1-3. Terminale Linux X

   [terminal-linux.jpg]

   Nella documentazione si adotteranno le seguenti convenzioni per
   i comandi Unix:

     * comandi che dovrebbero essere inseriti come root hanno il
       prompt #:
                                                                #
                                                                comando_
da_inserire_come_root

     * comandi che dovrebbero essere inseriti come un utente
       ordinario hanno il prompt %:
                                                                %
                                                                comando_
da_inserire_come_utente_ordinario
     __________________________________________________________

1.4.1.3. Mac OS X

   Andare su Applicazioni, aprire la cartella Utility ed
   effettuare un doppio click su Terminale:

   Figura 1-4. Terminale Mac OS X

   [terminal-macosx.jpg]

   Nota

        Su Mac OS X � necessario trovarsi nella directory dove �
        installato il programma per poterlo eseguire ed iniziare il
        comando con ./.
     __________________________________________________________

1.4.1.4. BeOS

   Dalla deskbar, andare su Applicazioni e dopo Terminale:

   Figura 1-5. Terminale BeOS

   [terminal-beos.jpg]

   Nota

        Su BeOS � necessario trovarsi nella directory dove � installato
        il programma per poterlo eseguire ed iniziare il comando con
        ./.
     __________________________________________________________

Capitolo 2. Installare il software e l'hardware necessari

2.1. Installare VLC

   I file binari di VLC sono disponibili per molti S.O., ma non
   per tutti quelli supportati. Se non sono disponibili binari per
   il proprio S.O., o se si desidera modificare le impostazioni
   predefinite, � possibile compilare VLC a partire dai file
   sorgenti.
     __________________________________________________________

2.1.1. Windows

   VLC funziona su Windows 95/98/ME/2000/XP. Scaricare il file
   autoestraente dalla pagina di download di VLC per Windows.
   Eseguire il .exe per installare VLC.
     __________________________________________________________

2.1.2. BeOS

   Scaricare il file Zip dalla pagina di download di VLC per BeOS.
   Scompattare il file in una cartella per installare VLC.
     __________________________________________________________

2.1.3. Mac OS X

   Scaricare il pacchetto Mac OS X dalla pagina di download di VLC
   per MacOS X. Effettuare un doppio click sull'icona del
   pacchetto: un'icona apparir� sul Desktop, a destra rispetto
   al(ai) drive. Aprirla e trascinare l'applicazione VLC, dalla
   finestra che ne risulta, nel posto in cui la si vuole
   installare (dovrebbe essere /Applications).
     __________________________________________________________

2.1.4. Debian GNU/Linux

2.1.4.1. Debian stabile (woody)

   Aggiungere le seguenti linee al proprio /etc/apt/sources.list:
deb http://www.videolan.org/pub/videolan/debian $(ARCH)/
                                        deb-src http://www.videolan.org/
pub/videolan/debian sources/

   Dopo, per una normale installazione, dare i comandi:
                                                # apt-get update
                                                # apt-get install gnome-
vlc libdvdcss2
     __________________________________________________________

2.1.4.2. Debian instabile (sid)

   Aggiungere le seguenti linee al proprio /etc/apt/sources.list:
deb http://www.videolan.org/pub/videolan/debian $(ARCH)/
                                        deb-src http://www.videolan.org/
pub/videolan/debian sources/

   Dopo, per una normale installazione, dare i comandi:
                                                # apt-get update
                                                # apt-get install wxvlc
libdvdcss2
     __________________________________________________________

2.1.4.3. Debian testing (sarge)

   Non si dovrebbe usare Debian testing a meno di non sapere
   perfettamente ci� che si sta facendo. � praticamente
   impossibile supportare Debian testing e non ci sono progetti
   per farlo. Per maggiori in formazioni su Debian testing, vedere
   su: pagina testing
     __________________________________________________________

2.1.5. Linux Mandrake

   Sono disponibili pacchetti per Mandrake 9.1 e Cooker.

   Per installarli, aggiungere i seguenti sorgenti sia per
   Mandrake 9.1 sia per Cooker (si pu� usare Easy urpmi): contrib
   dalla distribuzione principale e plf (Penguin Liberation Front)
   dalle aggiunte esterne.

   Quindi installare i pacchetti richiesti con urpmi:
                                        # urpmi libdvdcss2 libdvdplay0 w
xvlc vlc-plugin-a52
                                        vlc-plugin-ogg vlc-plugin-mad
     __________________________________________________________

2.1.6. Linux Redhat

   Scaricare il pacchetto vlc e i pacchetti elencati nella sezione
   librerie richieste e codec (gli altri pacchetti sono solo
   opzionali) dalla pagina di download di VLC per Red Hat e
   metterli tutti nella stessa directory.

   Installare poi i pacchetti RPM scaricati:
                                        # rpm -U *.rpm

   Se non si sono installati tutti i pacchetti RPM inclusi nella
   propria distribuzione, � possibile che il sistema richieda
   prima l'installazione di alcuni di questi.
     __________________________________________________________

2.1.7. Compilare i sorgenti (per ogni altro S.O.)

   Il metodo illustrato di seguito vale per ogni sistema Unix
   supportato da VLC, per il quale non esistano pacchetti
   disponibili. Viene spiegato come compilare ed installare dai
   rispettivi codici sorgenti VLC e le librerie necessarie.

   In questo modo � anche possibile compilare VLC su Linux se si
   vogliono modificare i moduli supportati predefiniti.
     __________________________________________________________

2.1.7.1. Installare le librerie

   Sono necessarie diverse librerie:

     * libdvbpsi (obbligatoria),
     * mpeg2dec (obbligatoria),
     * libdvdcss se si vuole riprodurre DVD criptati,
     * libdvdplay se si vuole avere la navigazione a menu dei DVD,
     * a52dec se si vuole riprodurre il formato audio AC3 (i.e.
       A52) spesso usato nei DVD,
     * ffmpeg, libmad, faad2 se si vuole riprodurre i file MPEG 4
       / DivX,
     * libogg & libvorbis se si vuole riprodurre i file Ogg
       Vorbis.

   Scaricare le librerie dalla pagina di download dei sorgenti di
   VLC.

   Per ciascuna libreria:

     * scompattare:
                                                                % tar xv
zf libreria.tar.gz

       oppure
                                                                % tar xv
jf libreria.tar.bz2

     * configurare:
                                                                % cd lib
reria
                                                                % ./conf
igure

     * compilare ed installare:
                                                                % make
                                                                # make i
nstall

   Verificare che il file di configurazione /etc/ld.so.conf
   contenga la riga seguente:
/usr/local/lib

   Se la riga non � presente, aggiungerla e dopo eseguire (come
   root):
                                                # ldconfig
     __________________________________________________________

2.1.7.2. Installare VLC

   Scaricare il codice sorgente dell'ultima release: prendere il
   file vlc-versione.tar.gz da pagina di download dei sorgenti di
   VLC. Scompattarlo:
                                                % tar xvzf vlc-versione.
tar.gz
                                                % cd vlc-versione

   Per ottenere la lista delle opzioni di configurazione eseguire:
                                                % ./configure --help

   Notare che tutti i moduli sono descritti nella sezione Moduli
   della VLC User Guide.

   Esempi di configurazione molto semplici:

     * se si vuole un VLC basilare, eseguire:
                                                                % ./conf
igure

     * se si vuole l'interfaccia Gnome invece di quella GTK
       (saranno necessari i pacchetti di sviluppo di Gnome):
                                                                % ./conf
igure --enable-gnome

   Dopo, compilare ed installare:
                                                % make
                                                % su
                                                Password:  [Password di
root]
                                                # make install

   Notare che il comando di installazione (make install) non �
   obbligatorio. � possibile eseguire VLC da dove � stato
   compilato.
     __________________________________________________________

2.2. Installare VLS

2.2.1. Windows

   Scaricare il file ZIP dalla pagina di download di VLS per
   Windows, scompattarlo ed eseguire setup.exe.
     __________________________________________________________

2.2.2. GNULinux & Mac OS X

2.2.2.1. Installare le librerie

   Sono necessarie diverse librerie per usi particolari

     * libdvbpsi (sempre necessaria)
     * libdvdcss se si vuole avere accesso a DVD criptati,
     * libdvdread se si vuole effettuare lo stream di DVD,
     * libdvb se si vuole effettuare uno streaming da una scheda
       DVB (una scheda satellitare o TV digitale terrestre).

   Scaricare le librerie dalla pagina di download dei sorgenti di
   VLS.

   Per ciascuna libreria, scompattare, configurare (ad eccezione
   di libdvb che non ha un ./configure), compilare ed installare:
                                                % tar xvzf libreria.tar.
gz
                                                % cd libreria
                                                % ./configure
                                                % make
                                                # make install

   Verificare che il file di configurazione /etc/ld.so.conf
   contenga la riga seguente:
/usr/local/lib

   Se la riga non � presente, aggiungerla e dopo eseguire:
                                                # ldconfig
     __________________________________________________________

2.2.2.2. Installare VLS

   Scaricare i sorgenti dell'ultima release: prendere il file
   vls-versione.tar.gz dalla pagina di download dei sorgenti di
   VLS. Scompattarlo ed eseguire ./configure:
                                                % tar xvzf vls-versione.
tar.gz
                                                % cd vls-versione

   Per ottenere la lista delle opzioni di configurazione eseguire:
                                                % ./configure --help

   Dopo configurare vls:

     * se si vuole una configurazione di base per VLS, senza
       supporto per i DVD, eseguire:
                                                                % ./conf
igure --disable-dvd

     * se si vuole un VLS con supporto per DVD, eseguire:
                                                                % ./conf
igure

     * se si vuole un VLS con supporto DVB, eseguire:
                                                                % ./conf
igure --enable-dvb
                                                                --with-d
vb=PATH_TO_DVB_DRIVERS --with-libdvb=PATH_TO_LIBDVB

   Dopo, compilare ed installare:
                                                % make
                                                # make install

   Si possono anche eseguire i comandi make uninstall, make clean
   oppure make distclean se necessario.
     __________________________________________________________

Capitolo 3. Ricevere e salvare uno stream

3.1. Ricevere uno stream con VLC

3.1.1. Ricevere uno stream unicast

                                        % vlc -vvv udp:
     __________________________________________________________

3.1.2. Ricevere uno stream multicast

                                        % vlc -vvv udp:@239.255.12.42

   dove 239.255.12.42 � l'indirizzo IP multicast a cui ci si vuole
   connettere.
     __________________________________________________________

3.1.3. Ricevere uno stream HTTP/FTP/MMS

   Usare una delle seguenti righe di comando:

     *
                                                        % vlc -vvv http:
//esempio/stream.xyz

       dove http://esempio/stream.xyz � l'indirizzo HTTP dello
       stream;
     *
                                                        % vlc -vvv ftp:/
/esempio/stream.xyz

       dove ftp://esempio/stream.xyz � l'indirizzo FTP dello
       stream;
     *
                                                        % vlc -vvv mms:/
/viptvr.yacast.fr/encoderfranceinfo

       dove mms://viptvr.yacast.fr/encoderfranceinfo � l'indirizzo
       MMS dello stream.
     __________________________________________________________

3.2. Salvare uno stream con VLC

   VLC pu� salvare lo stream sul disco. Per poterlo effettuare,
   usare l'uscita stream di VLC: lo si pu� fare tramite
   l'interfaccia grafica, o si pu� aggiungere alla riga di comando
   il seguente argomento:
                                --sout file/muxer:stream.xyz

   dove:

     * muxer � uno dei formati supportati dall'uscita stream di
       VLC, es.:
          + avi per il formato AVI,
          + ogg per il formato OGG,
          + ps per il formato MPEG2-PS,
          + ts oppure ts_dvbpsi per il formato MPEG2-PS (il
            secondo usa libdvbpsi per lo scopo).
     * e stream.xyz � il nome del file in cui si vuole salvare lo
       stream, con la corretta estensione.
     __________________________________________________________

3.3. Ricevere uno stream con un set-top-box

   Alcuni set-top-box con schede Ethernet possono ricevere stream
   MPEG2-TS tramite UDP e supporto multicast. Questo � il caso dei
   set-top-box Pace e Aminocom. Abbiamo testato il set-top-box
   AmiNET 100 di Aminocom: � grazioso e piccolo e funziona molto
   bene con VideoLAN.
     __________________________________________________________

Capitolo 4. Stream di un file

4.1. Stream di un file con VLC

                                % vlc -vvv video1.xyz --sout udp:192.168
.0.42 --ttl 12

   dove:

     * video1.xyz � il file che si vuole trasmettere in stream,
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + oppure il nome DNS della macchina cui si vuole
            trasmettere in unicast;
          + oppure un indirizzo IP multicast.
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       propri pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).

   Se si vuole trasmettere lo stream ininterrottamente, aggiungere
   l'opzione --loop.
     __________________________________________________________

4.2. Stream di un file con VLS

                                % vls -vv -d udp:192.168.0.42 file:video
1.xyz --ttl 12

   dove:

     * video1.xyz � il file che si vuole trasmettere in stream,
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + oppure il nome DNS della macchina cui si vuole
            trasmettere in unicast;
          + oppure un indirizzo IP multicast.
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       propri pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).

   Quando si vuole fermare VLS, usare la combinazione di tasti
   Ctrl-c.

   Se si vuole trasmettere lo stream ininterrottamente, aggiungere
   l'opzione --loop.

 Nota

         VLS pu� trasmettere in stream file MPEG che rispondono a due
         criteri:

           * il file deve essere MPEG PS (Program Stream) oppure MPEG TS
             (Transport Stream), che contiene video ed audio
             multiplexati. VLS non pu� trasmettere stream MPEG ES
             (Elementary Stream), ad esempio un file con solo audio
             oppure video.
             Per sapere se un file MPEG � un MPEG PS, MPEG TS o MPEG ES,
             riprodurre il file con VLC e leggere i messaggi
             (selezionare il menu Visualizza / Messaggi, oppure usare la
             riga di comando vlc -vvv).
                + Se � presente la riga:
      [00000107] main module debug: using demux module "ts_dvbpsi"

                  significa che il file � un MPEG TS.
                + Se � presente la riga:
      [00000109] main module debug: using demux module "ps"

                  significa che il file � un MPEG PS.
                + Se � presente la riga:
      [00000109] main module debug: using demux module "es"

                  significa che il file � un MPEG ES, VLS non pu�
                  trasmetterlo in stream.
           * La sequence header del video si deve ripetere con
             regolarit�; spesso succede con gli MPEG-2, ma molto
             raramente con gli MPEG-1. Non c'� un modo semplice per
             sapere se la sequence header � ripetuta regolarmente. I
             file con estensione .vob sono normalmente file MPEG-2 ed i
             file con estensione .mpg o .mpeg sono usualmente MPEG-1.

         Si pu� scaricare questo file MPEG-2 PS da trasmettere in stream
         a scopo di test: presentation_short.vob.
     __________________________________________________________

Capitolo 5. Trasmettere in stream un DVD

Nota

     Su Unix/Linux � necessario avere accesso in scrittura al
     dispositivo corrispondente al proprio drive DVD. Per fare ci�,
     bisognerebbe appartenere ai gruppi disk o cdrom (si vedano i
     permessi in /dev). Se non � cos�, aggiungere il proprio utente
     al gruppo:
                                  # adduser login_personale disco_o_cdrom

     e far ripartire la propria sessione.
     __________________________________________________________

5.1. Trasmettere in stream un DVD con VLC

                                % vlc -vvv dvdold:/dev/dvd --sout udp:19
2.168.0.12 --ttl 12

   dove:

     * /dev/dvd � il nome del drive DVD (mettere D: su Windows se
       D � la lettera del drive DVD) oppure la directory dove �
       copiato il DVD;
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).

   Se si vuole trasmettere lo stream DVD continuamente, aggiungere
   l'opzione --loop.
     __________________________________________________________

5.2. Trasmettere in stream un DVD con VLS

   Nota

        Questo � possibile solo su GNU/Linux.
                                % vls -vv -d udp:192.168.0.42 dvd:/dev/d
vd --ttl 12

   dove:

     * /dev/dvd � il nome del drive DVD o della directory dove si
       � copiato il DVD;
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).

   Se si vuole trasmettere lo stream DVD continuamente, aggiungere
   l'opzione --loop.
     __________________________________________________________

Capitolo 6. Trasmettere in stream un canale DVB (satellitare o TV
digitale terrestre)

   Nota

        Questo � possibile solo su GNU/Linux.
     __________________________________________________________

6.1. Installare i driver DVB

   Se si vuole avere la possibilit� di trasmettere in stream da
   una scheda DVB (satellitare o TV digitale terrestre), �
   necessario installare i driver DVB:

     * Se si usa un kernel Linux 2.6.x, serve solo compilare i
       moduli giusti;
     * Se si usa un kernel Linux 2.4.x, � necessario scaricare
       l'ultima versione dei driver DVB dalla pagina di download
       dei driver DVB del Progetto LinuxTV.

   Scompattare il pacchetto e seguire le istruzioni indicate nel
   file INSTALL per compilare ed installare i driver.
     __________________________________________________________

6.2. Trasmettere in stream con VLS

   Salvare nella propria directory home un file .dvbrc contenente
   i canali DVB (satellitari o TV digitale terrestre) che si vuole
   trasmettere in stream (alcuni sono forniti nel pacchetto di
   libdvb per i canali satellitari).

   Eseguire VLS tramite la seguente riga di comando:
                                % vls -vv -d udp:192.168.0.42 dvb:"EUROS
PORT" --ttl 12

   dove:

     * "EUROSPORT" � il canale che si vuole trasmettere in stream
       come descritto nel file ~/.dvbrc;
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).
     __________________________________________________________

6.3. Trasmettere in stream con VLC

   Nota

        Per fare ci�, � necessario usare la versione CVS di VLC e
        compilarla con il comando ./configure --enable-dvb. Questa
        caratteristica dovrebbe ancora essere considerata come
        sperimentale.
                                % vlc -vvv --program 8211 dvb:12597000:0
:3:27500000 --sout udp:192.168.0.12 --ttl 12

   dove:

     * 8211 � il PID del canale DVB che si vuole trasmettere in
       stream, rappresentato in numero decimale;
     * 12597000 � la frequenza del transponder da cui si vuole
       effettuare lo streaming in Hz;
     * 0 � la polarizzazione (0 per quella verticale, 1 per quella
       orizzontale);
     * 3 � il FEC (3 per 3/4, 9 per auto);
     * 27500000 � la frequenza di simbolo del trasponder in Hz;
     * 192.168.0.12 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).
     __________________________________________________________

Capitolo 7. Trasmettere in stream da una scheda di codifica MPEG

   Nota

        Questo � possibile solo su GNU/Linux.

   VideoLAN supporta due schede di codifica MPEG-2:

     * Hauppauge WinTV-PVR-250;
     * Visiontech Kfir.

   La scheda Hauppauge WinTV-PVR-250 offre risultati migliori ed �
   pi� economica della Visiontech Kfir.
     __________________________________________________________

7.1. Trasmettere in stream con la scheda Hauppauge WinTV-PVR-250

7.1.1. Installare i driver

   Per prima cosa � necessario applicare al proprio kernel una
   patch per supportare le API v4l2 (Video 4 Linux versione 2). La
   patch � disponibile su Video4Linux HQ.

   Una volta che il proprio kernel � pronto, installare la
   versione CVS dei driver Linux per la Hauppauge WinTV-PVR-250.
   Questi sono disponibili su ivtv.sourceforge.net. Dopo, sar�
   necessario creare i device e caricare i moduli; per questo,
   fare riferimento alla documentazione fornita con i driver.
     __________________________________________________________

7.1.2. Trasmettere in stream con VLC

   Nota

        Bisogna aggiungere --enable-pvr a ./configure per usare questa
        caratteristica. Si potrebbe cambiare il valore di
        CR_MAX_AVERAGE_COUNTER a 1000 nel file src/input/input_clock.c
        per aggirare un problema con la scheda.
                                        % vlc -vvv pvr:/dev/video0:norm=
secam:size=720x576:frequency=576250:
                                        bitrate=3000000:maxbitrate=40000
00 --sout udp:192.168.0.42 --ttl 12

   dove:

     * /dev/video0 � il device file corrispondente alla scheda di
       codifica;
     * norm=secam � il nome dello standard del segnale analogico
       (i possibili valori sono pal, secam e ntsc);
     * size=720x576 � la dimensione del video che si vuole
       trasmettere in stream;
     * frequency=567250 � la frequenza in kHz del canale che si
       vuole trasmettere in stream;
     * bitrate=3000000 � il bitrate medio dello stream;
     * maxbitrate=4000000 � il bitrate massimo dello stream;
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).
     __________________________________________________________

7.1.3. Trasmettere in stream con VLS

   Al momento non esiste un'interfaccia a riga di comando per
   questo input, dunque sar� necessario usare il file di
   configurazione.

   Non � possibile configurare i parametri dei driver (norm,
   dimensioni, frequenza,bitrate, ecc...) con VLS: per farlo
   bisogner� usare il programma ptune.pl che viene fornito con i
   driver. Riferirsi alla documentazione allegata ai driver per
   informazioni su come usare questo programma.

   Quello che segue � un file vls.cfg di configurazione tipico per
   eseguire VLS con una scheda di codifica Hauppage WinTV-PVR-250:
# vls.cfg (file di configurazione di VLS)
# Esempio del VideoLAN HOWTO per la scheda di codifica Hauppauge WinTV-P
VR-250

BEGIN "Inputs"

        pvr                      = "video"

END

BEGIN "pvr"

        # device Hauppauge WinTV-PVR-250
        Device                          = "/dev/video0"

        # Tipo di Stream
        Type                                    = "Mpeg2-PS"

END

BEGIN "Channels"

        channel1                         = "network"

END

BEGIN "channel1"

        # Indirizzo IP unicast o multicast
        DstHost = "192.168.0.42"

        # Porta di destinazione
        DstPort = "1234"

        # Se � un indirizzo IP multicast IP, scommentare la riga seguent
e
        #Type           = "multicast"

        # Se � un indirizzo IP multicast IP, specificare il "Time To Liv
e" sotto
        #TTL             = "12"

END

BEGIN "LaunchOnStartUp"

        command1 = "start video channel1 pvr"

END

   Una volta adattato il file di configurazione di cui sopra,
   eseguire VLS:
                                        % vls -vv -f vls.cfg
     __________________________________________________________

7.2. Trasmettere in stream con la scheda Visiontech Kfir

7.2.1. Installare i driver

   Se si vuole effettuare uno stream da una scheda Visiontech
   Kfir, � necessario installare i driver per Linux. Scaricare
   l'ultima versione dei driver dalla pagina di download dei
   driver del sito web LinuxTV.

   Scompattare il pacchetto e seguire le istruzioni scritte nel
   file INSTALL per compilare ed installare i driver.

   Nota

        Se si dispone di un chipset VIA, � necessario disabilitare
        l'USB nel BIOS.
     __________________________________________________________

7.2.2. Trasmettere in stream con VLC

                                        % vlc -vvv kfir:/dev/video --sou
t udp:192.168.0.42 --ttl 12

   dove:

     * /dev/video � il device file corrispondente alla scheda
       Kfir;
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).
     __________________________________________________________

7.2.3. Trasmettere in stream con VLS

   Al momento non esiste un'interfaccia a riga di comando per
   questo input, dunque sar� necessario usare il file di
   configurazione.

   Quello che segue � un file vls.cfg di configurazione tipico per
   eseguire VLS con una scheda di codifica VisionTech Kfir:
# vls.cfg (file di configurazione di VLS)
# Esempio del VideoLAN HOWTO per la scheda di codifica Visiontech Kfir

BEGIN "Inputs"

        kfir                     = "video"

END

BEGIN "kfir"

        # device Visiontech Kfir
        Device                          = "/dev/video"

        # Tipo di Stream (il default � "Mpeg2-PS")
        Type                                    = "Mpeg2-PS"

END

BEGIN "Channels"

        channel1                         = "network"

END

BEGIN "channel1"

        # Indirizzo IP unicast o multicast
        DstHost = "192.168.0.42"

        # Porta di destinazione
        DstPort = "1234"

        # Se � un indirizzo IP multicast IP, scommentare la riga seguent
e
        #Type           = "multicast"

        # Se � un indirizzo IP multicast IP, specificare il "Time To Liv
e" sotto
        #TTL             = "12"

END

BEGIN "LaunchOnStartUp"

        command1 = "start video channel1 kfir"

END

   Una volta adattato il file di configurazione di cui sopra,
   eseguire VLS:
                                        % vls -vv -f vls.cfg
     __________________________________________________________

Capitolo 8. Trasmettere in stream da una scheda di acquisizione o da
una webcam

   Nota

        Questo � possibile solo su GNU/Linux.
     __________________________________________________________

8.1. Installare i driver Video per Linux

   Se si vuole avere la possibilit� di trasmettere in stream da
   una scheda di acquisizione o da una webcam, � necessario avere
   disponibile l'apposito driver video4linux. � possibile avere
   qui maggiori informazioni su video4linux e i dispositivi
   supportati.

   Compilare il modulo corretto per il proprio dispositivo ed
   inserirlo nel proprio kernel (alcuni moduli video4linux sono
   distribuiti con i kernel Linux 2.4.x). Si pu� provare il
   proprio dispositivo utilizzando uno qualsiasi dei programmi
   elencati nella sezione Video: TV e PVR/DVR di questa pagina.

   Notare che funzioneranno con VLC anche i moduli v4l2.
     __________________________________________________________

8.2. Trasmettere in stream con VLC

   Nota

        � necessario aggiungere --enable-v4l al ./configure per
        utilizzare questa funzionalit�.
                                % vlc -vvv v4l:/dev/video:norm=secam:fre
quency=543250:size=640x480:channel=0:adev=/dev/dsp:audio=0
                                --sout '#transcode{vcodec=mp4v,acodec=mp
ga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:std{access=udp,mux=ts
,url=239.255.12.13}'
                                --ttl 12

   dove:

     * /dev/video � il device corrispondente alla propria scheda
       di acquisizione o webcam;
     * norm=secam � il nome dello standard del segnale analogico
       (valori possibili sono pal, secam e ntsc);
     * frequency=543250 � la frequenza del canale in kHz
       (attenzione: per VLC < 0.6.1, Frequency � la frequenza del
       canale in MHz moltiplicata per 16);
     * size=640x480 � la dimensione del video richiesta (si pu�
       anche mettere una dimensione standard come subqcif
       (128x96), qsif (160x120), qcif (176x144), sif (320x240),
       cif (352x288) oppure vga (640x480));
     * channel=0 � il numero del canale (tipicamente 0 � per il
       sintonizzatore, 1 per il composito e 2 per svideo);
     * adev=/dev/dsp � il device audio;
     * audio=1 � il numero del canale audio (tipicamente 0 � per
       il mono ed 1 per lo stereo);
     * vcodec=mp4v � il formato video in cui si vuole codificare
       (mp4v � MPEG-4, mpgv � MPEG-1, e vi sono anche h263, DIV1,
       DIV2, DIV3, I420, I422, I444, RV24, YUY2);
     * acodec=mpga � il formato audio in cui si vuole codificare
       (mpga � audio MPEG layer 2, a52 � A52 ovvero suono AC3);
     * vb=3000 � il bitrate video in Kbit/s;
     * ab=256 � il bitrate audio in Kbit/s;
     * vt=800000 � la tolleranza video bitrate in bit/s;
     * keyint=80 � l'intervallo massimo fra due immagini "I"
       espresso in numero di immagini;
     * deinterlace predispone VLC a deinterallacciare il video in
       tempo reale;
     * 192.168.0.42 pu� essere:
          + l'indirizzo IP della macchina cui si vuole trasmettere
            in unicast;
          + il nome DNS della macchina cui si vuole trasmettere in
            unicast;
          + un indirizzo IP multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).
     __________________________________________________________

8.3. Trasmettere in stream con VLS

   Nota

        � necessaria la versione CVS di VLC. Quando la si compila,
        bisogna dare i comandi ./bootstrap e ./configure --enable-v4l
        --with-ffmpeg=PATH (dove PATH � il percorso assoluto della
        directory in cui si � compilato ffmpeg e non il percorso
        relativo).

   Al momento non esiste un'interfaccia a riga di comando per
   questo input, dunque sar� necessario usare il file di
   configurazione.

   Quello che segue � un file vls.cfg di configurazione tipico per
   eseguire VLS con un dispositivo v4l:
# vls.cfg (file di configurazione di VLS)
# Esempio del VideoLAN HOWTO per un dispositivo Video for Linux

BEGIN "Inputs"

        webcam                   = "v4l"

END

BEGIN "webcam"

        # Dispositivo V4L
        Device                          = "/dev/video"

        # Channel Source : Talvolta la webcam � "0"
        #
Scheda TV , potrebbe essere Sintonizzatore(0), Ingresso Composito(1), Sv
ideo(2)
        Channel                  = "0"

        # Norm: PAL=0, NTSC=1, SECAM=2
        Norm                                    = "0"

        # Frequenza del canale in MHz, moltiplicata per 16 (solo per sch
ede con sintonizzatore)
        Frequency                = "7668"

        # Possibili dimensioni sono:
        # - stringa vuota: dimensione predefinita
        # - larghezza x altezza
        # - subQCIF(128x96), QSIF(160x120), QCIF(176x144), SIF(320x240),
        #        CIF(352x288), VGA (640x480)
        Size                                    = ""

        # Deinterallacciamento: "0" = no ; "1" = yes
        DeInterlace      = "0"

        # Formato di compressione Video: "mpeg1" o "mpeg4"
        Compression      = "mpeg4"

        # Video bitrate (approssimativamente) in Kbps
        Bitrate                  = "500"

        # Qualit�: "1.0" (buona) to "31.0" (cattiva)
        Quality                  = "1.0"

        # Dispositivo audio
        AudioDevice      = "/dev/dsp"

        # Formato di compressione audio: "mp2", "mp3" o "ogg"
        AudioCompression = "mp2"

        # Audio bitrate in Kpbs
        AudioBitrate    = "64"

        # Frequenza audio ("16000", "22050", "24000", "32000", "44100" o
 "48000")
        AudioFreq                = "16000"

        # Canale audio: "1" = mono ; "2" = stereo
        AudioChannel    = "2"

END

BEGIN "Channels"

        channel1                         = "network"

END

BEGIN "channel1"

        # Indirizzo IP unicast o multicast
        DstHost = "192.168.0.42"

        # Porta di destinazione
        DstPort = "1234"

        # Se � un indirizzo IP multicast IP, scommentare la riga seguent
e
        #Type           = "multicast"

        # Se � un indirizzo IP multicast IP, specificare il "Time To Liv
e" sotto
        #TTL             = "12"

END

BEGIN "LaunchOnStartUp"

        command1 = "start video channel1 webcam"

END

   Una volta adattato il file di configurazione di cui sopra,
   eseguire VLS:
                                % vls -vv -f vls.cfg
     __________________________________________________________

Capitolo 9. Uso avanzato dello streaming in uscita di VLC
(transcodifica, streaming multiplo, ecc...)

9.1. Sintassi

   Riferirsi al capitolo Command line interface guida utente di
   VLC per imparare la sintassi dello streaming in uscita di VLC.
   Si pu� trovare la guida utente di VLC alla pagina di
   documentazione.
     __________________________________________________________

9.2. Esempi

9.2.1. Transcodifica

   Transcodificare lo stream in ingresso ed inviarlo ad un
   indirizzo IP multicast con l'annuncio SAP associato:
                                        % vlc -vvv input_stream --sout '
#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:
                                        standard{access=udp,mux=ts,url=2
39.255.12.42,sap=TestStream}'

   Visualizzare lo stream in ingresso, transcodificarlo ed
   inviarlo ad un indirizzo IP multicast con l'annuncio SAP
   associato:
                                        % vlc -vvv input_stream --sout '
#duplicate{dst=display,dst=
                                        "transcode{vcodec=mp4v,acodec=mp
ga,vb=800,ab=128,deinterlace}:
                                        standard{access=udp,mux=ts,url=2
39.255.12.42,sap=TestStream}"}'

   Transcodificare lo stream in ingresso, visualizzare lo stream
   transcodificato ed inviarlo ad un indirizzo IP multicast con
   l'annuncio SAP associato:
                                        % vlc -vvv input_stream --sout '
#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:
                                        duplicate{dst=display,dst=standa
rd{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}}'
     __________________________________________________________

9.2.2. Streaming multiplo

   Inviare uno stream ad un indirizzo IP multicast e ad un
   indirizzo IP unicast:
                                        % vlc -vvv input_stream --sout '
#duplicate{dst=
                                        standard{access=udp,mux=ts,url=2
39.255.12.42,sap=TestStream},
                                        dst=standard{access=udp,mux=ts,u
rl=192.168.1.2}}'

   Visualizzare lo stream ed inviarlo a due indirizzi IP unicast:
                                        % vlc -vvv input_stream --sout '
#duplicate{dst=display,dst=
                                        standard{access=udp,mux=ts,url=1
92.168.1.12},
                                        dst=standard{access=udp,mux=ts,u
rl=192.168.1.42}}'
     __________________________________________________________

9.2.3. Transcodifica e streaming multipli

   Transcodificare lo stream in ingresso, visualizzare lo stream
   transcodificato ed inviarlo ad un indirizzo IP multicast con
   l'associato annuncio SAP e ad un indirizzo IP unicast:
                                        % vlc -vvv input_stream --sout '
#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:
                                        duplicate{dst=display,dst=standa
rd{access=udp,mux=ts,url=239.255.12.42,sap=TestStream},
                                        dst=standard{access=udp,mux=ts,u
rl=192.168.1.2}}'

   Visualizzare lo stream in ingresso, transcodificarlo ed
   inviarlo a due indirizzi IP unicast:
                                        % vlc -vvv input_stream --sout '
#duplicate{dst=display,
                                        dst="transcode{vcodec=mp4v,acode
c=mpga,vb=800,ab=128}:
                                        duplicate{dst=standard{access=ud
p,mux=ts,url=192.168.1.2},
                                        dst=standard{access=udp,mux=ts,u
rl=192.168.1.12}"}'

   Inviare lo stream in ingresso ad un indirizzo IP multicast e lo
   stream transcodificato ad un altro indirizzo IP multicast con
   l'associato annuncio SAP:
                                        % vlc -vvv input_stream --sout '
#duplicate{dst=
                                        standard{access=udp,mux=ts,url=2
39.255.1.2,sap=OriginalStream},
                                        dst="transcode{vcodec=mp4v,acode
c=mpga,vb=800,ab=128}:
                                        standard{access=udp,mux=ts,url=2
39.255.1.3,sap=TranscodedStream}"}'
     __________________________________________________________

9.2.4. Streaming via HTTP

   Trasmettere uno stream via HTTP:

     * eseguire sul server:
                                                        % vlc -vvv input
_stream
                                                        --sout '#standar
d{access=http,mux=ogg,url=server.example.org:8080}'

     * eseguire sul(i) client:
                                                        % vlc http://ser
ver.example.org:8080

   Transcodificare e trasmettere uno stream via HTTP:
                                        % vlc -vvv input_stream --sout '
#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:
                                        standard{access=http,mux=ogg,url
=server.example.org:8080}'

   Per esempio, se si vuole inviare in stream un CD audio in
   Ogg/Vorbis via HTTP:
                                        % vlc -vvv cdda:/dev/cdrom --sou
t '#transcode{acodec=vorb,ab=128}:
                                        standard{access=http,mux=ogg,url
=server.example.org:8080}'
     __________________________________________________________

9.2.5. Utilizzare il modulo es

   Separare audio e video in due file PS:
                                        % vlc -vvv input_stream --sout
                                        '#es{access=file,mux=ps,url_audi
o=audio-%c.%m,url_video=video-%c.%m}'

   Estrarre la traccia audio dello stream in ingresso su un file
   TS:
                                        % vlc -vvv input_stream
                                        --sout '#es{access_audio=file,mu
x_audio=ts,url_audio=audio-%c.%m}'

   Trasmettere con uno stream in unicast la traccia audio su una
   porta e la traccia video su un'altra porta:

     * sul lato server:
                                                        % vlc -vvv input
_stream --sout
                                                        '#es{access=rtp,
mux=ts,url_audio=192.168.1.2:1212,url_video=192.168.1.2:1213}'

     * sul lato client, per ricevere l'audio:
                                                        % vlc udp:@:1212

       per ricevere il video:
                                                        % vlc udp:@:1213

   Trasmettere in multicast il video e salvare l'audio su un file.
                                        % vlc -vvv input_stream --sout '
#es{access_video=udp,mux_video=ts,url_video=239.255.12.42,
                                        access_audio=file,mux_audio=ps,u
rl_audio=audio-%c.%m}'

   Nota

        Si pu� anche combinare il modulo es con gli altri moduli per
        predisporre soluzioni anche pi� complesse.
     __________________________________________________________

Capitolo 10. Stream in IPv6

10.1. Stream in IPv6

   Nota

        � necessario avere un sistema operativo IPv6 compatibile, come
        Linux 2.4.21 con il modulo ipv6 caricato, Windows XP Service
        Pack 1 o Mac OS X versione 10.2 o superiore. Si vedano le
        pagine delle caratteristiche sul sito web Videolan per avere
        informazioni sullo stato di IPv6 in VLC e VLS per ciascun S.O.

   Avvertimento

   Se si utilizza VMware su Linux, sar� necessario arrestare
   VMware e scaricare i moduli del kernel VMware, poich� questi
   impediscono lo streaming IPv6.
     __________________________________________________________

10.1.1. Trasmettere in stream con VLC

                                        % vlc -vvv video1.xyz --ipv6 --s
out udp:[ff08::1] --ttl 12

   dove:

     * video1.xyz � il file che si vuole trasmettere in stream (si
       pu� anche specificare dvdold:/dev/dvd per trasmettere in
       stream un DVD o qualunque altra configurazione di input);
     * ff08::1 pu� essere:
          + l'indirizzo IPv6 della macchina cui si vuole
            trasmettere in unicast;
          + un indirizzo IPv6 multicast;
     * 12 � il valore del TTL (Time To Live - Tempo di vita) dei
       pacchetti IP (ovvero lo stream sar� in grado di
       attraversare 11 router).

Nota

        Su Unix/Linux, potrebbe essere necessario proteggere le
        parentesi quadre che racchiudono l'indirizzo IPv6:
                                                     % vlc -vvv video1.xyz --
     ipv6 --sout udp:\[ff08::1\] --ttl 12

Nota

        Potrebbe essere necessario specificare l'interfaccia di rete in
        uscita:
                                                     % vlc -vvv video1.xyz --
     ipv6 --sout udp:[ff08::1%eth0] --ttl 12

        dove eth0 � il nome dell'interfaccia di rete (su Linux le
        interfacce di rete sono nominate ethX, su Mac OS � enX e su
        Windowx � X, dove X � il relativo numero).
     __________________________________________________________

10.1.2. Trasmettere in streaming con VLS

   Sar� necessario usare il file di configurazione vls.cfg. Si
   veda la Guida utente di VLS per sapere come scriverne uno per
   lo streaming in IPv6 unicast o multicast.
     __________________________________________________________

10.2. Ricevere in IPv6

10.2.1. Ricevere uno stream unicast

                                        % vlc -vvv --ipv6 udp:
     __________________________________________________________

10.2.2. Ricevere uno stream multicast

                                        % vlc -vvv --ipv6 udp:@[ff08::1]

Nota

        Su Unix/Linux, potrebbe essere necessario proteggere le le
        parentesi quadre che racchiudono l'indirizzo IPv6:
                                                     % vlc -vvv --ipv6 udp:@\
     [ff08::1\]

Nota

        Potrebbe essere necessario specificare l'interfaccia di rete in
        uscita:
                                                     % vlc -vvv video1.xyz --
     ipv6 --sout udp:[ff08::1%eth0] --ttl 12

        dove eth0 � il nome dell'interfaccia di rete (su Linux le
        interfacce di rete sono nominate ethX, su Mac OS � enX e su
        Windowx � X, dove X � il relativo numero).
     __________________________________________________________

Capitolo 11. Video On Demand

11.1. Panoramica

   Tramite il Video On Demand (VOD), l'utente pu� iniziare il
   video quando lo desidera, metterlo in pausa, andare avanti e
   indietro nel video. Questo naturalmente � ci� che di meglio si
   pu� avere per lo streaming video e il sogno per ogni utente.

   Il VOD � un gran divoratore di risorse per il server e la rete.
   Il VOD � unicast, non multicast: questo vuol dire che le
   risorse necessarie della rete e del server sono direttamente
   proporzionali al numero dei client.

   La progettazione della soluzione VOD di VideLAN � molto
   semplice. L'idea � di fare uno streaming HTTP, cio� trasmettere
   uno stream MPEG video incapsulato in HTTP. La regolazione del
   bitrate fra il client ed il server � effettuata automaticamente
   dal TCP. Con la versione 1.1 di HTTP, si ha la possibilit� di
   effettuare il seeking in un file scaricato, questo
   effettivamente accade quando si effettua il seeking in un
   video.
     __________________________________________________________

11.2. Sul lato server

   Sul server VOD, � necessario eseguire un Web server. Per
   esempio si pu� usare un server Linux che esegue Apache. Anche
   altri sistemi operativi ed altri Web server dovrebbero
   ugualmente funzionare, ma non � mai stato provato.

   Rendere disponibili i propri file MPEG-1, MPEG-2 or MPEG-4 /
   DivX ai client sul Web server.

   Per esempio, si consideri un Web server il cui nome DNS �
   localserver. Su questo server, si metta un file MPEG video1.mpg
   che sar� disponibile ai client alla URL
   http://localserver/video1.mpg.
     __________________________________________________________

11.3. Sul lato client

                                % vlc -vvv http://localserver/video1.mpg

   VLC inizia a leggere lo stream quasi immediatamente e si pu�
   effettuare il seeking nello stream, andare in pausa, ecc...
   come se lo stream fosse un file locale.
     __________________________________________________________

Capitolo 12. Aggiungere un servizio di informazione sui canali

   Digitare indirizzi multicast non � cosa molto divertente, ecco
   perch� c'� bisogno di un servizio di informazione sui canali.
   VideoLAN ha implementato un servizio di informazione sui canali
   basato sullo standard SAP/SDP. Gli annunci SAP sui programmi in
   multicast sono inviati sulla rete (per mezzo dell'indirizzo
   multicast 224.2.127.254 riservato allo scopo). Sul lato client,
   VLC riceve questi annunci e aggiunge automaticamente i
   programmi annunciati alla propria playlist.

   VLC pu� inviare gli annunci SAP associati ai programmi che sta
   trasmettendo in streaming. VLS invece non pu� farlo, ma un
   programma indipendente, il mini-SAP-server, pu� inviare gli
   annunci per i programmi trasmessi da VLS.
     __________________________________________________________

12.1. Inviare annunci mentre si effettua uno streaming con VLC

   Per inviare annunci con VLC, � necessario usare la complessa
   sintassi per lo stream in uscita di VLC, per esempio:
                                % vlc -vvv input_stream --sout
                                '#standard{access=udp,url=239.255.12.42,
sap="Test Stream"}' --ttl 12

   dove video1.xyz � il file che si intende trasmettere in stream,
   239.255.12.42 � l'indirizzo IP multicast a cui si vuole
   trasmettere lo stream, Test Stream � il nome che sar� usato per
   questo programma negli annunci SAP e 12 � il valore del TTL
   (Time To Live, Tempo di vita) dello stream e degli annunci SAP.

   Per effettuare gli annunci SAP in IPv6, semplicemente
   aggiungere l'opzione sap_ipv=6:
                                % vlc -vvv input_stream --sout
                                '#standard{access=udp,url=239.255.12.42,
sap="Test Stream",sap_ipv=6}' --ttl 12
     __________________________________________________________

12.2. Inviare annunci per i programmi trasmessi in stream da VLS
tramite il mini-SAP-server

   Nota

        Il mini-SAP-server � disponibile solamente per Linux e Mac OSX.
     __________________________________________________________

12.2.1. Installare il mini-SAP-server

   Scaricare l'ultima versione del mini-SAP-server dalla pagina di
   download per lo streaming.

   Installarlo:
                                        % tar xvzf miniSAPserver-version
e.tar.gz
                                        % cd miniSAPserver-versione
                                        % ./configure (se la versione �
>= 0.2.3)
                                        % make
     __________________________________________________________

12.2.2. Configurare il mini-SAP-server

   Modificare il file di configurazione sap.cfg distribuito con il
   pacchetto. Questo dovrebbe contenere una sezione globale con il
   tempo di vita (Time To Live, TTL) e la versione IP (IPv4 o
   IPv6) usata per gli annunci SAP ed una sezione per i programmi
   annunciati. Utilizzare i commenti per la comprensione di
   ciascun parametro.

   L'opzione Time To Live indica il massimo numero di router che i
   pacchetti degli annunci SAP possono attraversare prima di
   essere rilasciati.
     __________________________________________________________

12.2.3. Eseguire il mini-SAP-server

   Avviare il mini-SAP-server:
                                        % ./sapserver -c sap.cfg

   Se si intende eseguire il mini-SAP-server in background, usare
   l'opzione -d nella riga di comando. Per esempio:
                                        % ./sapserver -d -c sap.cfg

   Si pu� omettere l'opzione -c se il proprio file di
   configurazione � /etc/sap.cfg.
     __________________________________________________________

12.3. Avviare VLC sul(i) client

     * Se gli annunci sono inviati in IPv4:
                                                % vlc -vvv --extraintf s
ap

     * Se gli annunci sono inviati in IPv6:
                                                % vlc -vvv --extraintf s
ap --sap-ipv6

   Aprire la playlist: dovrebbe essere possibile vedere i nomi dei
   programmi annunciati in SAP. Quando si effettua un doppio click
   sul nome di un programma, VLC si registrer� all'indirizzo
   multicast ed inizier� a riprodurre lo stream.
     __________________________________________________________

Appendice A. GNU Free Documentation License

Version 1.2, November 2002

   Version 1.2, November 2002

     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.
     __________________________________________________________

A.1. PREAMBLE

   The purpose of this License is to make a manual, textbook, or
   other functional and useful document "free" in the sense of
   freedom: to assure everyone the effective freedom to copy and
   redistribute it, with or without modifying it, either
   commercially or noncommercially. Secondarily, this License
   preserves for the author and publisher a way to get credit for
   their work, while not being considered responsible for
   modifications made by others.

   This License is a kind of "copyleft", which means that
   derivative works of the document must themselves be free in the
   same sense. It complements the GNU General Public License,
   which is a copyleft license designed for free software.

   We have designed this License in order to use it for manuals
   for free software, because free software needs free
   documentation: a free program should come with manuals
   providing the same freedoms that the software does. But this
   License is not limited to software manuals; it can be used for
   any textual work, regardless of subject matter or whether it is
   published as a printed book. We recommend this License
   principally for works whose purpose is instruction or
   reference.
     __________________________________________________________

A.2. APPLICABILITY AND DEFINITIONS

   This License applies to any manual or other work, in any
   medium, that contains a notice placed by the copyright holder
   saying it can be distributed under the terms of this License.
   Such a notice grants a world-wide, royalty-free license,
   unlimited in duration, to use that work under the conditions
   stated herein. The "Document", below, refers to any such manual
   or work. Any member of the public is a licensee, and is
   addressed as "you". You accept the license if you copy, modify
   or distribute the work in a way requiring permission under
   copyright law.

   A "Modified Version" of the Document means any work containing
   the Document or a portion of it, either copied verbatim, or
   with modifications and/or translated into another language.

   A "Secondary Section" is a named appendix or a front-matter
   section of the Document that deals exclusively with the
   relationship of the publishers or authors of the Document to
   the Document's overall subject (or to related matters) and
   contains nothing that could fall directly within that overall
   subject. (Thus, if the Document is in part a textbook of
   mathematics, a Secondary Section may not explain any
   mathematics). The relationship could be a matter of historical
   connection with the subject or with related matters, or of
   legal, commercial, philosophical, ethical or political position
   regarding them.

   The "Invariant Sections" are certain Secondary Sections whose
   titles are designated, as being those of Invariant Sections, in
   the notice that says that the Document is released under this
   License. If a section does not fit the above definition of
   Secondary then it is not allowed to be designated as Invariant.
   The Document may contain zero Invariant Sections. If the
   Document does not identify any Invariant Sections then there
   are none.

   The "Cover Texts" are certain short passages of text that are
   listed, as Front-Cover Texts or Back-Cover Texts, in the notice
   that says that the Document is released under this License. A
   Front-Cover Text may be at most 5 words, and a Back-Cover Text
   may be at most 25 words.

   A "Transparent" copy of the Document means a machine-readable
   copy, represented in a format whose specification is available
   to the general public, that is suitable for revising the
   document straightforwardly with generic text editors or (for
   images composed of pixels) generic paint programs or (for
   drawings) some widely available drawing editor, and that is
   suitable for input to text formatters or for automatic
   translation to a variety of formats suitable for input to text
   formatters. A copy made in an otherwise Transparent file format
   whose markup, or absence of markup, has been arranged to thwart
   or discourage subsequent modification by readers is not
   Transparent. An image format is not Transparent if used for any
   substantial amount of text. A copy that is not "Transparent" is
   called "Opaque".

   Examples of suitable formats for Transparent copies include
   plain ASCII without markup, Texinfo input format, LaTeX input
   format, SGML or XML using a publicly available DTD, and
   standard-conforming simple HTML, PostScript or PDF designed for
   human modification. Examples of transparent image formats
   include PNG, XCF and JPG. Opaque formats include proprietary
   formats that can be read and edited only by proprietary word
   processors, SGML or XML for which the DTD and/or processing
   tools are not generally available, and the machine-generated
   HTML, PostScript or PDF produced by some word processors for
   output purposes only.

   The "Title Page" means, for a printed book, the title page
   itself, plus such following pages as are needed to hold,
   legibly, the material this License requires to appear in the
   title page. For works in formats which do not have any title
   page as such, "Title Page" means the text near the most
   prominent appearance of the work's title, preceding the
   beginning of the body of the text.

   A section "Entitled XYZ" means a named subunit of the Document
   whose title either is precisely XYZ or contains XYZ in
   parentheses following text that translates XYZ in another
   language. (Here XYZ stands for a specific section name
   mentioned below, such as "Acknowledgements", "Dedications",
   "Endorsements", or "History".) To "Preserve the Title" of such
   a section when you modify the Document means that it remains a
   section "Entitled XYZ" according to this definition.

   The Document may include Warranty Disclaimers next to the
   notice which states that this License applies to the Document.
   These Warranty Disclaimers are considered to be included by
   reference in this License, but only as regards disclaiming
   warranties: any other implication that these Warranty
   Disclaimers may have is void and has no effect on the meaning
   of this License.
     __________________________________________________________

A.3. VERBATIM COPYING

   You may copy and distribute the Document in any medium, either
   commercially or noncommercially, provided that this License,
   the copyright notices, and the license notice saying this
   License applies to the Document are reproduced in all copies,
   and that you add no other conditions whatsoever to those of
   this License. You may not use technical measures to obstruct or
   control the reading or further copying of the copies you make
   or distribute. However, you may accept compensation in exchange
   for copies. If you distribute a large enough number of copies
   you must also follow the conditions in section 3.

   You may also lend copies, under the same conditions stated
   above, and you may publicly display copies.
     __________________________________________________________

A.4. COPYING IN QUANTITY

   If you publish printed copies (or copies in media that commonly
   have printed covers) of the Document, numbering more than 100,
   and the Document's license notice requires Cover Texts, you
   must enclose the copies in covers that carry, clearly and
   legibly, all these Cover Texts: Front-Cover Texts on the front
   cover, and Back-Cover Texts on the back cover. Both covers must
   also clearly and legibly identify you as the publisher of these
   copies. The front cover must present the full title with all
   words of the title equally prominent and visible. You may add
   other material on the covers in addition. Copying with changes
   limited to the covers, as long as they preserve the title of
   the Document and satisfy these conditions, can be treated as
   verbatim copying in other respects.

   If the required texts for either cover are too voluminous to
   fit legibly, you should put the first ones listed (as many as
   fit reasonably) on the actual cover, and continue the rest onto
   adjacent pages.

   If you publish or distribute Opaque copies of the Document
   numbering more than 100, you must either include a
   machine-readable Transparent copy along with each Opaque copy,
   or state in or with each Opaque copy a computer-network
   location from which the general network-using public has access
   to download using public-standard network protocols a complete
   Transparent copy of the Document, free of added material. If
   you use the latter option, you must take reasonably prudent
   steps, when you begin distribution of Opaque copies in
   quantity, to ensure that this Transparent copy will remain thus
   accessible at the stated location until at least one year after
   the last time you distribute an Opaque copy (directly or
   through your agents or retailers) of that edition to the
   public.

   It is requested, but not required, that you contact the authors
   of the Document well before redistributing any large number of
   copies, to give them a chance to provide you with an updated
   version of the Document.
     __________________________________________________________

A.5. MODIFICATIONS

   You may copy and distribute a Modified Version of the Document
   under the conditions of sections 2 and 3 above, provided that
   you release the Modified Version under precisely this License,
   with the Modified Version filling the role of the Document,
   thus licensing distribution and modification of the Modified
   Version to whoever possesses a copy of it. In addition, you
   must do these things in the Modified Version:

    A. Use in the Title Page (and on the covers, if any) a title
       distinct from that of the Document, and from those of
       previous versions (which should, if there were any, be
       listed in the History section of the Document). You may use
       the same title as a previous version if the original
       publisher of that version gives permission.
    B. List on the Title Page, as authors, one or more persons or
       entities responsible for authorship of the modifications in
       the Modified Version, together with at least five of the
       principal authors of the Document (all of its principal
       authors, if it has fewer than five), unless they release
       you from this requirement.
    C. State on the Title page the name of the publisher of the
       Modified Version, as the publisher.
    D. Preserve all the copyright notices of the Document.
    E. Add an appropriate copyright notice for your modifications
       adjacent to the other copyright notices.
    F. Include, immediately after the copyright notices, a license
       notice giving the public permission to use the Modified
       Version under the terms of this License, in the form shown
       in the Addendum below.
    G. Preserve in that license notice the full lists of Invariant
       Sections and required Cover Texts given in the Document's
       license notice.
    H. Include an unaltered copy of this License.
    I. Preserve the section Entitled "History", Preserve its
       Title, and add to it an item stating at least the title,
       year, new authors, and publisher of the Modified Version as
       given on the Title Page. If there is no section Entitled
       "History" in the Document, create one stating the title,
       year, authors, and publisher of the Document as given on
       its Title Page, then add an item describing the Modified
       Version as stated in the previous sentence.
    J. Preserve the network location, if any, given in the
       Document for public access to a Transparent copy of the
       Document, and likewise the network locations given in the
       Document for previous versions it was based on. These may
       be placed in the "History" section. You may omit a network
       location for a work that was published at least four years
       before the Document itself, or if the original publisher of
       the version it refers to gives permission.
    K. For any section Entitled "Acknowledgements" or
       "Dedications", Preserve the Title of the section, and
       preserve in the section all the substance and tone of each
       of the contributor acknowledgements and/or dedications
       given therein.
    L. Preserve all the Invariant Sections of the Document,
       unaltered in their text and in their titles. Section
       numbers or the equivalent are not considered part of the
       section titles.
    M. Delete any section Entitled "Endorsements". Such a section
       may not be included in the Modified Version.
    N. Do not retitle any existing section to be Entitled
       "Endorsements" or to conflict in title with any Invariant
       Section.
    O. Preserve any Warranty Disclaimers.

   If the Modified Version includes new front-matter sections or
   appendices that qualify as Secondary Sections and contain no
   material copied from the Document, you may at your option
   designate some or all of these sections as invariant. To do
   this, add their titles to the list of Invariant Sections in the
   Modified Version's license notice. These titles must be
   distinct from any other section titles.

   You may add a section Entitled "Endorsements", provided it
   contains nothing but endorsements of your Modified Version by
   various parties--for example, statements of peer review or that
   the text has been approved by an organization as the
   authoritative definition of a standard.

   You may add a passage of up to five words as a Front-Cover
   Text, and a passage of up to 25 words as a Back-Cover Text, to
   the end of the list of Cover Texts in the Modified Version.
   Only one passage of Front-Cover Text and one of Back-Cover Text
   may be added by (or through arrangements made by) any one
   entity. If the Document already includes a cover text for the
   same cover, previously added by you or by arrangement made by
   the same entity you are acting on behalf of, you may not add
   another; but you may replace the old one, on explicit
   permission from the previous publisher that added the old one.

   The author(s) and publisher(s) of the Document do not by this
   License give permission to use their names for publicity for or
   to assert or imply endorsement of any Modified Version.
     __________________________________________________________

A.6. COMBINING DOCUMENTS

   You may combine the Document with other documents released
   under this License, under the terms defined in section 4 above
   for modified versions, provided that you include in the
   combination all of the Invariant Sections of all of the
   original documents, unmodified, and list them all as Invariant
   Sections of your combined work in its license notice, and that
   you preserve all their Warranty Disclaimers.

   The combined work need only contain one copy of this License,
   and multiple identical Invariant Sections may be replaced with
   a single copy. If there are multiple Invariant Sections with
   the same name but different contents, make the title of each
   such section unique by adding at the end of it, in parentheses,
   the name of the original author or publisher of that section if
   known, or else a unique number. Make the same adjustment to the
   section titles in the list of Invariant Sections in the license
   notice of the combined work.

   In the combination, you must combine any sections Entitled
   "History" in the various original documents, forming one
   section Entitled "History"; likewise combine any sections
   Entitled "Acknowledgements", and any sections Entitled
   "Dedications". You must delete all sections Entitled
   "Endorsements".
     __________________________________________________________

A.7. COLLECTIONS OF DOCUMENTS

   You may make a collection consisting of the Document and other
   documents released under this License, and replace the
   individual copies of this License in the various documents with
   a single copy that is included in the collection, provided that
   you follow the rules of this License for verbatim copying of
   each of the documents in all other respects.

   You may extract a single document from such a collection, and
   distribute it individually under this License, provided you
   insert a copy of this License into the extracted document, and
   follow this License in all other respects regarding verbatim
   copying of that document.
     __________________________________________________________

A.8. AGGREGATION WITH INDEPENDENT WORKS

   A compilation of the Document or its derivatives with other
   separate and independent documents or works, in or on a volume
   of a storage or distribution medium, is called an "aggregate"
   if the copyright resulting from the compilation is not used to
   limit the legal rights of the compilation's users beyond what
   the individual works permit. When the Document is included an
   aggregate, this License does not apply to the other works in
   the aggregate which are not themselves derivative works of the
   Document.

   If the Cover Text requirement of section 3 is applicable to
   these copies of the Document, then if the Document is less than
   one half of the entire aggregate, the Document's Cover Texts
   may be placed on covers that bracket the Document within the
   aggregate, or the electronic equivalent of covers if the
   Document is in electronic form. Otherwise they must appear on
   printed covers that bracket the whole aggregate.
     __________________________________________________________

A.9. TRANSLATION

   Translation is considered a kind of modification, so you may
   distribute translations of the Document under the terms of
   section 4. Replacing Invariant Sections with translations
   requires special permission from their copyright holders, but
   you may include translations of some or all Invariant Sections
   in addition to the original versions of these Invariant
   Sections. You may include a translation of this License, and
   all the license notices in the Document, and any Warrany
   Disclaimers, provided that you also include the original
   English version of this License and the original versions of
   those notices and disclaimers. In case of a disagreement
   between the translation and the original version of this
   License or a notice or disclaimer, the original version will
   prevail.

   If a section in the Document is Entitled "Acknowledgements",
   "Dedications", or "History", the requirement (section 4) to
   Preserve its Title (section 1) will typically require changing
   the actual title.
     __________________________________________________________

A.10. TERMINATION

   You may not copy, modify, sublicense, or distribute the
   Document except as expressly provided for under this License.
   Any other attempt to copy, modify, sublicense or distribute the
   Document is void, and will automatically terminate your rights
   under this License. However, parties who have received copies,
   or rights, from you under this License will not have their
   licenses terminated so long as such parties remain in full
   compliance.
     __________________________________________________________

A.11. FUTURE REVISIONS OF THIS LICENSE

   The Free Software Foundation may publish new, revised versions
   of the GNU Free Documentation License from time to time. Such
   new versions will be similar in spirit to the present version,
   but may differ in detail to address new problems or concerns.
   See http://www.gnu.org/copyleft/.

   Each version of the License is given a distinguishing version
   number. If the Document specifies that a particular numbered
   version of this License "or any later version" applies to it,
   you have the option of following the terms and conditions
   either of that specified version or of any later version that
   has been published (not as a draft) by the Free Software
   Foundation. If the Document does not specify a version number
   of this License, you may choose any version ever published (not
   as a draft) by the Free Software Foundation.
     __________________________________________________________

A.12. ADDENDUM: How to use this License for your documents

   To use this License in a document you have written, include a
   copy of the License in the document and put the following
   copyright and license notices just after the title page:

     Copyright (c) YEAR YOUR NAME. Permission is granted to copy,
     distribute and/or modify this document under the terms of
     the GNU Free Documentation License, Version 1.2 or any later
     version published by the Free Software Foundation; with no
     Invariant Sections, no Front-Cover Texts, and no Back-Cover
     Texts. A copy of the license is included in the section
     entitled "GNU Free Documentation License".

   If you have Invariant Sections, Front-Cover Texts and
   Back-Cover Texts, replace the "with...Texts." line with this:

     with the Invariant Sections being LIST THEIR TITLES, with
     the Front-Cover Texts being LIST, and with the Back-Cover
     Texts being LIST.

   If you have Invariant Sections without Cover Texts, or some
   other combination of the three, merge those two alternatives to
   suit the situation.

   If your document contains nontrivial examples of program code,
   we recommend releasing these examples in parallel under your
   choice of free software license, such as the GNU General Public
   License, to permit their use in free software.