Mercurial > hg > nginx-site
changeset 2797:17ed19394953
Documented the mp4_start_key_frame directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 15 Nov 2021 12:52:47 +0000 |
parents | bcdb13e1e8c6 |
children | cf75284a3557 |
files | xml/en/docs/http/ngx_http_mp4_module.xml xml/ru/docs/http/ngx_http_mp4_module.xml |
diffstat | 2 files changed, 66 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_mp4_module.xml +++ b/xml/en/docs/http/ngx_http_mp4_module.xml @@ -9,7 +9,7 @@ <module name="Module ngx_http_mp4_module" link="/en/docs/http/ngx_http_mp4_module.html" lang="en" - rev="8"> + rev="9"> <section id="summary"> @@ -82,6 +82,18 @@ stream with the requested time range, an This has the same overhead as described above. </para> +<para id="keyframe"> +If the <literal>start</literal> argument points to +a non-key video frame, +the beginning of such video will be broken. +To fix this issue, the video +<link id="mp4_start_key_frame">can</link> be prepended with +the key frame before <literal>start</literal> point +and with all intermediate frames between them. +These frames will be hidden from playback +using an edit list (1.21.4). +</para> + <para> If a matching request does not include the <literal>start</literal> and <literal>end</literal> @@ -231,6 +243,26 @@ This directive is available as part of o </directive> + +<directive name="mp4_start_key_frame"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>off</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>1.21.4</appeared-in> + +<para> +Forces output video to always start with a key video frame. +If the <literal>start</literal> argument does not point to a key frame, +initial frames are hidden using an mp4 edit list. +Edit lists are supported by major players and browsers such as +Chrome, Safari, QuickTime and ffmpeg, +partially supported by Firefox. +</para> + +</directive> + </section> </module>
--- a/xml/ru/docs/http/ngx_http_mp4_module.xml +++ b/xml/ru/docs/http/ngx_http_mp4_module.xml @@ -9,7 +9,7 @@ <module name="Модуль ngx_http_mp4_module" link="/ru/docs/http/ngx_http_mp4_module.html" lang="ru" - rev="8"> + rev="9"> <section id="summary"> @@ -82,6 +82,18 @@ nginx считывает из файла метаданные, готовит поток с запрошенным Это тоже требует дополнительных ресурсов, как указано выше. </para> +<para id="keyframe"> +Если аргумент <literal>start</literal> указывает на +видеокадр, не являющийся ключевым, +то начало такого видео может воспроизводиться с ошибками. +В этом случае к запрашиваемому видео +<link id="mp4_start_key_frame">могут</link> быть добавлены +ближайший к точке <literal>start</literal> ключевой кадр +и все промежуточные кадры между ними. +При воспроизведении эти кадры будут скрыты +при помощи edit-листа (1.21.4). +</para> + <para> Если запрос, обрабатываемый этим модулем, не содержит аргументов <literal>start</literal> и <literal>end</literal>, @@ -228,6 +240,26 @@ MP4-файла. </directive> + +<directive name="mp4_start_key_frame"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>off</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>1.21.4</appeared-in> + +<para> +Включает режим, в котором видео всегда начинается с ключевого видеокадра. +Если аргумент <literal>start</literal> не указывает на ключевой кадр, +то первоначальные кадры будут скрыты при помощи mp4 edit-листа. +Edit-листы поддерживаются большинством плееров и браузеров +включая Chrome, Safari, QuickTime и ffmpeg, +частично поддерживаются в Firefox. +</para> + +</directive> + </section> </module>