Setting up a relay

    A relay listens to an incoming broadcast (either unicast or multicast), and forwards, or relays, that broadcast to one or more destination addresses. The destination addresses may be unicast or multicast. You can set up your server to relay multiple broadcasts at the same time.

    Sample setup for relaying a live broadcast

    A computer captures and encodes video and audio. The encoded signal is sent to a Darwin Streaming Server over an IP network. The destination computers receive the relayed signal and send it to client computers.
    A computer with Darwin Streaming Server relays the signal to several destinations. Client computers tune in to the broadcast.

Setting up a relay configuration file

    You set up a relay by creating a relay configuration file and copying it to the /etc directory. The easiest way to create a relay configuration file is to edit the sample file provided with your streaming server software. The path and file name for the sample file is:

    /etc/streamingrelay.conf

    A relay source and one or more relay destinations are part of a unit. Information about a relay destination must immediately follow information about a relay source. You may have more than one unit in a configuration file.

    The following example has one source and two destinations.

    IMPORTANT: Although the relay_source and relay_destination lines are each split over two lines in the example, each must be on one line in your configuration file.

    Example relay configuration file:

    relay_source in_addr=224.98.98.45
    src_addr=17.98.45.45 in_ports=5000 5002 5004 ttl=15

    relay_destination dest_addr=17.254.98.45 out_addr=17.98.45.45 dest_ports=1980 1982 1984

    relay_destination dest_addr=226.91.45.78 out_addr=17.98.45.45 dest_ports=10010 10012 10014 ttl=15

    These are the keywords and values that can appear in the relay configuration file.

      Keyword   Value    
    relay_source followed by these keywords and an appropriate value for each keyword:
    in_addr, src_addr, in_ports, ttl

    in_addr input IP address. If the source broadcast is a multicast, this is the multicast IP address. If the source broadcast is a unicast, this must be one of the IP addresses on the relay computer.

    src_addr IP address of source (optional)

    in_ports port number of the RTP streams in the source broadcast. These must be even numbers. The number of input ports should match the number of output ports; make sure port numbers are unique and don't overlap

    ttl time-to-live value (if it's a multicast source)

    relay_destination followed by these keywords and an appropriate value for each keyword:
    dest_addr, out_addr, dest_ports, ttl

    dest_addr destination IP address (unicast or multicast) of the relay

    out_addr IP address of the interface on which to send out multicast packets (optional). If not set explicitly, the output interface is chosen automatically.

    dest_ports port numbers of the RTP streams in the destination relay. These must be even numbers. The number of output ports should match the number of input ports; make sure port numbers are unique and don't overlap

    include followed by a path and file name for a relay configuration file

Turning a relay on or off

Related topic

 


Table of contents