1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
|
'\" t
.\" Title: glasscoder
.\" Author: Fred Gleason <fredg@paravelsystems.com>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 01/27/2020
.\" Manual: Linux Audio Manual
.\" Source: October 2019
.\" Language: English
.\"
.TH "GLASSCODER" "1" "01/27/2020" "October 2019" "Linux Audio Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
glasscoder \- Minimalist audio encoder for live streaming
.SH "SYNOPSIS"
.HP \w'\fBglasscoder\fR\ 'u
\fBglasscoder\fR [\fIOPTIONS\fR]
.br
.SH "DESCRIPTION"
.PP
\fBglasscoder\fR(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\&.
.PP
\fBglasscoder\fR(1)
has no GUI or configuration file components at all; its sole \*(Aquser interface\*(Aq being its command\-line invocation\&. As such, it is particularly well suited for being driven by an external process or controller such as
\fBglassgui\fR(1)
or
\fBglasscommander\fR(1)\&.
.SH "OPTIONS"
.PP
\fB\-\-audio\-atomic\-frames\fR
.RS 4
Emit a stream consisting of self\-contained frames \-\-e\&.g\&. by disabling the MPEG\-1 bit reservoir\&. Useful mostly for debugging\&.
.RE
.PP
\fB\-\-audio\-bitrate=\fR\fIkbps\fR
.RS 4
The constant stream data rate in kilobits per second\&. Default value is
\fB128\fR\&. Use of this option is mutually exclusive with that of the
\fB\-\-audio\-quality\fR
option (see below)\&.
.RE
.PP
\fB\-\-audio\-channels=\fR\fIchans\fR
.RS 4
The number of audio channels to use\&. Valid values are
\fB1\fR
or
\fB2\fR\&. Default value is
\fB2\fR\&.
.RE
.PP
\fB\-\-audio\-device=\fR\fItype\fR
.RS 4
The type of audio device to use\&. The default value is
\fBJACK\fR\&. See the
\fBDEVICE OPTIONS\fR
section (below) for the options appropriate for each audio device type\&. Valid values are:
.PP
\fBALSA\fR
.RS 4
The Advanced Linux Sound Architecture\&.
.RE
.sp
.PP
\fBFILE\fR
.RS 4
Stream directly from a file\&.
.RE
.sp
.PP
\fBJACK\fR
.RS 4
The Jack Audio Connection Kit\&.
.RE
.sp
.RE
.PP
\fB\-\-audio\-format=\fR\fIfmt\fR
.RS 4
The audio encoding format to use\&. The default value is
\fBVORBIS\fR\&. Valid
\fIfmt\fR
values are:
.PP
\fBMP3\fR
.RS 4
MPEG\-1/1\&.5 Layer 3
.RE
.sp
.PP
\fBOPUS\fR
.RS 4
Ogg Opus (RFC\-6716)
.RE
.sp
.PP
\fBPCM16\fR
.RS 4
PCM16 Uncompressed
.RE
.sp
.PP
\fBVORBIS\fR
.RS 4
Ogg Vorbis
.RE
.sp
.RE
.PP
\fB\-\-audio\-quality=\fR\fIqual\fR
.RS 4
Use variable bitrate streaming at the given audio quality\&.
\fIqual\fR
can be in the range
\fB0\&.0\fR
(lowest quality) to
\fB1\&.0\fR
(highest)\&. Use of this option is mutually exclusive with that of the
\fB\-\-audio\-bitrate\fR
option (see above)\&.
.RE
.PP
\fB\-\-audio\-samplerate=\fR\fIrate\fR
.RS 4
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
\fB44100\fR\&.
.RE
.PP
\fB\-\-errors\-string=\fR\fIstring\fR
.RS 4
Prepend
\fIstring\fR
to messages sent to the
\fBsyslog\fR
service (see the
\fB\-\-errors\-to\fR
option, below)\&. Useful for disambiguating messages from multiple
\fBglasscoder\fR(1)
instances\&.
.RE
.PP
\fB\-\-errors\-to=\fR\fIdest\fR
.RS 4
Send error messages to
\fIdest\fR
(default standard error)\&. Valid destinations are:
.PP
\fBSTDERR\fR
.RS 4
Standard error\&.
.RE
.sp
.PP
\fBSYSLOG\fR
.RS 4
The system syslog service\&.
.RE
.sp
.PP
\fBSTDOUT\fR
.RS 4
Standard output,in machine readable format (useful for communication with another \*(Aqcontroller\*(Aq program)\&. See also the
\fB\-\-meter\-data\fR
option below\&.
.RE
.sp
.RE
.PP
\fB\-\-help\fR
.RS 4
Print a short usage message and exit\&.
.RE
.PP
\fB\-\-list\-codecs\fR
.RS 4
Print a list of available codecs and then exit\&.
.RE
.PP
\fB\-\-list\-devices\fR
.RS 4
Print a list of available source devices and then exit\&.
.RE
.PP
\fB\-\-metadata\-port=\fR\fIport\fR
.RS 4
Accept metadata updates via HTTP at port
\fIport\fR\&. Default value is
\fB0\fR, which disables metadata updates\&. See the METADATA section (below) for information regarding the supported update formats\&.
.RE
.PP
\fB\-\-meter\-data\fR
.RS 4
Output meter level updates on standard output\&. Useful for driving an external metering display\&.
.RE
.PP
\fB\-\-server\-auth=\fR[\fIusername\fR][\fB:\fR\fIpassword\fR]
.RS 4
The authentication parameters to use\&. This parameter has no default\&.
.RE
.PP
\fB\-\-server\-exit\-on\-last\fR
.RS 4
Exit the program upon closure of the last player connection\&. This setting is used only by the IceStreamer server\&.
.RE
.PP
\fB\-\-server\-max\-connections=\fR\fIconns\fR
.RS 4
Allow a maximum of
\fIconns\fR
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\&.
.RE
.PP
\fB\-\-server\-pipe=\fR\fIpathname\fR
.RS 4
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
\fBglasscoder\-ipc\fR(7)
man page\&. The default is to create no UNIX socket\&. This setting is used only by the IceStreamer server\&.
.RE
.PP
\fB\-\-server\-script\-down=\fR\fIcmd\fR
.RS 4
Run the command
\fIcmd\fR
when the connection enters the
disconnected
state\&.
.RE
.PP
\fB\-\-server\-script\-up=\fR\fIcmd\fR
.RS 4
Run the command
\fIcmd\fR
when the connection enters the
connected
state\&.
.RE
.PP
\fB\-\-server\-start\-connections=\fR\fIconns\fR
.RS 4
Do not start the audio transport until at least
\fIconns\fR
connections have been established\&. Used only by the IceStreamer server in conjunction with the
\fBFILE\fR
audio device\&. Default value is
\fB0\fR
\-\-i\&.e\&. start the transport immediately\&.
.RE
.PP
\fB\-\-server\-type=\fR\fItype\fR
.RS 4
The type of streaming server to use (default is
\fBIcecast2\fR)\&. Valid values for
\fItype\fR
are:
.PP
\fBFILE\fR
.RS 4
Local file
.RE
.PP
\fBFILEARCHIVE\fR
.RS 4
Local file archive\&. Stream to a set of files on the local system, starting a new file at the beginning of each hour\&.
.RE
.PP
\fBHLS\fR
.RS 4
HLS/HTTP Live Streaming
.RE
.PP
\fBIceCast2\fR
.RS 4
IceCast v2
.RE
.PP
\fBIceOut\fR
.RS 4
Output an Icecast\-compatible stream on standard output\&.
.RE
.PP
\fBIceStreamer\fR
.RS 4
Stream directly to players using the internal Icecast\-compatible server\&.
.RE
.PP
\fBShout1\fR
.RS 4
Shoutcast v1
.RE
.PP
\fBShout2\fR
.RS 4
Shoutcast v2
.RE
.sp
.RE
.PP
\fB\-\-server\-url=\fR\fIurl\fR
.RS 4
The URL describing the server resource to stream to\&. See the SUPPORTED URL SCHEMES section (below) for a list of what URL schemes are appropriate for which server types\&.
.sp
When used with a
\fB\-\-server\-type\fR
of
\fBIceStreamer\fR, the host part of the URL is used to specify the address of the network interface to use for streaming (use
\fB0\&.0\&.0\&.0\fR
to indicate ALL interfaces)\&. This parameter has no default\&.
.RE
.PP
\fB\-\-server\-user\-agent=\fR\fIagent\-string\fR
.RS 4
The
User\-Agent
header value to use when connecting to external servers\&. Default value is
\fBGlassCoder/1\&.0\&.0\fR\&. This setting is used only by
\fBIceCast2\fR
and
\fBHLS\fR
servers\&.
.RE
.PP
\fB\-\-stream\-aim=\fR\fIaim\fR
.RS 4
The AOL Instant Messenger ID to associate with the stream\&. There is no default value\&. This setting is used only by Shoutcast servers\&.
.RE
.PP
\fB\-\-stream\-description=\fR\fIstring\fR
.RS 4
The string to show as the stream description\&. There is no default value\&. This setting is used only by Icecast servers\&.
.RE
.PP
\fB\-\-stream\-genre=\fR\fIstring\fR
.RS 4
The string to show as the stream genre\&. There is no default value\&. This setting is used only by Icecast and Shoutcast servers\&.
.RE
.PP
\fB\-\-stream\-icq=\fR\fIicq\fR
.RS 4
The ICQ ID to associate with the stream\&. There is no default value\&. This setting is used only by Shoutcast servers\&.
.RE
.PP
\fB\-\-stream\-irc=\fR\fIirc\fR
.RS 4
The Internet Relay Chat ID to associate with the stream\&. There is no default value\&. This setting is used only by Shoutcast servers\&.
.RE
.PP
\fB\-\-stream\-name=\fR\fIstring\fR
.RS 4
The string to show as the stream name\&. There is no default value\&. This setting is used only by Icecast and Shoutcast servers\&.
.RE
.PP
\fB\-\-stream\-timestamp\-offset=\fR\fIoffset\fR
.RS 4
The offset to add to the value of stream timestamps, in seconds\&. Default value is
\fB0\fR\&. This setting is used only for HLS streams\&.
.RE
.PP
\fB\-\-stream\-url=\fR\fIurl\fR
.RS 4
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\&.
.RE
.PP
\fB\-\-verbose\fR
.RS 4
Increase verbosity level of information printed to standard error\&. WARNING: this may cause cleartext passwords to printed!
.RE
.PP
\fB\-\-version\fR
.RS 4
Output version information and exit\&.
.RE
.SH "DEVICE OPTIONS"
.PP
\fBAdvanced Linux Sound Architecture\fR (\fB\-\-audio\-device=\fR\fBALSA\fR)
.RS 4
.PP
\fB\-\-alsa\-device=\fR\fIdev\fR
.RS 4
The name of the ALSA device to use\&. If no
\fB\-\-audio\-device\fR
option is given, then the
\fBhw:0\fR
device will be used\&.
.RE
.sp
.RE
.PP
\fBDirect File Streaming\fR (\fB\-\-audio\-device=\fR\fBFILE\fR)
.RS 4
.PP
\fB\-\-file\-name=\fR\fIname\fR
.RS 4
The name of the file to stream\&. If no
\fB\-\-file\-name\fR
option is given, then the name of the file will be read from standard input\&.
.RE
.sp
.RE
.PP
\fBThe Jack Audio Connection Kit\fR (\fB\-\-audio\-device=\fR\fBJACK\fR)
.RS 4
.PP
\fB\-\-jack\-client\-name=\fR\fIname\fR
.RS 4
The name of the JACK client to use\&. Default is
\fBglasscoder\fR\&.
.RE
.PP
\fB\-\-jack\-gain=\fR\fIgain\fR
.RS 4
Apply a fixed gain of
\fIgain\fR
dB before encoding\&. Default is
\fB0\fR
dB\&.
.RE
.PP
\fB\-\-jack\-server\-name=\fR\fIname\fR
.RS 4
The name of the JACK server instance to use\&.
.RE
.sp
.RE
.SH "SUPPORTED URL SCHEMES"
.PP
Not all URL schemes are supported by all server types\&. The following chart breaks down the options\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&1.\ \&Supported URL Schemes by Server Type
.TS
allbox tab(:);
cB cB cB cB.
T{
Server Type
T}:T{
FILE://
T}:T{
HTTP://
T}:T{
SFTP://
T}
.T&
l c c c
l c c c
l c c c
l c c c
l c c c
l c c c
l c c c
l c c c
l s s s
l s s s
l s s s.
T{
FILE
T}:T{
Yes
T}:T{
No
T}:T{
No
T}
T{
FILEARCHIVE
T}:T{
Yes
T}:T{
No
T}:T{
No
T}
T{
HLS
T}:T{
Yes
T}:T{
Yes [1]
T}:T{
Yes [3]
T}
T{
IceCast2
T}:T{
No
T}:T{
Yes [2]
T}:T{
No
T}
T{
IceOut
T}:T{
No
T}:T{
Yes
T}:T{
No
T}
T{
IceStreamer
T}:T{
No
T}:T{
Yes
T}:T{
No
T}
T{
Shout1
T}:T{
No
T}:T{
Yes [2]
T}:T{
No
T}
T{
Shout2
T}:T{
No
T}:T{
Yes [2]
T}:T{
No
T}
T{
[1] Utilizes the HTTP \fIPUT\fR and \fIDELETE\fR methods
T}
T{
[2] Utilizes the HTTP \fIGET\fR method
T}
T{
[3] Supports \fBssh\fR(1) password authentication only
T}
.TE
.sp 1
.SH "METADATA"
.PP
GlassCoder supports the notion of two types of metadata: "channel\-based" metadata, which applies to the stream as a whole and does not change for the duration of an encoding session; and "timed" metadata, which can be changed in synchronization with the content of the audio stream\&. Channel\-based metadata can be specified by means of options given to
\fBglasscoder\fR(1)
and will be covered in detail in the sections devoted to specific server types (below)\&.
.PP
The primary mechanism for supplying timed metadata in GlassCoder is by means of a JSON document containing the desired metadata, sent to the target
\fBglasscoder\fR(1)
instance at the port specified by the
\fB\-\-metadata\-port\fR
option by means of an HTTP
\fIPOST\fR
operation\&. The basic format of the JSON document is as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
{
"Metadata": {
"Field1": "Some value",
"Field2": "Some other value"
}
}
.fi
.if n \{\
.RE
.\}
.PP
Not all server types support metadata, and those that do utilize wildly different schemas\&. Following is a breakdown of the available metadata options by server type:
.SS "IceCast2"
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBChannel Metadata\fR
.RS 4
.PP
IceCast2 supports the following channel metadata fields:
.PP
Name
.RS 4
Specified by the
\fB\-\-stream\-name\fR
option\&.
.RE
.PP
Description
.RS 4
Specified by the
\fB\-\-stream\-description\fR
option\&.
.RE
.PP
URL
.RS 4
Should be a link to content related to the stream\&. Specified by the
\fB\-\-stream\-url\fR
option\&.
.RE
.PP
Genre
.RS 4
Should be a single word describing the nature of the stream content\&. Specified by the
\fB\-\-stream\-genre\fR
option\&.
.RE
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBTimed Metadata\fR
.RS 4
.PP
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 \*(Aq\fBArtist\fR
\-
\fBTitle\fR\*(Aq on streams containing musical content\&.
.PP
For example, to set the
StreamTitle
field to
\fBThe Beatles \- Hey Jude\fR, the following JSON could be used:
.sp
.if n \{\
.RS 4
.\}
.nf
{
"Metadata": {
"StreamTitle": "The Beatles \- Hey Jude"
}
}
.fi
.if n \{\
.RE
.\}
.sp
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBLegacy Interface\fR
.RS 4
.PP
In addition to the primary JSON interface, the
StreamTitle
can be set by sending an HTTP
\fIGET\fR
request to a running
\fBglasscoder\fR(1)
instance, using the TCP port specified in the
\fB\-\-metadata\-port=\fR\fIport\fR
option\&. The request must be in the following format:
.sp
.if n \{\
.RS 4
.\}
.nf
http://\fIhostname\fR:\fItcp\-port\fR/admin/metadata?mount=\fImount\-point\fR&mode=updinfo&song=\fIstring\fR
.fi
.if n \{\
.RE
.\}
.sp
.PP
Where:
.PP
\fIhostname\fR
\- The hostname or IP address of the system running
\fBglasscoder\fR(1)
.PP
\fItcp\-port\fR
\- The TCP port number specified in the
\fB\-\-metadata\-port\fR
option to
\fBglasscoder\fR(1)
.PP
\fImount\-point\fR
\- The mountpoint of the stream
.PP
\fIstring\fR
\- The string to set, encoded as specified in Section 2 of RFC3986
.PP
For example, to set a string of "The Beatles \- Hey Jude" via a
\fBglasscoder\fR(1)
instance running at
\fBencoder\&.example\&.com\fR
with a
\fB\-\-metadata\-port\fR
value of
\fB1234\fR
for a mountpoint of
\fBMyStream\fR, the URL would be:
.PP
\fB http://encoder\&.example\&.com:1234/admin/metadata?mount=MyStream&mode=updinfo&song=The%20Beatles%20\-%20Hey%20Jude \fR
.RE
.SS "ShoutCast"
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBChannel Metadata\fR
.RS 4
.PP
ShoutCast supports the following channel metadata fields:
.PP
Name
.RS 4
Specified by the
\fB\-\-stream\-name\fR
option\&.
.RE
.PP
URL
.RS 4
Should be a link to content related to the stream\&. Specified by the
\fB\-\-stream\-url\fR
option\&.
.RE
.PP
Genre
.RS 4
Should be a single word describing the nature of the stream content\&. Specified by the
\fB\-\-stream\-genre\fR
option\&.
.RE
.PP
ICQ ID
.RS 4
Should be User Identification Number for an ICQ user associated with the stream content\&. Specified by the
\fB\-\-stream\-icq\fR
option\&.
.RE
.PP
AOL Instant Messenger ID
.RS 4
Should be an ID for an AOL Instant Messenger user associated with the stream content\&. Specified by the
\fB\-\-stream\-aim\fR
option\&.
.RE
.PP
IRC ID
.RS 4
Should be an ID for an Internet Relay Chat channel associated with the stream content\&. Specified by the
\fB\-\-stream\-irc\fR
option\&.
.RE
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBTimed Metadata\fR
.RS 4
.PP
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 \*(Aq\fBArtist\fR
\-
\fBTitle\fR\*(Aq 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\&.
.PP
For example, to set the
StreamTitle
field to
\fBThe Beatles \- Hey Jude\fR
and the
StreamUrl
field to
\fBhttp://images\&.example\&.com/1234\&.png\fR, the following JSON could be used:
.sp
.if n \{\
.RS 4
.\}
.nf
{
"Metadata": {
"StreamTitle": "The Beatles \- Hey Jude",
"StreamUrl": "http://images\&.example\&.com/1234\&.png"
}
}
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
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\&.
.sp .5v
.RE
.RE
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBLegacy Interface\fR
.RS 4
.PP
In addition to the primary JSON interface, the
StreamTitle
and
StreamUrl
fields can be set by sending an HTTP
\fIGET\fR
request to a running
\fBglasscoder\fR(1)
instance, using the TCP port specified in the
\fB\-\-metadata\-port=\fR\fIport\fR
option\&. The request must be in the following format:
.sp
.if n \{\
.RS 4
.\}
.nf
http://\fIhostname\fR:\fItcp\-port\fR/admin\&.cgi?pass=\fIpassword\fR&mode=updinfo&song=\fIstream\-title\fR&url=\fIstream\-url\fR
.fi
.if n \{\
.RE
.\}
.sp
.PP
Where:
.PP
\fIhostname\fR
\- The hostname or IP address of the system running
\fBglasscoder\fR(1)
.PP
\fItcp\-port\fR
\- The TCP port number specified in the
\fB\-\-metadata\-port\fR
option to
\fBglasscoder\fR(1)
.PP
\fIpassword\fR
\- The ShoutCast password, encoded as specified in Section 2 of RFC3986
.PP
\fIstream\-title\fR
\- The string to set for
StreamTitle, encoded as specified in Section 2 of RFC3986
.PP
\fIstream\-url\fR
\- The string to set for
StreamUrl, encoded as specified in Section 2 of RFC3986
.PP
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
\fBglasscoder\fR(1)
instance running at
\fBencoder\&.example\&.com\fR
with a
\fB\-\-metadata\-port\fR
value of
\fB1234\fR, the URL would be:
.PP
\fB http://encoder\&.example\&.com:1234/admin\&.cgi?pass=MyPassword&mode=updinfo&song=The%20Beatles%20\-%20Hey%20Jude&url=http://image\&.example\&.com/1234\&.png \fR
.RE
.SS "HTTP Live Streams (HLS)"
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBTimed Metadata\fR
.RS 4
.PP
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)\&.
.PP
For example, a typical metadata update could use the following JSON:
.sp
.if n \{\
.RS 4
.\}
.nf
{
"Metadata": {
"TIT2": "Hey Jude",
"TPE1": "The Beatles",
"TALB": "The White Album",
"TRSO": "WXYZ Radio"
}
}
.fi
.if n \{\
.RE
.\}
.sp
.PP
A user defined text information frame (\fBTXXX\fR) can be sent by using the following special notation for the field identifier:
.PP
TXXX\fIdesc\fR
.PP
Where:
.PP
\fIdesc\fR
\- The TXXX Description string (see Section 4\&.2\&.6 of the ID3v2\&.4 Frame Specification)
.PP
For example:
.sp
.if n \{\
.RS 4
.\}
.nf
{
"Metadata": {
"TIT2": "Hey Jude",
"TPE1": "The Beatles",
"TALB": "The White Album",
"TRSO": "WXYZ Radio",
"TXXXxyz": "TXXX frame with a description string of \e"xyz\e""
}
}
.fi
.if n \{\
.RE
.\}
.sp
.RE
.SH "NOTES"
.PP
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.
.SH "BUGS"
.PP
SFTP:// transfers are done in "insecure" mode (due to crippled support for
\fBssh\fR(1)
host keys in
\fBcurl\fR(1))\&.
.PP
\fBssh\fR(1)
public key authentication is unsupported (due to crippled support for ed25519 keys in
\fBcurl\fR(1))\&.
.PP
Ogg metadata support is still missing\&.
.SH "AUTHOR"
.PP
Fred Gleason <fredg@paravelsystems\&.com>
.SH "SEE ALSO"
.PP
\fBglasscoder-ipc\fR(7),
\fBglasscommander\fR(1),
\fBglassgui\fR(1),
\fBjackd\fR(1)
.PP
RFC3986 \- Uniform Resource Identifier (URI): Generic Syntax
.PP
ID3v2\&.4 Native Frame Specification (http://id3\&.org/id3v2\&.4\&.0\-frames)
.SH "AUTHOR"
.PP
\fBFred Gleason\fR <\&fredg@paravelsystems\&.com\&>
.RS 4
Application Author
.RE
|