forked from carsten-gross/ts2shout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ts2shout.1
77 lines (69 loc) · 3.39 KB
/
ts2shout.1
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
.TH TS2SHOUT 1L "17.03.2019" "User Commands" "Linux Users's Manual"
.SH NAME
.B ts2shout - Convert a MPEG transport stream to shoutcast, plain mpeg or AC-3 audio
.SH SYNOPSIS
.B t2shout [noshout] [ac3] [rds]
.sp
.B cat mpeg-transport.ts | ts2shout noshout > audio.mpeg
.sp
.B cat mpeg-transport.ts | ts2shout noshout ac3 > audio.ac3
.sp
.B [Installation of ts2shout as cgi application]
.sp
.SH DESCRIPTION
.B ts2shout
is a classic unix filter program, further described on http://www.siski.de/~carsten/radio-streaming-squeezebox.html.
As a unix filter you can feed an audio mpeg transport stream directly into stdin of the application. It will
give you a shoutcast audio stream (makes only sense in conjunction with a web server) or a plain mpeg audio stream. It
can even generate AC-3 if it is included in the mpeg transport stream. There are some german radio stations having this.
.sp
Another application is to use it as CGI (common gateway interface) application called directly from apache. Please see
the accompaining documenation of the package. Wether CGI or filter mode is to be used is decided by the enviroment variable
QUERY_STRING, if it is set it is assumed that it is running in CGI mode.
.sp
Normally
.B ts2shout
is installed as a mod_action in an web server application like apache. For
test cases it is always possible to use it at the command prompt to manually
convert an mpeg transport stream into native mpeg audio. You have to use
the option \fB noshout \fR then.
.sp
Used as a webfilter it converts from MIME type audio/mp2t to audio/mpeg (or audio/ac3 if ac3 environment is set)
.SH OPTIONS
.B noshout
write a native mpeg stream, not a shoutcast media stream
.B ac3
write the ac3 stream, not the mpeg audio.
.B rds
if available, prefer RDS data over MPEG EIT (EPG data)
.SH ENVIRONMENT
The Environment variables determine whether the application runs in filter or in CGI mode.
.sp
.B QUERY_STRING
if set it is assumed that we are called as CGI application. The behaviour of the application changes (autodetect MPEG parameters and station name and put it into HTTP headers). If you want even faster startup of your streaming, you should use the application in filter mode.
.sp
.B TVHEADEND
gives the tvheadend URL for fetching the mpeg transport stream. In most cases it will be http://localhost:9981/stream/channelnumber
.sp
.B PROGRAMMNO
gives the number of the tvheadend channelnumber. See the example given in README.md.
.sp
.B MetaData
If set to 1 the output should be done shoutcast compatible. This flag should only be set if the "Icy-MetaData: 1" header is set in the HTTP request.
.sp
.B AC3
If set to 1 only an AC-3 stream is wanted. Normal mpeg audio is ignored and
.B not
delivered if this is given.
.sp
.B RDS
If set to 1 the mpeg stream is scannend for RDS data. If found it is preferred over MPEG EIT. This is supported by DVB-S streams from germany and switzerland (NOT by austria)
.sp
.SH FILES
A cache file \fB /var/tmp/ts2shout.cache \fR is created and used. It caches necessary http header parameters for shoutcast streaming to reduce streaming startup time. You can remove this cache file at any time, it will be recreated if needed.
.SH BUGS
The whole mpeg transport handling stuff is kept "as minimal as possible" to
keep the application small and understandable. Detection of AC-3 stream
parameters is done in a very lightwight way.
.SH "SEE ALSO"
.BR apache2 (1), tvheadend (1), mpg123 (1), curl (1)