]> git.sesse.net Git - cubemap/blobdiff - cubemap.config.sample
Create $(libdir) on make install.
[cubemap] / cubemap.config.sample
index e7119ffb62cf529a07024eead7b0ae78c449f8f9..967059c7a62b369d2db9232cdbf34ca53b336159 100644 (file)
@@ -11,8 +11,8 @@ num_servers 1
 #
 # You may specify multiple input ports; save for TLS settings (TLS is automatically
 # enabled for a port if you give a key pair), they are treated exactly the same.
-# “port N” is equivalent to “listen [::]:N”. TLS requires kTLS support (Linux >= 4.13,
-# CONFIG_TLS enabled).
+# “port N” is equivalent to “listen [::]:N”. TLS requires kTLS support with both
+# RX and TX (Linux >= 4.17, CONFIG_TLS enabled).
 #
 port 9094
 # listen 127.0.0.1:9095
@@ -81,6 +81,20 @@ stream /test.ts src=http://gruessi.zrh.sesse.net:4013/test.ts src_encoding=raw
 # to be some reasonable fraction of your fragment length.
 stream /stream.mp4 src=http://gruessi.zrh.sesse.net:9095/test.mp4.metacube hls_playlist=/stream.m3u8 hls_frag_duration=6 backlog_size=20971520 hls_backlog_margin=1048576 allow_origin=*
 
+# An example of using pipe: to read from a program that generates Metacube
+# on standard output (or you can use src_encoding=raw for MPEG_TS).
+# This shows how to use FFmpeg, combined with a LD_PRELOAD hack
+# (the .so file is built with Cubemap if you have the FFmpeg development
+# libraries instealled), to receive MPEG-TS over SRT and remux it into MP4.
+# Note that using ffmpeg_metacube_hack.so is experimental and not recommended
+# if you can avoid it.
+#
+# Only one instance of the command will be started at a time (it will drive a
+# stream just like an HTTP input will). Such subprocesses will survive
+# a Cubemap reload, but can of course themselves not be live-reloaded
+# like Cubemap can. Standard error will be passed through unchanged.
+stream /srt.mp4 src=pipe:"LD_PRELOAD=ffmpeg_metacube_hack.so ffmpeg -loglevel warning -i 'srt://[::]:9710?mode=listener' -c:v copy -c:a copy -f mp4 -movflags empty_moov+frag_keyframe+default_base_moof+skip_trailer -frag_duration 125000 -bsf:a aac_adtstoasc -"
+
 # UDP input. TS is the most common container to use over UDP (you cannot
 # take any arbitrary container and expect it to work).
 # backlog_size=<number of bytes> overrides the backlog, which is normally 10 MB.