X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=streaming.rst;h=13d68db3377d1715f247764b524aff164b20e0c2;hb=a6edc4466735e82826fe5e47a2b582498f74d404;hp=3f6e754903bdd88b4719b42dbfc493b2664f1776;hpb=70e5848af3a67e5465f30698cbdce3375162b143;p=nageru-docs diff --git a/streaming.rst b/streaming.rst index 3f6e754..13d68db 100644 --- a/streaming.rst +++ b/streaming.rst @@ -18,7 +18,7 @@ Transcoded streaming Transcoded streaming was the only option supported before 1.3.0, and in many ways the conceptually simplest from Nageru's point of view. In this mode, Nageru outputs its “digital intermediate” -H.264 stream (see `:ref:digital-intermediate`), and you are +H.264 stream (see :ref:`digital-intermediate`), and you are responsible for transcoding it into a format that is suitable for streaming to clients. Thus, you can run Nageru on a regular laptop and then use e.g. a short-term virtual machine in the cloud @@ -46,9 +46,9 @@ most browsers in the \ tag:: http://http://yourserver.example.org:9095/stream.nut vlc://quit \ --sout '#transcode{vcodec=h264,vb=1500,acodec=mp4a,aenc=fdkaac,ab=128}:std{mux=ffmpeg{mux=mp4},access=http{mime=video/mp4},dst=:1994}' \ --sout-avformat-options '{movflags=empty_moov+frag_keyframe+default_base_moof}' \ - --sout-x264-vbv-maxrate 1500 --sout-x264-vbv-bufsize 1500 --sout-mux-caching 3000 \ - --sout-x264-keyint 50 --sout-mux-caching 3000 \ - --sout-x264-tune film --sout-x264-preset slow + --sout-x264-vbv-maxrate 1500 --sout-x264-vbv-bufsize 1500 \ + --sout-x264-keyint 50 --sout-x264-tune film --sout-x264-preset slow \ + --sout-mux-caching 3000 sleep 1 done @@ -104,11 +104,14 @@ flag; e.g.:: --http-mux mp4 --http-audio-codec libfdk_aac --http-audio-bitrate 128 Note the use here of the MP4 mux and AAC audio. “libfdk_aac” signals -te use of Franhofer's `FDK-AAC `_ encoder +the use of Franhofer's `FDK-AAC `_ encoder from Android; it yields significantly better sound quality than e.g. FAAC, and it is open source, but under a somewhat cumbersome license. For this reason, most distributions do not compile FFmpeg with the FDK-AAC codec, so you will need to compile FFmpeg yourself, or use a worse codec. +FFmpeg `recommends `_ +their own native AAC encoder (simply called “aac”) in the absence of any +external libraries. For speed control, you can use:: @@ -117,7 +120,9 @@ For speed control, you can use:: There are many more parameters, in particular “--x264-bitrate” to control the nominal bitrate (4500 kbit/sec per default, plus audio). Most of them -are usually fine at the default, though. +are usually fine at the default, though. Note that you can change the +x264 bitrate on-the-fly from the video menu; this is primarily useful +if your network conditions change abruptly. A particular note about the MP4 mux: If you plan to stream for long periods continuously (more than about 12–24 hours), the 32-bit timestamps may wrap @@ -144,3 +149,17 @@ spikes of 2x the nominal bitrate, but only on a one-second basis) and TCP retransmits. See the cubemap documentation for more information about how to set up pacing. +For transcoded Cubemap output from VLC you can take exactly the same line as +earlier, just adding “metacube” to the HTTP options:: + + while :; do + vlc -I dummy -v --network-caching 3000 \ + http://http://yourserver.example.org:9095/stream.nut vlc://quit \ + --sout '#transcode{vcodec=h264,vb=1500,acodec=mp4a,aenc=fdkaac,ab=128}:std{mux=ffmpeg{mux=mp4},access=http{mime=video/mp4,metacube},dst=:1994}' \ + --sout-avformat-options '{movflags=empty_moov+frag_keyframe+default_base_moof}' \ + --sout-x264-vbv-maxrate 1500 --sout-x264-vbv-bufsize 1500 \ + --sout-x264-keyint 50 --sout-x264-tune film --sout-x264-preset slow \ + --sout-mux-caching 3000 + sleep 1 + done +