Mercurial > hg > nginx-site
changeset 1476:c20c2b945f8c
Added new URI arguments, corrected file formats in hls.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 15 May 2015 16:11:59 +0300 |
parents | 1179ca80e110 |
children | ad8a1fae0b72 |
files | xml/en/docs/http/ngx_http_hls_module.xml xml/ru/docs/http/ngx_http_hls_module.xml |
diffstat | 2 files changed, 63 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_hls_module.xml Fri May 08 13:42:51 2015 +0000 +++ b/xml/en/docs/http/ngx_http_hls_module.xml Fri May 15 16:11:59 2015 +0300 @@ -9,29 +9,50 @@ <module name="Module ngx_http_hls_module" link="/en/docs/http/ngx_http_hls_module.html" lang="en" - rev="4"> + rev="5"> <section id="summary"> <para> The <literal>ngx_http_hls_module</literal> module provides HTTP Live Streaming -(HLS) server-side support for H.264/AAC files. +(HLS) server-side support for MP4 and MOV media files. Such files typically have the <path>.mp4</path>, <path>.m4v</path>, -or <path>.m4a</path> filename extensions. +<path>.m4a</path>, <path>.mov</path> or <path>.qt</path> file extensions. +The module supports H.264 video codec, AAC and MP3 audio codecs. </para> <para> -nginx supports two URIs for each MP4 file: +For each media file, two types of URI are supported: +<list type="bullet"> + +<listitem> +a playlist URI with the “<literal>.m3u8</literal>” file extension. +The URI can accept optional arguments: <list type="bullet"> <listitem> -The playlist URI that ends with “<literal>.m3u8</literal>” and accepts -the optional “<literal>len</literal>” argument that defines the fragment length -in seconds; +“<literal>start</literal>” and “<literal>end</literal>” +define playlist boundaries in seconds (1.9.0); </listitem> <listitem> -The fragment URI that ends with “<literal>.ts</literal>” and accepts +“<literal>offset</literal>” shifts an initial playback position +to the time offset in seconds (1.9.0). +A positive value sets a time offset from the beginning of the playlist. +A negative value sets a time offset +from the end of the last fragment in the playlist; +</listitem> + +<listitem> +“<literal>len</literal>” defines the fragment length in seconds, +</listitem> +</list> + +</listitem> + +<listitem> +a fragment URI with the “<literal>.ts</literal>” file extension. +The URI can accept optional “<literal>start</literal>” and “<literal>end</literal>” arguments that define fragment boundaries in seconds. </listitem> @@ -65,6 +86,7 @@ With this configuration, the following URIs are supported for the “<path>/var/video/test.mp4</path>” file: <example> +http://hls.example.com/video/test.mp4.m3u8?offset=1.000&start=1.000&end=2.200 http://hls.example.com/video/test.mp4.m3u8?len=8.000 http://hls.example.com/video/test.mp4.ts?start=1.000&end=2.200 </example> @@ -218,7 +240,7 @@ <para> Sets the initial <value>size</value> of the buffer used for -processing MP4 files. +processing MP4 and MOV files. </para> </directive>
--- a/xml/ru/docs/http/ngx_http_hls_module.xml Fri May 08 13:42:51 2015 +0000 +++ b/xml/ru/docs/http/ngx_http_hls_module.xml Fri May 15 16:11:59 2015 +0300 @@ -9,29 +9,50 @@ <module name="Module ngx_http_hls_module" link="/ru/docs/http/ngx_http_hls_module.html" lang="ru" - rev="4"> + rev="5"> <section id="summary"> <para> Модуль <literal>ngx_http_hls_module</literal> обеспечивает серверную поддержку -протокола HTTP Live Streaming (HLS) для файлов в формате H.264/AAC. -Такие файлы обычно имеют расширения -<path>.mp4</path>, <path>.m4v</path> и <path>.m4a</path>. +протокола HTTP Live Streaming (HLS) для медиафайлов в формате MP4 и MOV. +Такие файлы обычно имеют расширения <path>.mp4</path>, <path>.m4v</path> +<path>.m4a</path>, <path>.mov</path> или <path>.qt</path>. +Модуль поддерживает видеокодек H.264, аудиокодеки AAC и MP3. </para> <para> -nginx поддерживает два вида URI для каждого MP4-файла: +Для каждого медиафайла поддерживается два вида URI: +<list type="bullet"> + +<listitem> +URI плейлиста, имеющего расширение “<literal>.m3u8</literal>”. +URI может принимать необязательные аргументы: <list type="bullet"> <listitem> -URI плейлиста, имеющий расширение “<literal>.m3u8</literal>” и принимающий -необязательный аргумент “<literal>len</literal>”, -который задаёт длину фрагмента в секундах; +“<literal>start</literal>” и “<literal>end</literal>” +задают границы плейлиста в секундах (1.9.0); </listitem> <listitem> -URI фрагмента, имеющий расширение “<literal>.ts</literal>” и принимающий +“<literal>offset</literal>” сдвигает первоначальную позицию воспроизведения +на указанное время в секундах (1.9.0). +Положительное значение задаёт временной сдвиг с начала плейлиста. +Отрицательное значение задаёт временной сдвиг с конца последнего фрагмента +в плейлисте; +</listitem> + +<listitem> +“<literal>len</literal>” задаёт длину фрагмента в секундах, +</listitem> +</list> + +</listitem> + +<listitem> +URI фрагмента, имеющего расширение “<literal>.ts</literal>”. +URI может принимать необязательные аргументы “<literal>start</literal>” и “<literal>end</literal>”, которые задают границы фрагмента в секундах. </listitem> @@ -65,6 +86,7 @@ В такой конфигурации для файла “<path>/var/video/test.mp4</path>” будут поддерживаться следующие URI: <example> +http://hls.example.com/video/test.mp4.m3u8?offset=1.000&start=1.000&end=2.200 http://hls.example.com/video/test.mp4.m3u8?len=8.000 http://hls.example.com/video/test.mp4.ts?start=1.000&end=2.200 </example> @@ -218,7 +240,7 @@ <para> Задаёт начальный <value>размер</value> буфера, используемого для -обработки MP4-файлов. +обработки MP4 и MOV-файлов. </para> </directive>