X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=streaming.rst;h=d6c44560b0ce5b882a7eaeb677510d77443f350a;hb=d05957f384f380709e28fac4476002e6207ad1aa;hp=2f028995988fd9222d0f9bddd049a6d82fa41084;hpb=ffca4f8bc2edb22a1b7213f2efff642ea966d4cd;p=nageru-docs diff --git a/streaming.rst b/streaming.rst index 2f02899..d6c4456 100644 --- a/streaming.rst +++ b/streaming.rst @@ -12,6 +12,8 @@ machines you may have available, you can choose two different approaches for streaming: **Transcoded** or **direct**. +.. _transcoded-streaming: + Transcoded streaming -------------------- @@ -46,9 +48,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 +106,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:: @@ -146,3 +151,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 +