New Wiki

If all you want to do is stream some video over a LAN, an impromptu method not too hard to set up is using vlc ( "Video LAN Client", http://www.videolan.org). It functions as both a standalone video application, as well as both client and server. These notes will be about setting it up as an impromptu server to stream TV reception over a LAN.

See close to the end for advantages of vlc.

On Ubuntu systems, you can add to the file /etc/apt/sources.list:

deb http://www.videolan.org/pub/videolan/ubuntu dapper universe deb-src http://www.videolan.org/pub/videolan/ubuntu dapper universe

and you should be able to 'apt-get update && apt-get upgrade' cleanly (at least as far as videolan.org goes), to add information on software from these sources to your .deb packages repositories. (documented off of 'http://www.videolan.org/vlc/') I found that the version native to 'dapper' Ubuntu was either not up to date or compiled with less then the needed capabilities for these notes. An alternative to this install process might be to install 'automatix' and work from there, but I haven't tried that.

Then simply

#apt-get install vlc

or however you chose to do the .Debian install of 'vlc'. Instructions on how to install for other Operating Systems can be found at

http://www.videolan.org/doc/play-howto/en/play-howto-en.html

Now it's installed, fire up X, get to a command shell X-console and enter something like:

$vlc -vvv pvr:/dev/video0:channel=0:norm=ntsc:size=320x240:frequency=555250

and it should start playing TV channel 28 off the Hodgepodge card. Breaking this down:

-vvv - give an extreme amount of information on

                     what the program is doing.

pvr: - personal video recorder MRI schema (for Hodgepodge cards)

channel=0 - which card input to use, where:

                      0  = TV tuner
                      1  = Composite input
                      2  = S-VHS input

norm=ntsc - North American TV standard

size=320x240 - Default image size, pixels

frequency=555250 - Tune to channel 28, 555.25 MHz

                    Tables of TV channel / Frequencies can
                    be found at http://en.Wikipedia.org
                    and searching on 'television channel frequencies'.
                    (It even explains what happened to Channel 1 :-) )
                    I've downloaded this and edited it down to
                    North America/U.S.A. in the file
                    /root/channels.lst.
                    I forgot to note what website I got this
                    from, but this *frequency must be in KILOHERTZ'*,
                    so multiply those off the Wikipedia tables
                    by 1000 (usually drop the decimal point and
                    add a zero on the end).

Now, vlc is acting as a standalone video app in X-windows. To move it into server mode, click on 'File', then click 'Wizard', then chose to Stream media and click forward.

You get to choose the create a new source of video to stream, or to use an existing one - just pick the current one.

One of the things you can chose as you click forward through the choices of the wizard are the network protocols to use. One will send UDP datagrams to only one machine across the LAN (Unicast). I haven't tested this.

Another, rtp, will send UDP datagrams to any client listening on the LAN (multicast). If you pick this, it will request that you chose a Class D address (224.0.0.0 to 239.255.255.255) for the server to use. None of these addresses present any problem as long as the video is only being sent to nodes within the the same collision domain of the network, i.e. they are not being routed to other network segments. The port for these will default to 1234. Typically MRL's like:

rtp:224.0.0.0:1234 udp:224.0.0.0:1234

would be used to watch this. My experience has been that the clients will work for a while and choke after maybe 5 minutes. This is even for Luther listening to itself. There is some indication this may be because of the server sending out too many frames grabbed from the card, (messages ~'buffer has too many frames') and there may be ways to adjust the server to reduce this.

If instead you pick 'http' protocol to be used by the server, you get a choice of picking the address of the server machine you want vlc to listen for, or leave it blank and vlc as a server will listen on all active interfaces, including the loopback, on port 8080 for connecting clients. A typical MRL for this would be:

http://192.168.1.230:8080

for Luther at Boulder St. (8080 = default port) This seems to work fairly stably, with little tweaking needed to run for reasonable amounts of time - so far no client crashes with it.

Somewhere before finishing the Wizard configuration, you will get a chance to choose the video protocol - I haven't experimented too much with any of these, but they don't seem to be the cause of any problems.

Anyway, when you finish, vlc will stop playing video to the console you are at, and go to server mode. You can contact the address you chose to resume watching the video.

I think there are ways to handle all of the wizard configuration from the command line at startup, so that by using the correct interface, vlc will jump right into servermode, possibly never needing the GUI.

The Good things about this server (Best for Last): **************************************************

1) vlc is multiplatform - besides Linux, Windows, Mac OS X,

   and BSD versions
   are available.

2) Because the streaming protocols it produces are both

  *Open Source* AND *Widely Used*,
  almost anything at the client side can be used to play the videos
  being served up -

  vlc (itself)  *
  xine          *
  mplayer       *
  Helix
  Windows Media Player
     (documented at
       http://www.videolan.org/doc/streaming-howto/en/ch04.html#id294991)
  Some set top boxes
     (documented at
       http://www.videolan.org/doc/streaming-howto/en/ch06.html#id297854
       and
       http://www.videolan.org/doc/streaming-howto/en/ch06.html#id297272)
  etc., probably including your Web browser.
  (I'm trying to relocate the page that documented this,
  but I'm convinced.)

  (* == personally tested by me)

3) can get by with light client - was able to play

   the output on my personal machine,
   where MythTV client barely avoided crashing.

--

Alternative technology:

Spent some time trying to get MythWeb working, seemed to have problems getting mysql/mythweb/apache2 coordinating. Apache2 seems to be working ok. http://blog.brianhartsock.com/category/linux/mythtv/ complains that mythweb is buggy, will put this on hold till some more information comes in.


Help