comparison xml/en/docs/http/ngx_http_hls_module.xml @ 953:aded7086e84f

Commercial version documentation.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 01 Aug 2013 16:31:02 +0400
parents
children 488a3f738db0
comparison
equal deleted inserted replaced
952:417dc982362e 953:aded7086e84f
1 <?xml version="1.0"?>
2
3 <!--
4 Copyright (C) Nginx, Inc.
5 -->
6
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8
9 <module name="Module ngx_http_hls_module"
10 link="/en/docs/http/ngx_http_hls_module.html"
11 lang="en"
12 rev="1">
13
14 <section id="summary">
15
16 <para>
17 The module <literal>ngx_http_hls_module</literal> provides HTTP Live Streaming
18 (HLS) server-side support for H.264/AAC files typically having filename
19 extensions <path>.mp4</path>, <path>.m4v</path>, and <path>.m4a</path>.
20 </para>
21
22 <para>
23 Two URIs are supported for each MP4 file:
24 <list type="bullet">
25
26 <listitem>
27 The playlist URI that ends with “<literal>.m3u8</literal>” and accepts
28 the optional “<literal>len</literal>” argument that defines fragment length
29 in seconds;
30 </listitem>
31
32 <listitem>
33 The fragment URI that ends with “<literal>.ts</literal>” and accepts
34 “<literal>start</literal>” and “<literal>end</literal>” arguments that
35 define fragment boundaries in seconds.
36 </listitem>
37
38 </list>
39 </para>
40
41 <para>
42 <note>
43 This module is available as part of our <commercial_version/> only.
44 </note>
45 </para>
46
47 </section>
48
49
50 <section id="example" name="Example Configuration">
51
52 <para>
53 <example>
54 location /video/ {
55 hls;
56 hls_fragment 5s;
57 hls_buffers 10 10m;
58 hls_mp4_buffer_size 1m;
59 hls_mp4_max_buffer_size 5m;
60 alias /var/video/;
61 }
62 </example>
63 For example, the following URIs are supported for
64 the “<path>/var/video/test.mp4</path>” file:
65 <example>
66 http://hls.example.com/video/test.mp4.m3u8?len=8.000
67 http://hls.example.com/video/test.mp4.ts?start=1.000&amp;end=2.200
68 </example>
69 </para>
70
71 </section>
72
73
74 <section id="directives" name="Directives">
75
76 <directive name="hls">
77 <syntax/>
78 <default/>
79 <context>location</context>
80
81 <para>
82 Turns on HLS streaming in a surrounding location.
83 </para>
84
85 </directive>
86
87
88 <directive name="hls_buffers">
89 <syntax><value>number</value> <value>size</value></syntax>
90 <default>8 2m</default>
91 <context>http</context>
92 <context>server</context>
93 <context>location</context>
94
95 <para>
96 Sets the maximum <value>number</value> and <value>size</value> of buffers
97 for reading and writing data frames.
98 </para>
99
100 </directive>
101
102
103 <directive name="hls_fragment">
104 <syntax><value>time</value></syntax>
105 <default>5s</default>
106 <context>http</context>
107 <context>server</context>
108 <context>location</context>
109
110 <para>
111 Defines fragment length for playlist URIs requested without the
112 “<literal>len</literal>” argument.
113 </para>
114
115 </directive>
116
117
118 <directive name="hls_mp4_buffer_size">
119 <syntax><value>size</value></syntax>
120 <default>512k</default>
121 <context>http</context>
122 <context>server</context>
123 <context>location</context>
124
125 <para>
126 Sets the initial <value>size</value> of a memory buffer used to
127 process MP4 files.
128 </para>
129
130 </directive>
131
132
133 <directive name="hls_mp4_max_buffer_size">
134 <syntax><value>size</value></syntax>
135 <default>10m</default>
136 <context>http</context>
137 <context>server</context>
138 <context>location</context>
139
140 <para>
141 During metadata processing, a larger buffer may become necessary.
142 Its size cannot exceed the specified <value>size</value>,
143 or else nginx will return the server error
144 <http-status code="500" text="Internal Server Error"/>,
145 and log the following:
146 <example>
147 "/some/movie/file.mp4" mp4 moov atom is too large:
148 12583268, you may want to increase hls_mp4_max_buffer_size
149 </example>
150 </para>
151
152 </directive>
153
154 </section>
155
156 </module>