MP4 - start time is out mp4 stts samples

Hello,
About MP4 module, my files are around 100-200MB, 30-50minutes videos.
When I try to seek more then 14-20min from start, I got “video not
found” and this error in nginx log:
2011/11/17 01:17:46 [error] 15463#0: *19 start time is out mp4 stts
samples in "/home/host/download/4040292549.mp4

How can I fix this, anyone have this error and know something about ?

Posted at Nginx Forum:

On Wed, Nov 16, 2011 at 08:04:30PM -0500, sisif wrote:

Hello,
About MP4 module, my files are around 100-200MB, 30-50minutes videos.
When I try to seek more then 14-20min from start, I got “video not
found” and this error in nginx log:
2011/11/17 01:17:46 [error] 15463#0: *19 start time is out mp4 stts
samples in "/home/host/download/4040292549.mp4

How can I fix this, anyone have this error and know something about ?

Could you show “nginx -V” output ?


Igor S.

nginx version: nginx/1.1.8
built by gcc 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx
–conf-path=/etc/nginx/nginx.conf
–error-log-path=/var/log/nginx/error.log
–pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock
–user=nginx --group=nginx --add-module=/root/nginx-accesskey-2.0.3
–with-http_ssl_module --with-http_flv_module --with-http_mp4_module
–with-http_gzip_static_module --http-log-path=/var/log/nginx/access.log
–http-client-body-temp-path=/var/tmp/nginx/client/
–http-proxy-temp-path=/var/tmp/nginx/proxy/
–http-fastcgi-temp-path=/var/tmp/nginx/fcgi/

Posted at Nginx Forum:

On Thu, Nov 17, 2011 at 09:25:13AM -0500, sisif wrote:

–http-client-body-temp-path=/var/tmp/nginx/client/
–http-proxy-temp-path=/var/tmp/nginx/proxy/
–http-fastcgi-temp-path=/var/tmp/nginx/fcgi/

Could you create debugging log of the request ?
http://nginx.org/en/docs/debugging_log.html


Igor S.

Having the same problem on 1.0.10

nginx: nginx version: nginx/1.0.10
nginx: configure arguments: --with-http_stub_status_module
–with-http_perl_module --with-http_flv_module --with-http_mp4_module
–with-debug

Posted at Nginx Forum:

On Tue, Nov 22, 2011 at 01:43:53AM -0500, sibsoft wrote:

Here it goes
http://dl.dropbox.com/u/50505452/error.log.gz

The attached patch should help.

Here it goes
http://dl.dropbox.com/u/50505452/error.log.gz

Posted at Nginx Forum:

Thanks a lot. It’s working fine now.

Posted at Nginx Forum:

Dealing with this trouble again (nginx 1.0.12, 1.0.14):

2012/04/10 12:06:59 [alert] 22812#0: *1571 pread() read only 0 of
1048576 from “/var/www/cgi-bin/uploads/03/00364/z46j20qdp6gt” while
sending mp4 to client, client: 95.131.10.226, server: gorillavid.com,
request: “GET
/mgobz2aj6gu4rqukwztlpbbrdqzwmtcoid2bk6t6xenwqd3fwvt6z3pyqy/video.mp4?start=1190.84
HTTP/1.1”, host: “85.17.30.216:8182”
2012/04/10 12:07:00 [error] 22815#0: *1630 start time is out mp4 stts
samples in “/var/www/cgi-bin/uploads/03/00001/k2hhvgyfdmmu”, client:
86.18.83.8, server: gorillavid.com, request: “GET
/mgobznkw5ku4tqukwyf3nfjxilouln5pl5abqotvftlq7rqggvegaydxva/video.flv?start=0
HTTP/1.1”, host: “85.17.30.216:8182”

I believe that I have this patch already applied:
if (start_time < (uint64_t) count * duration) {
start_sample += (ngx_uint_t) (start_time / duration);
count -= start_sample;
ngx_mp4_set_32value(entry->count, count);
goto found;
}

Posted at Nginx Forum:

Hello!

On Tue, Apr 10, 2012 at 06:07:40AM -0400, sibsoft wrote:

Dealing with this trouble again (nginx 1.0.12, 1.0.14):

2012/04/10 12:06:59 [alert] 22812#0: *1571 pread() read only 0 of
1048576 from “/var/www/cgi-bin/uploads/03/00364/z46j20qdp6gt” while
sending mp4 to client, client: 95.131.10.226, server: gorillavid.com,
request: "GET

/mgobz2aj6gu4rqukwztlpbbrdqzwmtcoid2bk6t6xenwqd3fwvt6z3pyqy/video.mp4?start=1190.84

HTTP/1.1", host: “85.17.30.216:8182”

The message suggests video.mp4 is corrupted (or just truncated).

2012/04/10 12:07:00 [error] 22815#0: *1630 start time is out mp4 stts
samples in “/var/www/cgi-bin/uploads/03/00001/k2hhvgyfdmmu”, client:
86.18.83.8, server: gorillavid.com, request: “GET
/mgobznkw5ku4tqukwyf3nfjxilouln5pl5abqotvftlq7rqggvegaydxva/video.flv?start=0
HTTP/1.1”, host: “85.17.30.216:8182”

The “video.flv” file isn’t likely to be an mp4 file. You have to
use flv module for flv pseudo-streaming, not mp4.

http://nginx.org/r/flv

Maxim D.

Dealing with this trouble again (nginx 1.0.12, 1.0.14):

2012/04/10 12:06:59 [alert] 22812#0: *1571 pread() read only 0 of
1048576 from “/var/www/cgi-bin/uploads/03/00364/z46j20qdp6gt” while
sending mp4 to client, client: …, server: …, request: “GET
/mgobz2aj6gu4rqukwztlpbbrdqzwmtcoid2bk6t6xenwqd3fwvt6z3pyqy/video.mp4?start=1190.84
HTTP/1.1”, host: “…”
2012/04/10 12:07:00 [error] 22815#0: *1630 start time is out mp4 stts
samples in “/var/www/cgi-bin/uploads/03/00001/k2hhvgyfdmmu”, client:
…, server: …, request: “GET
/mgobznkw5ku4tqukwyf3nfjxilouln5pl5abqotvftlq7rqggvegaydxva/video.flv?start=0
HTTP/1.1”, host: “…”

I believe that I have this patch already applied:
if (start_time < (uint64_t) count * duration) {
start_sample += (ngx_uint_t) (start_time / duration);
count -= start_sample;
ngx_mp4_set_32value(entry->count, count);
goto found;
}

Posted at Nginx Forum: