mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-16 01:51:35 +08:00
fixed code blocks
This commit is contained in:
28
index.html
28
index.html
@ -64,10 +64,11 @@ readable form</p></li>
|
|||||||
|
|
||||||
<h2>Build:</h2>
|
<h2>Build:</h2>
|
||||||
<p>cd to NGINX source directory & run this:</p>
|
<p>cd to NGINX source directory & run this:</p>
|
||||||
<code>./configure --add-module=
|
<pre>
|
||||||
|
./configure --add-module=/path/to.nginx-rtmp-module
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
</code>
|
</pre>
|
||||||
|
|
||||||
<h2>Example nginx.conf</h2>
|
<h2>Example nginx.conf</h2>
|
||||||
|
|
||||||
@ -75,11 +76,8 @@ make install
|
|||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
rtmp {
|
rtmp {
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|
||||||
listen 1935;
|
listen 1935;
|
||||||
|
|
||||||
application mytv {
|
application mytv {
|
||||||
|
|
||||||
# enable live streaming
|
# enable live streaming
|
||||||
@ -99,7 +97,7 @@ rtmp {
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3>Transcoding</h3>
|
<h3>Transcoding</h3>
|
||||||
<code>
|
<pre>
|
||||||
application big {
|
application big {
|
||||||
live on;
|
live on;
|
||||||
|
|
||||||
@ -122,10 +120,10 @@ rtmp {
|
|||||||
live on;
|
live on;
|
||||||
# Video with reduced resolution comes here from ffmpeg
|
# Video with reduced resolution comes here from ffmpeg
|
||||||
}
|
}
|
||||||
</code>
|
</pre>
|
||||||
|
|
||||||
<h3>Pushing stream</h3>
|
<h3>Pushing stream</h3>
|
||||||
<code>
|
<pre>
|
||||||
application mypush {
|
application mypush {
|
||||||
live on;
|
live on;
|
||||||
|
|
||||||
@ -135,10 +133,10 @@ rtmp {
|
|||||||
push rtmp1.example.com;
|
push rtmp1.example.com;
|
||||||
push rtmp2.example.com:1934;
|
push rtmp2.example.com:1934;
|
||||||
}
|
}
|
||||||
</code>
|
</pre>
|
||||||
|
|
||||||
<h3>Pulling stream</h3>
|
<h3>Pulling stream</h3>
|
||||||
<code>
|
<pre>
|
||||||
application mypull {
|
application mypull {
|
||||||
live on;
|
live on;
|
||||||
|
|
||||||
@ -146,24 +144,24 @@ rtmp {
|
|||||||
# and play locally
|
# and play locally
|
||||||
pull rtmp://rtmp3.example.com pageUrl=www.example.com/index.html;
|
pull rtmp://rtmp3.example.com pageUrl=www.example.com/index.html;
|
||||||
}
|
}
|
||||||
</code>
|
</pre>
|
||||||
|
|
||||||
<h3>Video on demand</h3>
|
<h3>Video on demand</h3>
|
||||||
<code>
|
<pre>
|
||||||
application vod {
|
application vod {
|
||||||
play /var/flvs;
|
play /var/flvs;
|
||||||
}
|
}
|
||||||
</code>
|
</pre>
|
||||||
|
|
||||||
<h3>HLS (HTTP Live Streaming)</h3>
|
<h3>HLS (HTTP Live Streaming)</h3>
|
||||||
<code>
|
<pre>
|
||||||
application hls {
|
application hls {
|
||||||
hls on;
|
hls on;
|
||||||
hls_path /tmp/app;
|
hls_path /tmp/app;
|
||||||
hls_fragment 5s;
|
hls_fragment 5s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</code>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h2>>Donation:</h2>
|
<h2>>Donation:</h2>
|
||||||
|
Reference in New Issue
Block a user