For open source software for streaming from other hardware encoders - or from pre-encoded files - see the "LIVE555 Streaming Media" software.
cd live tar -xzf wis-streamer.tar.gz cd wis-streamer make
./wis-streamerand the server will initialize with default parameters: unicast streaming; MPEG-4 video (640x480, up to 1.5 Mbps); raw PCM audio (16 bit, 48000 Hz); RTSP server port 8554; assuming a NTSC input source, on input device number 0 (composite video). (See below for how to change these parameters.) If the server initializes correctly, it will then print out a "rtsp://" URL that can be used - by a media player client - to play the stream.
Note, however, that no support is currently provided for the WIS GO70007 encoder driver; please refer to the source code.
By default, the input video source is assumed to be in NTSC format.
For other formats, you can specify the input video type using the
"-t <video-input-type>"
option, e.g. "-t pal".
(To see a list of valid video input types, use "-t help".)
If the selected input device is a TV tuner, then add the option
"-c <band-name>:<channel-name>"
to select a TV channel.
(To see a list of valid <band-name>s, use
"-c help".
To see a list of valid <channel-name>s for a given
<band-name>, use
"-c <band-name>:help".)
To specify the width and height - in pixels - of the captured video, use the
"-w <width>"
and
"-h <height>"
options.
(The default values are: <width>=640; <height>=480.)
The
"-r <bitrate>"
option
can be used to specify a maximum video bitrate (in bits-per-second).
(The default maximum video bitrate is 1500000 bps - i.e, 1.5 Mbps.)
The
"-R <frame-rate>"
option can be used to set the video frame rate (in frames-per-second) generated by
the encoder hardware. The <frame-rate> parameter can be either a
positive integer, or a fraction of the form <numerator>/<denominator>
(where <numerator> and <denominator> are both
positive integers). The default frame rate is 30000/1001 fps for NTSC, and 25 fps for PAL or SECAM.
When it initializes, "wis-streamer" will display the actual frame rate generated by the encoder
(which might not be exactly the same as the value that was asked for).
The streamed audio format can be specified using one of the following options:
By default, the server's audio stream is stereo.
To stream in mono instead (thereby halving the audio bitrate),
use the
"-M"
option.
Alternatively, if the
"-m" option is given, then the server will stream via IP multicast.
This means that the server transmits the stream only once, regardless of how many
clients have asked to play it.
The benefit of IP multicast is that it allows a potentially unlimited number of concurrent
clients.
The drawback of IP multicast, however, is that most routers do not support multicast
by default,
so that - in many cases - multicast streaming will not work outside a single LAN.
Command-line options
Input device selection
When "wis-streamer" initializes, it prints out the available input devices.
By default, "wis-streamer" reads from 'composite input' (device number 0).
To have it read instead from another input device, use the
"-i <input-device-number>" option.
Video output format
The video encoding format can be specified using one of options
"-mpeg1",
"-mpeg2",
"-mpeg4" (the default),
or
"-mjpeg".
Alternatively, use the
"-nv" (i.e., 'no video') option to disable video encoding/streaming entirely.
Audio output format
The
"-f <sampling-frequency>"
option
specifies the audio sampling frequency (in Hz).
The default value is 48000 Hz.
Special notes:
MPEG Transport streaming
As a special case, instead of using the video and audio format options
noted above, you can use the
"-mpegtransport <audio-bitrate-in-kpbs>"
option to specify that the streamed data will be a MPEG Transport Stream,
containing MPEG-2 video, and MPEG-2 audio (with the specified bitrate).
(If the <audio-bitrate-in-kpbs> parameter is zero, then no audio
will be included in the Transport Stream.)
Unicast or multicast streaming
By default, the server streams via unicast.
This means that each request (from a client media player) to play the stream
causes a new stream to be transmitted, directly to the client.
Note, therefore, that the maximum possible number of concurrent clients is limited by your
network bandwidth.
Special note:
By default, the server uses
source-specific multicast (SSM),
using a randomly-chosen SSM IP multicast address.
To specify a different multicast address, use the
"-A <multicast-address>" option
(where <multicast-address> is an IPv4 multicast address, in
'dotted quad' form; IPv6 is not yet supported).
If the "-A" option is used without "-m", then 'any-source multicast (ASM)'
is used instead of SSM.
By default, when streaming via multicast, the server uses RTP port number 6000 for video, and 6002 for audio. These port numbers can, however, be changed using the "-v <video-RTP-port-number>" and/or "-a <audio-RTP-port-number>" numbers. (When streaming via unicast, arbitrary (ephemeral) RTP port numbers are used.)
rtsp://<username>:<password>@<host>:<port>/<stream-name>(Note that this causes the username and password to be passed over the network in the clear.)
-a <audio-RTP-port-number> | specify the audio RTP port number (for multicast streaming only) |
-A <multicast-address> | specify multicast streaming (to the given multicast address) |
-aac <bitrate-in-kbps> | encode and stream audio as MPEG-4 AAC, with the specified bitrate |
-amr | encode and stream audio as AMR, with the specified bitrate |
-brightness <value> | specify the video input brightness |
-c <band-name>:<channel-name> | specify a TV channel (for a TV tuner input device) |
-contrast <value> | specify the video input contrast |
-D <stream-description-string> | specify the stream's textual description (for SDP) |
-f <sampling-frequency> | specify the audio sampling frequency (in Hz) [default: 48000 Hz] |
-h <height> | specify the video image height (in pixels) [default: 480] |
-hue <value> | specify the video input hue |
-i <input-device-number> | specify the input device number (0: composite video [default]; 1: S-Video; 2: tuner (if present)) |
-m | specify multicast streaming (using source-specific multicast) |
-M | stream audio in mono |
-mjpeg | encode and stream video as motion-JPEG |
-mpeg1 | encode and stream video as MPEG-1 |
-mpeg2 | encode and stream video as MPEG-2 |
-mpeg4 | encode and stream video as MPEG-4 [default] |
-mpegaudio <bitrate-in-kbps> | encode and stream audio as MPEG-2, with the specified bitrate |
-mpegtransport <audio-bitrate-in-kbps> | encode and stream video and audio as MPEG-2 (with the specified audio bitrate), combined into a MPEG Transport Stream |
-na | don't stream audio |
-nv | don't stream video |
-p <RTSP-port-number> | specify the RTSP server port number [default: 8554] |
-pcm | stream audio as raw, 16-bit PCM [default] |
-r <bitrate> | specify the maximum streamed video bitrate (in bits-per-second) [default: 1500000 bps] |
-R <frame-rate> | specify the video frame rate (in frames-per-second) [default: 30000/1001 fps for NTSC; 25 fps for PAL or SECAM] |
-saturation <value> | specify the video input hue |
-t <video-input-type> | specify the video input type [default: ntsc] |
-u <username>:<password> | specify a username-password pair for client authentication |
-ulaw | stream audio as 8-bit µ-law PCM |
-v <video-RTP-port-number> | specify the video RTP port number (for multicast streaming only) |
-w <width> | specify the video image width (in pixels) [default: 640] |