jtvlan Free DVB-T streaming solution for the home network
Table of Contents
  1. JTVLAN Server
    1. JTVLANServer System Requirements
    2. JTVLANServer Installation
    3. JTVLANServer Supported Hardware
    4. Streaming configuration
  1. JTVLANClient
    1. JTVLANClient System Requirements
    2. JTVLANClient Installation
    3. Using multiple JTVLANClients simultaneously

 

JTVLAN Server

JTVLANServer is the component that interfaces the capture card and streams the video over the network. It requires the following pieces of software to perform this task:

DVB WebScheduler is a free application which enables to schedule digital television recordings but natively does not support live tv viewing and streaming. JTVLANServer plugs into DVB WebScheduler adding a few functionalities to enable live tv streaming.

Important: Please note that JTVLAN is not a modification or an alternative version of DVB WebScheduler, which is a great piece of software in itself. JTVLAN just exploits some features of the Java language which enable to plug these new functionalities without touching or hacking the original WebScheduler code. This approach offers two main advantages: 1) minimize the risks of impacts on WebScheduler which is a very reliable application; 2) minimize compatibility problems between JTVLAN and future versions of WebScheduler.

VideoLAN is a free media player wich includes streaming server functionalities and advanced command line options. JTVLANServer uses these streaming server functionalities to stream the DVB WebScheduler captures across the network.

JTVLANServer System Requirements

The system requirements of JTVLANServers are the following:

  • A microsoft 2000/XP operating system
  • A DVB capture card with BDA drivers
  • DVB WebScheduler Version 3.1.13 (latest)
  • VideoLAN Version 0.8.2 or greater
JTVLANServer Installation

To install JTVLANServer you first need to check that:

  1. you have a fully configured and functional DVB WebScheduler
  2. you have installed WebScheduler as service (you should have marked the "Install as service" checkbox during WebScheduler installation).
  3. you have VideoLAN properly installed

You will need to know the actual installation folder of VideoLAN, since you will have to enter this value in the JTVLANServer configuration file.

To install do the following:

  1. If it is running, stop the DVB WebScheduler service. (Right-click on My Computer, choose Manage from the menu, select the DVB Webscheduler service, click the stop button)
  2. Extract the contents of jtvlanserver-x.y.z.zip into the root directory of DVB WebScheduler (important: not in a subdirectory). Overwrite any previous JTVLANServer file in case of version upgrade
  3. Launch the jtvlansetup.exe utility to configure JTVLANServer
  4. If the setup complains about a missing "wrapper.conf" file you probably have extracted the files in a wrong directory or you do not have WebScheduler installed as service.
  5. With the configuration tool enter all the three parameters required in the Basic tab (use the buttons to navigate the file system):

    Temporary folder is the folder which JTVLAN uses to save the temporary buffers of live tv.

    Recordings folder is the folder which JTVLAN uses to store the recorded shows.

  6. Switch to the WebScheduler tab to see if your WebScheduler needs to be configured to run JTVLAN. When you first install JTVLAN you should see this window:

    By clicking the button you allow the setup to automatically add JTVLAN classpath entries to WebScheduler wrapper.conf file.

  7. Start the DVB WebScheduler service and, to test the correct setup, access the following url:
    http://<WebSchedulerHost:Port>/servlet/JTVLANServerRes
    
    you should see something like this:
    0
    jtvlanserver.version: 0.2.0
    vlc.params: -I rc --rc-quiet
    capture.waitbeforestream: 5000
    capture.maxwaitforcreate: 3000
    capture.type: 2
    capture.prefix: tmpcap_
    path.tmpcapture: G:\Timeshifting
    capture.timeformat: yyyyMMdd-HHmmss
    vlc.sout: standard{access=http,mux=ts,url=:7777}
    vlc.exepath: C:\Program Files\VideoLAN\VLC\vlc.exe
    capture.ext: .ts
    path.recordings: G:\Recordings
    

Important: If you are using a firewall remember to configure it to allow incoming connections to the VLC instance that will do the streaming. You can usually do it or by allowing the VLC application to receive connections, or opening the necessary TCP port (by default port 7777 listening on all IPs).

JTVLANServer Supported Hardware

Since JTVLANServer uses DVB WebScheduler as an interface to the capture hardware, each card supported by WebScheduler should be supported by JTVLANServer too. Generally speaking, every DVB capture card with standard BDA drivers should be supported.

Streaming configuration

JTVLANServer uses VideoLAN as a streaming server, so it can use every streaming option made available by VideoLAN. While the default configuration uses HTTP streaming of the TS mux, it is also possibile to setup Unicast/Multicast UDP, RTP, MMS streaming, with or without transcoding of the original stream.

Streaming configuration is controlled by the VLC sout parameter in the configuration available in the Advanced tab:

The value of this parameter can be any valid argument of the --sout command line argument of the VideoLAN program, which is documented in the
Advanced streaming using the command line section of the VideoLAN documentation.

JTVLANClient

JTVLANClient is a java application which is able to remotely control the JTVLANServer over the network and to receive and display the audio/video streams generated by the server. JTVLANClient uses a local instance of the VideoLAN media player to display the live tv stream.

JTVLANClient System Requirements

JTVLANClient is being developed and tested under Windows XP home and professional edition and with Java 1.5 and 1.4 and on Linux Debian 3.1 with Java 1.5.

JTVLANClient Installation

To install JTVLANClient first check to have a functional installation of VideoLAN, then:

  1. Extract the distribution archive (jtvlanclient-x.y.z.zip) in a folder of your choice
  2. If you are upgrading from version 0.1.1 you must install the new version on a different folder to avoid conflicrs.
  3. If you are upgrading from version 0.1.2 or later you may just overwrite your previous installation.
  4. Run the configuration utility jtvlansetup.exe
  5. Enter all the data required in the Basic tab:

    the meaning of the parameters is the following:

    VLC Stream URL: The url to connect to the stream generated by JTVLANServer. This url is related to the JTVLANServer VLC Sout configuration.

    WebScheduler URL: The URL of your DVB WebScheduler installation. You will have to enter the correct IP address and port number to connect to WebScheduler.

    Local Rec. Directory: The local dorectory where the client will save the local recordings

  6. If you have configured WebScheduler authentication, enter your authentication data in the Authentication tab:

    Just leave unchanged the Realm field to the value of "user".
  7. The Advanced tab contains data that you probably should leave unchanged:

    VLC Params: Extra command line parameters to pass to VLC.

    VLC rc Port: The port VLC rc interface will listen for incoming connections. This port is used by JTVLANClient to communicate to the vlc process VLC (e.g. to change the volume or to switch to fullscreen mode). VLC will bind to the localhost (127.0.0.1) address only and so it will accept connections from localhost only. You should check your firewall is not blocking this connection.

    Timeout: The number of milliseconds JTVLANClient will wait for the stream before generating a timeout error.

  8. Once you have entered and saved the required configuration data you can launch JTVLANClient. The main JTVLANClient window should then appear showing the channel list as in the folloging screenshot:

Using multiple JTVLANClients simultaneously

Starting from version 0.4.0 JTVLAN is able to handle multiple clients simultaneously. The approach that has been chosen to handle this situation is quite simple and can be outlined as follows:

  • Even if there are several capture cards available, JTVLAN will use only a single capture card at a time. This approach is obvilously limiting the possibility to have several clients playing independently different channels. This has been chosen in order to avoid adding too much complexity and heavy logic on the server side of JTVLAN and possibly compromise the reliability of WebScheduler itself. It is possible that multiple cards will be handled by future versions of JTVLAN though.

  • The basic approach can be described as a master-slave. When several clients are connected to the same server and the server is idle, each client is able to start playback in the usual way. When the first client starts playing or recording a given channel, he becomes the master of the stream, while all the other client will enter in slave mode.

  • The master client will behave as an ordinary JTVLAN client: it can stop the stream, change channel, start/stop recording and so on.

  • While in slave mode, clients will not have the possibility to select a channel and start playing it (actually the channel list is disabled). This is because the server is already playing a given channel (selected by the maser client) and the clients can only tune to that stream.

  • Clients are always aware about what the server is actually doing and what channel it is playing. This information is always displayed in the bottom status line, so that it is always clear, if the server is playing, what channel is currently available.

  • Slave clients can start/stop the stream (and change local playback settings like deinterlacing, aspect ratio and so on) without affecting the server status.

  • When the master stops playing, every slave client that was already playing the stream will remain in slave playing mode and will wait for a new stream to become available. In this way slave clients will be able to follow the stream during channel changes (which implies a restart of the stream). Instead, slave clients that were not playing the stream will automatically return in mormal mode and will be able to start streaming and become masters themselves.