]> git.sesse.net Git - cubemap/blob - cubemap.config.sample
Better documentation of config options in cubemap.config.sample.
[cubemap] / cubemap.config.sample
1 # Uncomment to run in the background. Note that in daemonized mode, all filenames
2 # are relative to an undefined directory, so you should use absolute paths for
3 # error_log, stats_file, etc.
4
5 #daemonize
6
7 # For low-traffic servers (less than a gigabit or two), num_servers 1 is fine.
8 # For best performance in high-traffic situations, you want one for each CPU.
9 num_servers 1
10
11 #
12 # All input ports are treated exactly the same, but you may use multiple ones nevertheless.
13 #
14 port 9094
15 # listen 127.0.0.1:9095
16 # listen [::1]:9095
17
18 stats_file cubemap.stats
19 stats_interval 60
20
21 input_stats_file cubemap-input.stats
22 input_stats_interval 60
23
24 # Logging of clients as they disconnect (and as such as no longer visible in the stats file).
25 # You can only have zero or one of these.
26 access_log access.log
27
28 # Logging of various informational and error messages. You can have as many of these as you want.
29 error_log type=file filename=cubemap.log
30 error_log type=syslog
31 error_log type=console
32
33 #
34 # Now the streams! There are two types of streams; stream (HTTP output)
35 # and udpstream (UDP output). Let's take stream first.
36 #
37
38 # A basic form of stream, with HTTP input. Often, you will need no more than this.
39 # The input must be Metacube framed (VLC can produce this with an option).
40 stream /test.flv src=http://gruessi.zrh.sesse.net:4013/test.flv
41
42 # Streams can share the same input (the same is reused, no extra bandwidth needed).
43 # force_prebuffer=<number of bytes> is a parameter where we don't start sending
44 # any data to a newly connected client before we can do that many bytes at once.
45 # This is useful for clients that don't properly buffer themselves before starting
46 # playing, e.g., most web browsers and some Flash players when playing from HTTP
47 # (e.g., JW Player).
48 stream /test-jwplayer.flv src=http://gruessi.zrh.sesse.net:4013/test.flv force_prebuffer=1500000
49
50 # encoding=metacube means the _output_ will be Metacube framed. This is useful
51 # for sending on to another Cubemap instance.
52 stream /test.flv.metacube src=http://gruessi.zrh.sesse.net:4013/test.flv encoding=metacube
53
54 # UDP input. TS is the most common container to use over UDP (you cannot
55 # take any arbitrary container and expect it to work).
56 # backlog_size=<number of bytes> overrides the backlog, which is normally 10 MB.
57 # If clients fall more behind than the backlog (plus the socket buffer),
58 # they will drop data, so if you have extremely high-bitrate streams, you may want
59 # to increase this. Or conversely, if you have little RAM and many streams
60 # (or many servers) you can decrease it.
61 stream /udp.ts src=udp://@:1234 backlog_size=1048576
62
63 # An example of IPv4 multicast input. Cubemap will subscribe to the given group
64 # and wait for data sent by any sender to the given port.
65 # pacing_rate_kbit=<number of kilobit/sec> will ask the kernel to hard-limit
66 # the TCP transfer rate, including retransmits, to the given speed. (This is a
67 # no-op if you do not use the sch_fq packet scheduler, which is not the default
68 # but can be set in Linux 3.13 and newer using tc.) This is extremely
69 # useful for reducing packet loss and thus including throughput, since it means
70 # that packets arrive smoothly instead of in tight bursts, which will often
71 # overload underbuffered routers and cause drops (imagine receiving a 100 kB
72 # keyframe at 10gig speeds, and then having to meter it out over 5 Mbit ADSL).
73 # The rate should be a bit higher than your stream bitrate to allow for retransmits.
74 stream /udp-multicast.ts src=udp://@233.252.0.2:1234 pacing_rate_kbit=2000
75
76 # IPv6 SSM (Single Source Multicast) input. Subscribes to the given group and
77 # waits for packets from the given sender only. SSM is nicer than ASM in that
78 # it does not require a Rendezvous Point (RP) and other complexity, but is
79 # often poorly supported in various network equipment.
80 stream /udp-multicast-ssmv6.ts src=udp://[2001:67c:29f4::32]@[ff3e::1000:0]:1234 pacing_rate_kbit=20000
81
82 # udpstream takes src= inputs just like stream does, but instead of waiting
83 # for TCP connections on ports, it immediately sends the packets out over UDP.
84 # (As with UDP input, this probably only works well for TS mux.)
85 udpstream [2001:67c:29f4::50]:5000 src=http://pannekake.samfundet.no:9094/frikanalen.ts.metacube
86
87 # udpstream takes pacing_rate_kbit= just like stream. None of the other options
88 # make sense.
89 udpstream 193.35.52.50:5001 src=http://pannekake.samfundet.no:9094/frikanalen.ts.metacube pacing_rate_kbit=2000
90
91 # IPv4 multicast output, to the given group. You can explicitly set the TTL
92 # and/or multicast output interface, if the defaults do not suit you.
93 udpstream 233.252.0.1:5002 src=http://pannekake.samfundet.no:9094/frikanalen.ts.metacube ttl=32 multicast_output_interface=eth1