# MP4 - start time is out mp4 stts samples

**URL:** <https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944>\
**Category:** NGINX\
**Created:** [November 17, 2011, 2:04am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944 "2011-11-17T02:04:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 17, 2011, 2:04am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/1 "2011-11-17T02:04:55Z")

</div>

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:

> **[MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,218451#msg-218451)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 17, 2011, 6:06am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/2 "2011-11-17T06:06:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 17, 2011, 3:25pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/3 "2011-11-17T15:25:32Z")

</div>

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:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,218477#msg-218477)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 21, 2011, 9:58am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/4 "2011-11-21T09:58:30Z")

</div>

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 ?

> **[A debugging log](http://nginx.org/en/docs/debugging_log.html)**

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 21, 2011, 9:36am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/5 "2011-11-21T09:36:49Z")

</div>

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:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,218685#msg-218685)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 22, 2011, 11:31am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/6 "2011-11-22T11:31:14Z")

</div>

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

> Here it goes  
> [http://dl.dropbox.com/u/50505452/error.log.gz](http://dl.dropbox.com/u/50505452/error.log.gz)

The attached patch should help.

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 22, 2011, 7:44am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/7 "2011-11-22T07:44:10Z")

</div>

Here it goes  
[http://dl.dropbox.com/u/50505452/error.log.gz](http://dl.dropbox.com/u/50505452/error.log.gz)

Posted at Nginx Forum:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,218731#msg-218731)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [November 23, 2011, 8:20am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/8 "2011-11-23T08:20:11Z")

</div>

Thanks a lot. It’s working fine now.

Posted at Nginx Forum:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,218773#msg-218773)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [April 10, 2012, 12:08pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/9 "2012-04-10T12:08:32Z")

</div>

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](http://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](http://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:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,225103#msg-225103)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [April 10, 2012, 4:05pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/10 "2012-04-10T16:05:43Z")

</div>

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](http://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](http://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.

> **[Module ngx\_http\_flv\_module](http://nginx.org/en/docs/http/ngx_http_flv_module.html#flv)**
>
> The ngx\_http\_flv\_module module provides pseudo-streaming server-side support for Flash Video (FLV) files.

Maxim D.

---

<div class="post-metadata">

**Author:** ![sisif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@sisif](https://www.ruby-forum.com/u/sisif)\
**Post date:** [April 10, 2012, 12:11pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/213944/11 "2012-04-10T12:11:01Z")

</div>

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:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,218451,225104#msg-225104)**
>
> 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...
