Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_hls_module.xml @ 956:488a3f738db0
Text revision of commercial modules.
author | Egor Nikitin <yegor.nikitin@gmail.com> |
---|---|
date | Fri, 02 Aug 2013 10:28:49 +0400 |
parents | aded7086e84f |
children | 379cb572a7ec |
comparison
equal
deleted
inserted
replaced
955:28d580f1eb63 | 956:488a3f738db0 |
---|---|
12 rev="1"> | 12 rev="1"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The module <literal>ngx_http_hls_module</literal> provides HTTP Live Streaming | 17 The <literal>ngx_http_hls_module</literal> module provides HTTP Live Streaming |
18 (HLS) server-side support for H.264/AAC files typically having filename | 18 (HLS) server-side support for H.264/AAC files. |
19 extensions <path>.mp4</path>, <path>.m4v</path>, and <path>.m4a</path>. | 19 Such files typically have the <path>.mp4</path>, <path>.m4v</path>, |
20 or <path>.m4a</path> filename extensions. | |
20 </para> | 21 </para> |
21 | 22 |
22 <para> | 23 <para> |
23 Two URIs are supported for each MP4 file: | 24 nginx supports two URIs for each MP4 file: |
24 <list type="bullet"> | 25 <list type="bullet"> |
25 | 26 |
26 <listitem> | 27 <listitem> |
27 The playlist URI that ends with “<literal>.m3u8</literal>” and accepts | 28 The playlist URI that ends with “<literal>.m3u8</literal>” and accepts |
28 the optional “<literal>len</literal>” argument that defines fragment length | 29 the optional “<literal>len</literal>” argument that defines the fragment length |
29 in seconds; | 30 in seconds; |
30 </listitem> | 31 </listitem> |
31 | 32 |
32 <listitem> | 33 <listitem> |
33 The fragment URI that ends with “<literal>.ts</literal>” and accepts | 34 The fragment URI that ends with “<literal>.ts</literal>” and accepts |
58 hls_mp4_buffer_size 1m; | 59 hls_mp4_buffer_size 1m; |
59 hls_mp4_max_buffer_size 5m; | 60 hls_mp4_max_buffer_size 5m; |
60 alias /var/video/; | 61 alias /var/video/; |
61 } | 62 } |
62 </example> | 63 </example> |
63 For example, the following URIs are supported for | 64 With this configuration, the following URIs are supported for |
64 the “<path>/var/video/test.mp4</path>” file: | 65 the “<path>/var/video/test.mp4</path>” file: |
65 <example> | 66 <example> |
66 http://hls.example.com/video/test.mp4.m3u8?len=8.000 | 67 http://hls.example.com/video/test.mp4.m3u8?len=8.000 |
67 http://hls.example.com/video/test.mp4.ts?start=1.000&end=2.200 | 68 http://hls.example.com/video/test.mp4.ts?start=1.000&end=2.200 |
68 </example> | 69 </example> |
77 <syntax/> | 78 <syntax/> |
78 <default/> | 79 <default/> |
79 <context>location</context> | 80 <context>location</context> |
80 | 81 |
81 <para> | 82 <para> |
82 Turns on HLS streaming in a surrounding location. | 83 Turns on HLS streaming in the surrounding location. |
83 </para> | 84 </para> |
84 | 85 |
85 </directive> | 86 </directive> |
86 | 87 |
87 | 88 |
92 <context>server</context> | 93 <context>server</context> |
93 <context>location</context> | 94 <context>location</context> |
94 | 95 |
95 <para> | 96 <para> |
96 Sets the maximum <value>number</value> and <value>size</value> of buffers | 97 Sets the maximum <value>number</value> and <value>size</value> of buffers |
97 for reading and writing data frames. | 98 that are used for reading and writing data frames. |
98 </para> | 99 </para> |
99 | 100 |
100 </directive> | 101 </directive> |
101 | 102 |
102 | 103 |
106 <context>http</context> | 107 <context>http</context> |
107 <context>server</context> | 108 <context>server</context> |
108 <context>location</context> | 109 <context>location</context> |
109 | 110 |
110 <para> | 111 <para> |
111 Defines fragment length for playlist URIs requested without the | 112 Defines the default fragment length for playlist URIs requested without the |
112 “<literal>len</literal>” argument. | 113 “<literal>len</literal>” argument. |
113 </para> | 114 </para> |
114 | 115 |
115 </directive> | 116 </directive> |
116 | 117 |
121 <context>http</context> | 122 <context>http</context> |
122 <context>server</context> | 123 <context>server</context> |
123 <context>location</context> | 124 <context>location</context> |
124 | 125 |
125 <para> | 126 <para> |
126 Sets the initial <value>size</value> of a memory buffer used to | 127 Sets the initial <value>size</value> of the memory buffer used to |
127 process MP4 files. | 128 process MP4 files. |
128 </para> | 129 </para> |
129 | 130 |
130 </directive> | 131 </directive> |
131 | 132 |
140 <para> | 141 <para> |
141 During metadata processing, a larger buffer may become necessary. | 142 During metadata processing, a larger buffer may become necessary. |
142 Its size cannot exceed the specified <value>size</value>, | 143 Its size cannot exceed the specified <value>size</value>, |
143 or else nginx will return the server error | 144 or else nginx will return the server error |
144 <http-status code="500" text="Internal Server Error"/>, | 145 <http-status code="500" text="Internal Server Error"/>, |
145 and log the following: | 146 and log the following message: |
146 <example> | 147 <example> |
147 "/some/movie/file.mp4" mp4 moov atom is too large: | 148 "/some/movie/file.mp4" mp4 moov atom is too large: |
148 12583268, you may want to increase hls_mp4_max_buffer_size | 149 12583268, you may want to increase hls_mp4_max_buffer_size |
149 </example> | 150 </example> |
150 </para> | 151 </para> |