glasscoder — Minimalist audio encoder for live streaming
glasscoder(1) is an audio encoder that is capable of generating live streams using a variety of formats and sending them to an Icecast or Shoutcast audio streaming server or posting them as HTTP Live Streams [HLS]. It is also capable of acting as an Icecast-compatible server in its own right, serving streams directly to client players and thus eliminating the need for an intervening Icecast server instance.
glasscoder(1) has no GUI or configuration file components at all; its sole 'user interface' being its command-line invocation. As such, it is particularly well suited for being driven by an external process or controller such as glassgui(1) or glasscommander(1).
--audio-atomic-frames
Emit a stream consisting of self-contained frames --e.g. by disabling the MPEG-1 bit reservoir. Useful mostly for debugging.
--audio-bitrate=
kbps
The constant stream data rate in kilobits per second. Default value
is 128
. Use of this option is mutually
exclusive with that of the --audio-quality
option
(see below).
--audio-channels=
chans
The number of audio channels to use. Valid values are
1
or 2
.
Default value is 2
.
--audio-device=
type
The type of audio device to use. The default value is
JACK
. See the
DEVICE OPTIONS section (below) for
the options appropriate for each audio device type. Valid values
are:
ALSA
The Advanced Linux Sound Architecture.
ASIHPI
AudioScience HPI.
FILE
Stream directly from a file.
JACK
The Jack Audio Connection Kit.
--audio-format=
fmt
The audio encoding format to use. The default value is
VORBIS
. Valid fmt
values are:
AAC
MPEG-2 Advanced Audio Coding (Main Profile)
AACP
MPEG-4 Advanced Audio Coding (High Efficiency Profile)
MP2
MPEG-1/1.5 Layer 2
MP3
MPEG-1/1.5 Layer 3
PCM16
PCM16 Uncompressed
VORBIS
Ogg Vorbis
--audio-quality=
qual
Use variable bitrate streaming at the given audio quality.
qual
can be in the range
0.0
(lowest quality) to
1.0
(highest). Use of this option is mutually
exclusive with that of the --audio-bitrate
option
(see above).
--audio-samplerate=
rate
The audio sample rate to use for streaming. If the underlying
audio layer is operating at a different sample rate, the input will
be automatically resampled to this rate.
Default value is 44100
.
--errors-string=
string
Prepend string
to messages sent to the
syslog service (see the
--errors-to
option, below). Useful for
disambiguating messages from multiple
glasscoder(1) instances.
--errors-to=
dest
Send error messages to dest
(default
standard error). Valid destinations are:
STDERR
Standard error.
SYSLOG
The system syslog service.
STDOUT
Standard output,in machine readable format (useful for communication with another 'controller' program). See also the
--meter-data
option below.
--help
Print a short usage message and exit.
--list-codecs
Print a list of available codecs and then exit.
--list-devices
Print a list of available source devices and then exit.
--metadata-port=
port
Accept metadata updates via HTTP at port
port
. Default value is
0
, which disables metadata updates.
Both IceCast and ShoutCast style metadata updates are supported
(but see the NOTES section below).
--meter-data
Output meter level updates on standard output. Useful for driving an external metering display.
--server-auth=
[username
][:
password
]
The authentication parameters to use. This parameter has no default.
--server-exit-on-last
Exit the program upon closure of the last player connection. This setting is used only by the IceStreamer server.
--server-max-connections=
conns
Allow a maximum of conns
simultaneous
player connections. Players beyond this maximum attempting to
connect will receive an immediate TCP disconnect before the HTTP
handshake. This setting is used only by the IceStreamer server.
--server-pipe=
pathname
Location to create a UNIX socket for piping connection socket descriptors. Useful for implementing proxy connectors for the IceStreamer server. For further details about this feature, see the Proxy Connections section of the glasscoder-ipc(7) man page. The default is to create no UNIX socket. This setting is used only by the IceStreamer server.
--server-script-down=
cmd
Run the command cmd
when the connection
enters the
disconnected
state.
--server-script-up=
cmd
Run the command cmd
when the connection
enters the connected
state.
--server-start-connections=
conns
Do not start the audio transport until at least
conns
connections have been established.
Used only by the IceStreamer server in conjunction with the
FILE
audio device. Default value is
0
--i.e. start the transport immediately.
--server-type=
type
The type of streaming server to use (default is
Icecast2
). Valid values for
type
are:
FILE
Local file
FILEARCHIVE
Local file archive. Stream to a set of files on the local system, starting a new file at the beginning of each hour.
HLS
HLS/HTTP Live Streaming
IceCast2
IceCast v2
IceOut
Output an Icecast-compatible stream on standard output.
IceStreamer
Stream directly to players using the internal Icecast-compatible server.
Shout1
Shoutcast v1
Shout2
Shoutcast v2
--server-url=
url
The URL describing the server resource to stream to. When used
with a --server-type
of
IceStreamer
, the host part of the URL
is used to specify the address of the network interface to
use for streaming (use 0.0.0.0
to indicate
ALL interfaces). This parameter has no default.
--stream-aim=
aim
The AOL Instant Messenger ID to associate with the stream. There is no default value. This setting is used only by Shoutcast servers.
--stream-description=
string
The string to show as the stream description. There is no default value. This setting is used only by Icecast servers.
--stream-genre=
string
The string to show as the stream genre. There is no default value. This setting is used only by Icecast and Shoutcast servers.
--stream-icq=
icq
The ICQ ID to associate with the stream. There is no default value. This setting is used only by Shoutcast servers.
--stream-irc=
irc
The Internet Relay Chat ID to associate with the stream. There is no default value. This setting is used only by Shoutcast servers.
--stream-name=
string
The string to show as the stream name. There is no default value. This setting is used only by Icecast and Shoutcast servers.
--stream-timestamp-offset=
offset
The offset to add to the value of stream timestamps, in seconds.
Default value is 0
. This setting is used
only for HLS streams.
--stream-url=
url
The URL to show for a page giving more information about the stream. There is no default value. This setting is used only by Icecast and Shoutcast servers, but is ignored by Shoutcast v2 servers.
--verbose
Increase verbosity level of information printed to standard error. WARNING: this may cause cleartext passwords to printed!
--version
Output version information and exit.
--audio-device=
ALSA
)
--alsa-device=
dev
The name of the ALSA device to use. If no
--audio-device
option is given,
then the hw:0
device will be used.
--audio-device=
=ASIHPI
)
--asihpi-adapter-index=
index
The index number of the audio adapter to use.
--asihpi-input-index=
index
The number of the input audio stream to use on the specified adapter.
--asihpi-input-gain=
gain
The gain to apply to the input audio on the specified adapter in
dB. Valid values are -100
to
+20
inclusive. Default value is
0
.
--asihpi-channel_mode=
mode
The channel mode for the input audio on the specified adapter.
The default value is NORMAL
. Valid values
are:
NORMAL
Left signal goes to left channel, right signal goes to right channel.
SWAP
Left signal goes to right channel, right signal goes to left channel.
LEFT
Left signal goes to both left and right channels.
RIGHT
Right signal goes to both left and right channels.
--asihpi-input-source=
src-node
The input source to use on the specified adapter. See the
HPI Source Nodes section below
for the list of valid src-node
values. The default value is LINEIN
.
--asihpi-input-type=
src-node
The input type to use on the specified adapter. See the
HPI Source Nodes section below
for the list of valid src-node
values. The default value is LINEIN
.
The following values can used for the
--asihpi-input-source
and
--asihpi-input-type
options above:
NONE
,
OSTREAM
Internal output stream
LINEIN
Generic input signal
AESEBU
AES3 digital input
TUNER
Tuner
RF
RF input
CLOCK
Clock source
BITSTREAM
Raw bitstream
MIC
Microphone
COBRANET
CobraNet
ANALOG
Analog input
ADAPTER
Adapter
RTP
,
INTERNAL
Device internal
AVB
AVB input
--audio-device=
FILE
)
--file-name=
name
The name of the file to stream. If no
--file-name
option is given,
then the name of the file will be read from standard input.
--audio-device=
JACK
)
--jack-server-name=
name
The name of the JACK server instance to use.
--jack-client-name=
name
The name of the JACK client to use. Default is
glasscoder
.
HTTP Live Streams [HLS] require support for the HTTP PUT and DELETE methods on the publishing web server. See the GlassCoder documentation directory for a sample configuration for the Apache Web Server.
Not all server backends support all types of metadata. glasscoder(1) supports both IceCast- and ShoutCast-style metadata updates and will attempt to impedance-match updates to the server type as best as possible.