SYNOPSIS

mast_filecast [options] <address>[/<port>] <filename>

DESCRIPTION

mast_filecast(1) reads audio from an audio file, encodes it to the chosen paylad format and then sends it out encapsulated in an RTP packet. The format of the audio file can be anything supposed by libsndfile (AIFF, Wave, Sun Audio etc). The sample rate and number of channels should be the same as the chosen payload type.

The address can either be a unicast, multicast, IPv4 or IPv6 address.

The port number should be an even number (RTCP reports are sent one port higher). If no port number is specified, then the default RTP port number (5004) is used.

OPTIONS

-h

Return usage and version information.

-t

Sets TTL (Time To Live) for packets sent. Packets will ignored after they have passed this number of routers. Default is 5, maximum is 127.

-p <payload>

Payload type of the encoded packets. MAST currently only supports the following four static payload types. The default is L16.

  • PCMU - 8khz, Mono

  • PCMA - 8khz, Mono

  • GSM - 8khz, Mono

  • LPC - 8khz, Mono

  • L16 - 44.1khz, Mono or Stereo

  • MPA

-o <name=value>

Set a MIME Type parameter option for chosen payload type. Supported options are:

  • MPA - MPEG Audio

    • bitrate (in kbps)

    • mode (joint_stereo, stereo, single_channel, dual_channel)

-z <size>

Maximum Payload size of the packets. Allows you to choose the length of the payload data (in bytes) for each packet transmitted. This is usually a number between 300 bytes and 1450 bytes. The actual packet size will be determined by the number of blocks of 160 samples of audio that can be stored in the packet's payload. The maximum transmission unit (MTU) is determined by your networking equipment. Also be careful of IP-in-IP tunnelling as packets will have two IP headers which makes it more likely that the packet will be too big and get fragmented.

-s <ssrc>

By default a random SSRC is generated, however if you want to ensure that an SSRC remain constant between invocations of the program, then you may specify it here as a hexadecimal number.

-d <dscp>

The Differentiated Services Code Point (DSCP) value specifies a packet's Per-Hop-Behavior (PHB) along its path to its destination. It is a Quality of Service (QoS) technique that can be used to provide better than best effort packet delivery. The default PHB is Best Effort. Valid arguments are:

  • BE Best Effort

  • EF Expedited Forarding

  • AF11 to AF43 Assured Forwarding

  • CS0 to CS7 Classes 0 to 7

-l

Loop the audio file. Repeat playing the audio file when the end is reached.

EXAMPLES

mast_filecast -p L16 -l 233.122.222.1 audiofile.wav

Repeatedly send an audio file to the multicast group 233.122.222.1, port 5004. The audio file is stereo, with a sample rate of 44.1kHz and will be sent uncompressed using payload type 10.

mast_filecast -p GSM 152.78.64.103/4000 audiofile-8khz.wav

Read in an audio file, with a sample rate of 8kHz, encode it to GSM and sent it to the unicast address 152.78.64.103, port 4000.

AUTHOR

Written by Nicholas J. Humfrey, <njh@aelius.com>

RESOURCES

Main web site: http://www.ecs.soton.ac.uk/~njh/mast/

RTP Payload types: http://www.iana.org/assignments/rtp-parameters

Audio file formats supported by libsndfile: http://www.mega-nerd.com/libsndfile/

SEE ALSO

mast_cast(1), mast_rawcast(1)

COPYING

Copyright © 2003-2007 Nicholas J Humfrey. Free use of this software is granted under the terms of the GNU General Public License (GPL)