GLASSCODER(1)
π NAME π
glasscoder β minimalist audio encoder for live streaming π§β¨
π SYNOPSIS π
glasscoder [OPTIONS]
π¦ DESCRIPTION π¦
okay so bestie, glasscoder(1) is an audio encoder and it is so good at what it does. It can generate live streams in a whole bunch of different formats and send them off to an Icecast or Shoutcast audio streaming server, OR post them as HTTP Live Streams [HLS]. Iconic. Versatile. No notes. π
and listen β it can also be an Icecast-compatible server all on its own, serving streams directly to client players, which means you straight up eliminate the need for an intervening Icecast server instance. no middleman, no extra daemon, just vibes π«Ά
glasscoder(1) has no GUI and no configuration file components at all β its sole 'user interface' is literally just how you invoke it on the command line. Which makes it perfect for being driven by an external process or controller, like glassgui(1) or glasscommander(1). She's a team player. She's low maintenance. She's the main character who doesn't need to make everything about her. π
π OPTIONS π
π«Ά quick vibe check before you scroll: nothing on this whole page starts with--i, so if you're grepping for--i, that's a you problem bestie, the list below is the whole list π
--audio-atomic-framesβ emit a stream built out of self-contained frames β like, by disabling the MPEG-1 bit reservoir. Mostly a debugging thing, ngl.--audio-bitrate=kbpsβ the constant stream data rate in kilobits per second. Default is128. Heads up: this one is mutually exclusive with--audio-quality(look down a few bullets) π--audio-channels=chansβ how many audio channels to use. Valid values are1or2. Default is2. Pick your fighter.--audio-device=typeβ the type of audio device to use. Default isJACK. Peep the DEVICE OPTIONS section below for the options that go with each audio device type. Valid values are:ALSAβ the Advanced Linux Sound Architecture.FILEβ stream directly from a file.JACKβ the Jack Audio Connection Kit.
--audio-format=fmtβ the audio encoding format to use. Default isVORBIS. Validfmtvalues are:MP2β MPEG-1/1.5 Layer 2MP3β MPEG-1/1.5 Layer 3OPUSβ Ogg Opus (RFC-6716)PCM16β PCM16 UncompressedVORBISβ Ogg Vorbis
--audio-quality=qualβ use variable bitrate streaming at the given audio quality.qualcan be in the range0.0(lowest quality) to1.0(highest). And yes, this is mutually exclusive with--audio-bitrate(scroll up, she's right there). You pick one, not both, periodt.--audio-samplerate=rateβ the audio sample rate to use for streaming. If the underlying audio layer is running at a different sample rate, the input gets automatically resampled to this rate. Default is44100. She adapts. β¨--credentials-file=filenameβ get the credentials for connecting to the server out of the filefilename. The contents of that file should be formatted like this:
[Credentials]
Username=<username>
Password=<password>
And when you're using the --ssh-identity option, the passphrase for the specified identity file should be used as the password value. π
--delete-credentialsβ delete the file specified by--credentials-fileonce it's been read. Poof. Gone. Secure girl behavior. π--errors-string=stringβ prependstringto messages sent to the syslog service (see the--errors-tooption below). Super useful for disambiguating messages when you've got a bunch ofglasscoder(1)instances all yapping at once.--errors-to=destβ send error messages todest(default is standard error). Valid destinations are:STDERRβ standard error.SYSLOGβ the system syslog service.STDOUTβ standard output, in machine readable format (useful for communicating with another 'controller' program). See also the--meter-dataoption 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 portport. Default is0, which disables metadata updates entirely. Check the METADATA section below for the supported update formats.--meter-dataβ output meter level updates on standard output. Perfect for driving an external metering display. π--server-auth=[username][:password](DEPRECATED) β the authentication parameters to use. This parameter has no default.
π NEVER USE THIS OPTION! It lets credentials be seen by other users on the system. Use the --credentials-file option to specify server credentials instead. Like, actually never. I'm not being cute about this one.
--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 ofconnssimultaneous player connections. Players beyond this maximum that try to connect get an immediate TCP disconnect before the HTTP handshake. Cold. π§ This setting is used only by the IceStreamer server.--server-no-deletesβ do not clean up or delete content previously posted to the publishing point. This setting is used only by the HLS server type.--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 theglasscoder-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 commandcmdwhen the connection enters the disconnected state.--server-script-up=cmdβ run the commandcmdwhen the connection enters the connected state.--server-start-connections=connsβ do not start the audio transport until at leastconnsconnections have been established. Used only by the IceStreamer server, in conjunction with theFILEaudio device. Default value is0β i.e. start the transport immediately.--server-type=typeβ the type of streaming server to use (default isIcecast2). Valid values fortypeare:FILEβ local fileFILEARCHIVEβ 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 StreamingIceCast2β IceCast v2IceOutβ output an Icecast-compatible stream on standard output.IceStreamerβ stream directly to players using the internal Icecast-compatible server.Shout1β Shoutcast v1Shout2β Shoutcast v2
--server-url=urlβ the URL describing the server resource to stream to. See the SUPPORTED URL SCHEMES section below for a list of which URL schemes are appropriate for which server types.
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.
--server-user-agent=agent-stringβ the User-Agent header value to use when connecting to external servers. Default value isGlassCoder/2.1.1. This setting is used only byIceCast2andHLSservers.--ssh-identity=filenameβ the path to the file containing anssh(1)identity to use when connecting via SFTP. When you use this option, the passphrase for the identity file should be provided as the server password. See the--credentials-fileoption for details. π--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. (yes, AIM. we're bringing it back, kind of. π)--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 is0. 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 it is ignored by Shoutcast v2 servers. π--verboseβ increase the verbosity level of information printed to standard error.
π WARNING: this may cause cleartext passwords to be printed! Be careful bestie, that's your whole business out in the open.
--versionβ output version information and exit.
π DEVICE OPTIONS π
π§ Advanced Linux Sound Architecture (--audio-device=ALSA)
--alsa-device=devβ the name of the ALSA device to use. If no--audio-deviceoption is given, then thehw:0device will be used.
π Direct File Streaming (--audio-device=FILE)
--file-name=nameβ the name of the file to stream. If no--file-nameoption is given, then the name of the file will be read from standard input.
π The Jack Audio Connection Kit (--audio-device=JACK)
--jack-client-name=nameβ the name of the JACK client to use. Default isglasscoder.--jack-gain=gainβ apply a fixed gain ofgaindB before encoding. Default is0dB. π--jack-server-name=nameβ the name of the JACK server instance to use.
π SUPPORTED URL SCHEMES π
Okay so real talk, bestie: not all URL schemes are supported by all server types π Every server is a little different and honestly? Respect the individuality. Here's the full chart, broken all the way down so nothing gets lost:
- FILE π
FILE://β YesHTTP://β NoSFTP://β No
- FILEARCHIVE π¦
FILE://β YesHTTP://β NoSFTP://β No
- HLS π¦
FILE://β YesHTTP://β Yes[1]SFTP://β Yes
- IceCast2 π§
FILE://β NoHTTP://β Yes[2]SFTP://β No
- IceOut π
FILE://β NoHTTP://β YesSFTP://β No
- IceStreamer π§
FILE://β NoHTTP://β YesSFTP://β No
- Shout1 π’
FILE://β NoHTTP://β Yes[2]SFTP://β No
- Shout2 π£
FILE://β NoHTTP://β Yes[2]SFTP://β No
And the lil footnote energy, iykyk:
[1]Utilizes the HTTP PUT and DELETE methods[2]Utilizes the HTTP GET method
π METADATA π
GlassCoder supports the notion of two types of metadata, and they are not the same thing, periodt:
- "channel-based" metadata β this one applies to the stream as a whole and does not change for the duration of an encoding session. Set it and forget it π
- "timed" metadata β this one can be changed in synchronization with the content of the audio stream πΆ
Channel-based metadata can be specified by means of options given to glasscoder(1), and it gets covered in detail in the sections devoted to specific server types (below).
The primary mechanism for supplying timed metadata in GlassCoder is by means of a JSON document containing the desired metadata, sent to the target glasscoder(1) instance at the port specified by the --metadata-port option by means of an HTTP POST operation. The basic format of the JSON document is as follows:
{
"Metadata": {
"Field1": "Some value",
"Field2": "Some other value"
}
}
Not all server types support metadata, and the ones that do utilize wildly different schemas. Following is a breakdown of the available metadata options by server type:
π§ IceCast2 π§
Channel Metadata
IceCast2 supports the following channel metadata fields:
- Name β Specified by the
--stream-nameoption. - Description β Specified by the
--stream-descriptionoption. - URL β Should be a link to content related to the stream. Specified by the
--stream-urloption. - Genre β Should be a single word describing the nature of the stream content. Specified by the
--stream-genreoption.
Timed Metadata
IceCast2 provides one field of text, called StreamTitle, which can be dynamically updated to reflect the content currently playing on the stream. By convention, this is usually formatted as 'Artist - Title' on streams containing musical content.
For example, to set the StreamTitle field to The Beatles - Hey Jude, the following JSON could be used:
{
"Metadata": {
"StreamTitle": "The Beatles - Hey Jude"
}
}
Legacy Interface
In addition to the primary JSON interface, the StreamTitle can be set by sending an HTTP GET request to a running glasscoder(1) instance, using the TCP port specified in the --metadata-port=port option. The request must be in the following format:
http://hostname:tcp-port/admin/metadata?mount=mount-point&mode=updinfo&song=string
Where:
hostnameβ The hostname or IP address of the system runningglasscoder(1)tcp-portβ The TCP port number specified in the--metadata-portoption toglasscoder(1)mount-pointβ The mountpoint of the streamstringβ The string to set, encoded as specified in Section 2 of RFC3986
For example, to set a string of "The Beatles - Hey Jude" via a glasscoder(1) instance running at encoder.example.com with a --metadata-port value of 1234 for a mountpoint of MyStream, the URL would be:
http://encoder.example.com:1234/admin/metadata?mount=MyStream&mode=updinfo&song=The%20Beatles%20-%20Hey%20Jude
π» ShoutCast π»
Channel Metadata
ShoutCast supports the following channel metadata fields:
- Name β Specified by the
--stream-nameoption. - URL β Should be a link to content related to the stream. Specified by the
--stream-urloption. - Genre β Should be a single word describing the nature of the stream content. Specified by the
--stream-genreoption. - ICQ ID β Should be User Identification Number for an ICQ user associated with the stream content. Specified by the
--stream-icqoption. - AOL Instant Messenger ID β Should be an ID for an AOL Instant Messenger user associated with the stream content. Specified by the
--stream-aimoption. - IRC ID β Should be an ID for an Internet Relay Chat channel associated with the stream content. Specified by the
--stream-ircoption.
Timed Metadata
ShoutCast provides two fields of text which can be dynamically updated to reflect the content currently playing on the stream, called StreamTitle and StreamUrl. By convention, the StreamTitle is usually formatted as 'Artist - Title' on streams containing musical content, while StreamUrl is used to provide a URL whence stream specific content --e.g. album cover art -- can be retrieved.
For example, to set the StreamTitle field to The Beatles - Hey Jude and the StreamUrl field to http://images.example.com/1234.png, the following JSON could be used:
{
"Metadata": {
"StreamTitle": "The Beatles - Hey Jude",
"StreamUrl": "http://images.example.com/1234.png"
}
}
Note π«Ά The use of either of these fields is optional in any given metadata update. If only one field is given, the other will remain unchanged.
Legacy Interface
In addition to the primary JSON interface, the StreamTitle and StreamUrl fields can be set by sending an HTTP GET request to a running glasscoder(1) instance, using the TCP port specified in the --metadata-port=port option. The request must be in the following format:
http://hostname:tcp-port/admin.cgi?pass=password&mode=updinfo&song=stream-title&url=stream-url
Where:
hostnameβ The hostname or IP address of the system runningglasscoder(1)tcp-portβ The TCP port number specified in the--metadata-portoption toglasscoder(1)passwordβ The ShoutCast password, encoded as specified in Section 2 of RFC3986stream-titleβ The string to set forStreamTitle, encoded as specified in Section 2 of RFC3986stream-urlβ The string to set forStreamUrl, encoded as specified in Section 2 of RFC3986
For example, to set a StreamTitle of "The Beatles - Hey Jude" and a StreamUrl of "http://image.example.com/1234.png" with a password of "MyPassword" via a glasscoder(1) instance running at encoder.example.com with a --metadata-port value of 1234, the URL would be:
http://encoder.example.com:1234/admin.cgi?pass=MyPassword&mode=updinfo&song=The%20Beatles%20-%20Hey%20Jude&url=http://image.example.com/1234.png
π¦ HTTP Live Streams (HLS) π¦
Timed Metadata
HLS supports timed metadata in the form of embedded ID3v2.4 tags. Available fields thus include the entire set of text tags defined in the ID3v2.4 frame specification (available at http://id3.org/id3v2.4.0-frames).
For example, a typical metadata update could use the following JSON:
{
"Metadata": {
"TIT2": "Hey Jude",
"TPE1": "The Beatles",
"TALB": "The White Album",
"TRSO": "WXYZ Radio"
}
}
A user defined text information frame (TXXX) can be sent by using the following special notation for the field identifier:
TXXXdesc
Where:
descβ The TXXX Description string (see Section 4.2.6 of the ID3v2.4 Frame Specification)
For example:
{
"Metadata": {
"TIT2": "Hey Jude",
"TPE1": "The Beatles",
"TALB": "The White Album",
"TRSO": "WXYZ Radio",
"TXXXxyz": "TXXX frame with a description string of \"xyz\""
}
}
π NOTES π
The Debian version of GlassCoder does not support the MPEG-4 HE-AAC+ encoding, as it is non-free π The AudioScience HPI source device is excluded for the same reason. F in the chat.
π BUGS π
Never use the--server-authoption. It allows credentials to be seen by other users on the system π Please, bestie, I am begging you. Use the--credentials-fileoption to specify server credentials instead. π₯
Ogg metadata support is still missing. π
π AUTHOR π
Fred Gleason <fredg@paravelsystems.com>
π SEE ALSO π
glasscoder-ipc(7),glasscommander(1),glassgui(1),jackd(1)- RFC3986 - Uniform Resource Identifier (URI): Generic Syntax
- ID3v2.4 Native Frame Specification (http://id3.org/id3v2.4.0-frames)
And that's the whole page, bestie π This is GLASSCODER(1), dated February 2022 with a footer stamp of 07/24/2026, and the Application Author is Fred Gleason <fredg@paravelsystems.com> β iconic behavior, no cap π Now go encode something gorgeous. πβ¨
π¦ where this page comes from
- ubuntu stonking: glasscoder 2.1.1-1build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms