Welcome! Log In Create A New Profile

Advanced

Server mp4 file larger than 2GB on 32bit system

王 静凯
June 05, 2021 04:36AM
Hi,

I compile a nginx for an 32bit system (ARM).
When I request a mp4 file which is larger than 2GB then it response with '416 Requested Range Not Satisfiable’.
The type of max_ranges is ngx_uint_t, I could not set it max than about 2000000000.
In this situation, I could I server the mp4 file correctly?

The ngx_size is set to 4 when I compile nginx.
So:
#ifndef NGX_MAX_SIZE_T_VALUE
#define NGX_MAX_SIZE_T_VALUE 2147483647
#endif


#ifndef NGX_SIZE_T_LEN
#define NGX_SIZE_T_LEN (sizeof("-2147483648") - 1)
#endif


#ifndef NGX_MAX_OFF_T_VALUE
#define NGX_MAX_OFF_T_VALUE 2147483647
#endif


#ifndef NGX_OFF_T_LEN
#define NGX_OFF_T_LEN (sizeof("-2147483648") - 1)
#endif

Config file:
location ~* .*\.(mp4|m3u8|m4s)$
{
max_ranges 2000000000;
include conf.d/options.conf;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
root /mypath;
expires 6h;
}

The header of request:
Accept: */*
Accept-Encoding: identity;q=1, *;q=0
Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7
Cache-Control: no-cache
Connection: keep-alive
Cookie: --------
Host: 192.168.199.245
Pragma: no-cache
Range: bytes=0-
Referer: -------------
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.41
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Server mp4 file larger than 2GB on 32bit system

王 静凯 June 05, 2021 04:36AM

Re: Server mp4 file larger than 2GB on 32bit system

Maxim Dounin June 06, 2021 12:12PM

回复: Server mp4 file larger than 2GB on 32bit system

王 静凯 June 06, 2021 10:46PM

Re: 回复: Server mp4 file larger than 2GB on 32bit system

Maxim Dounin June 07, 2021 08:22AM

Server mp4 file larger than 2GB on 32bit system

王 静凯 June 08, 2021 10:56PM

Re: Server mp4 file larger than 2GB on 32bit system

Maxim Dounin June 09, 2021 10:26AM

Segmentation fault sometimes

王 静凯 August 24, 2021 04:38AM

RE: Segmentation fault sometimes

Ali Ghanbari August 29, 2021 04:00AM

Re: Segmentation fault sometimes

Sergey A. Osokin August 30, 2021 06:32PM

回复: Segmentation fault sometimes

王 静凯 November 11, 2022 04:06AM

Re: 回复: Segmentation fault sometimes

Sergey A. Osokin November 17, 2022 09:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready