X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cubemap.config.sample;h=967059c7a62b369d2db9232cdbf34ca53b336159;hb=3a1d58dee269fdca9cab7f482e4e8695b3fb2ffd;hp=51c46d317a4a017bfcabb15ba2cc5eafeffb084e;hpb=581694ded2a2de99cad7383f04a0ee1fb588f27d;p=cubemap diff --git a/cubemap.config.sample b/cubemap.config.sample index 51c46d3..967059c 100644 --- a/cubemap.config.sample +++ b/cubemap.config.sample @@ -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= overrides the backlog, which is normally 10 MB.