# MP4 - start time is out mp4 stts samples

**URL:** <https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449>\
**Category:** NGINX\
**Created:** [July 15, 2012, 11:26pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449 "2012-07-15T23:26:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [July 15, 2012, 11:26pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449/1 "2012-07-15T23:26:31Z")

</div>

Hello,

i get the following errors:

2012/07/15 22:58:44 [info] 30717#0: \*1 client prematurely closed  
connection while sending mp4 to client, client: 127.0.0.158, server:  
[xxx.com](http://xxx.com), request: “GET /mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1”, host:  
“[xxx.com](http://xxx.com)”, referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”  
2012/07/15 22:58:44 [error] 30717#0: \*2 start time is out mp4 stts  
samples in “/var/www/virtual/xxx.com/files/mp4/mp4/vs-xxx.720p.mp4”,  
client: 127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
/mp4/mp4/vs-xxx.720p.mp4?start=2934.89 HTTP/1.1”, host: “[xxx.com](http://xxx.com)”,  
referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”  
2012/07/15 23:07:33 [error] 31389#0: \*1 open()  
“/var/www/virtual/xxx.com/htdocs/favicon.ico” failed (2: No such file or  
directory), client: 127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
/favicon.ico HTTP/1.1”, host: “[xxx.com](http://xxx.com)”  
2012/07/15 23:07:45 [info] 31389#0: \*1 client prematurely closed  
connection while sending mp4 to client, client: 127.0.0.158, server:  
[xxx.com](http://xxx.com), request: “GET /mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1”, host:  
“[xxx.com](http://xxx.com)”, referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”  
2012/07/15 23:07:45 [error] 31389#0: \*2  
“/var/www/virtual/xxx.com/files/mp4/mp4/vs-xxx.720p.mp4” mp4 moov atom  
is too large:5689479, you may want to increase mp4\_max\_buffer\_size,  
client: 127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
/mp4/mp4/vs-xxx.720p.mp4?start=528.83 HTTP/1.1”, host: “[xxx.com](http://xxx.com)”,  
referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”  
2012/07/15 23:09:03 [info] 31454#0: \*1 sendfile() failed (104:  
Connection reset by peer) while sending mp4 to client, client:  
127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
/mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1”, host: “[xxx.com](http://xxx.com)”, referrer:  
“[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”  
2012/07/15 23:09:03 [error] 31454#0: \*2 start time is out mp4 stts  
samples in “/var/www/virtual/xxx.com/files/mp4/mp4/vs-xxx.720p.mp4”,  
client: 127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
/mp4/mp4/vs-xxx.720p.mp4?start=1667.46 HTTP/1.1”, host: “[xxx.com](http://xxx.com)”,  
referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”

The file is 5.3 GB large.

smaller files that i tried working.

Posted at Nginx Forum:

> **[MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,228600,228600#msg-228600)**
>
> Hello, i get the following errors: 2012/07/15 22:58:44 \[info\] 30717#0: \*1 client prematurely closed connection while sending mp4 to client, client: 127.0.0.158, server: xxx.com, request: "GET /mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1",...

---

<div class="post-metadata">

**Author:** ![DeineAgentur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@DeineAgentur](https://www.ruby-forum.com/u/DeineAgentur)\
**Post date:** [July 15, 2012, 11:29pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449/2 "2012-07-15T23:29:26Z")

</div>

Some infos of my system:

Source: nginx deb

Sys OS: UBUNTU 12.04

nginx version: nginx/1.2.1  
TLS SNI support enabled  
configure arguments: --prefix=/etc/nginx  
–conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log  
–http-client-body-temp-path=/var/lib/nginx/body  
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi  
–http-log-path=/var/log/nginx/access.log  
–http-proxy-temp-path=/var/lib/nginx/proxy  
–http-scgi-temp-path=/var/lib/nginx/scgi  
–http-uwsgi-temp-path=/var/lib/nginx/uwsgi  
–lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid  
–with-pcre-jit --with-debug --with-http\_addition\_module  
–with-http\_dav\_module --with-http\_flv\_module --with-http\_geoip\_module  
–with-http\_gzip\_static\_module --with-http\_image\_filter\_module  
–with-http\_mp4\_module --with-http\_perl\_module  
–with-http\_random\_index\_module --with-http\_realip\_module  
–with-http\_secure\_link\_module --with-http\_stub\_status\_module  
–with-http\_ssl\_module --with-http\_sub\_module --with-http\_xslt\_module  
–with-ipv6 --with-sha1=/usr/include/openssl  
–with-md5=/usr/include/openssl --with-mail --with-mail\_ssl\_module  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-auth-pam  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/chunkin-nginx-module  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/headers-more-nginx-module  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-development-kit  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-echo  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-http-push  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-lua  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-upload-module  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-upload-progress  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-upstream-fair  
–add-module=/build/buildd/nginx-1.2.1/debian/modules/nginx-dav-ext-module

Posted at Nginx Forum:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,228600,228601#msg-228601)**
>
> Hello, i get the following errors: 2012/07/15 22:58:44 \[info\] 30717#0: \*1 client prematurely closed connection while sending mp4 to client, client: 127.0.0.158, server: xxx.com, request: "GET /mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1",...

---

<div class="post-metadata">

**Author:** ![DeineAgentur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@DeineAgentur](https://www.ruby-forum.com/u/DeineAgentur)\
**Post date:** [July 15, 2012, 11:47pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449/3 "2012-07-15T23:47:33Z")

</div>

Sorry the first server was an other… but this is the from  
“[Index of /packages/ubuntu/](http://nginx.org/packages/ubuntu/)”

Ubuntu DEB  
nginx version: nginx/1.2.2  
TLS SNI support enabled  
configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx  
–conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log  
–http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid  
–lock-path=/var/run/nginx.lock  
–http-client-body-temp-path=/var/cache/nginx/client\_temp  
–http-proxy-temp-path=/var/cache/nginx/proxy\_temp  
–http-fastcgi-temp-path=/var/cache/nginx/fastcgi\_temp  
–http-uwsgi-temp-path=/var/cache/nginx/uwsgi\_temp  
–http-scgi-temp-path=/var/cache/nginx/scgi\_temp --user=nginx  
–group=nginx --with-http\_ssl\_module --with-http\_realip\_module  
–with-http\_addition\_module --with-http\_sub\_module  
–with-http\_dav\_module --with-http\_flv\_module --with-http\_mp4\_module  
–with-http\_gzip\_static\_module --with-http\_random\_index\_module  
–with-http\_secure\_link\_module --with-http\_stub\_status\_module  
–with-mail --with-mail\_ssl\_module --with-file-aio --with-ipv6

same error

Posted at Nginx Forum:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,228600,228602#msg-228602)**
>
> Hello, i get the following errors: 2012/07/15 22:58:44 \[info\] 30717#0: \*1 client prematurely closed connection while sending mp4 to client, client: 127.0.0.158, server: xxx.com, request: "GET /mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1",...

---

<div class="post-metadata">

**Author:** ![DeineAgentur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@DeineAgentur](https://www.ruby-forum.com/u/DeineAgentur)\
**Post date:** [July 17, 2012, 6:09pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449/4 "2012-07-17T18:09:39Z")

</div>

Hello!

On Sun, Jul 15, 2012 at 05:25:56PM -0400, DeineAgentur wrote:

> Hello,
> 
> i get the following errors:

[… unrelated messages skipped …]

> 2012/07/15 22:58:44 [error] 30717#0: \*2 start time is out mp4 stts  
> samples in “/var/www/virtual/xxx.com/files/mp4/mp4/vs-xxx.720p.mp4”,  
> client: 127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
> /mp4/mp4/vs-xxx.720p.mp4?start=2934.89 HTTP/1.1”, host: “[xxx.com](http://xxx.com)”,  
> referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”

[…]

> 2012/07/15 23:09:03 [error] 31454#0: \*2 start time is out mp4 stts  
> samples in “/var/www/virtual/xxx.com/files/mp4/mp4/vs-xxx.720p.mp4”,  
> client: 127.0.0.158, server: [xxx.com](http://xxx.com), request: “GET  
> /mp4/mp4/vs-xxx.720p.mp4?start=1667.46 HTTP/1.1”, host: “[xxx.com](http://xxx.com)”,  
> referrer: “[XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/stream/player.swf)”
> 
> The file is 5.3 GB large.
> 
> smaller files that i tried working.

Messages suggest the file is shorter than 1667.46 seconds.  
Given the fact it’s 5.3 GB large - the file is either corrupted or  
there is something in it which confuses nginx. Could you please  
provide debug log and the file for investigation?

Maxim D.

---

<div class="post-metadata">

**Author:** ![DeineAgentur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@DeineAgentur](https://www.ruby-forum.com/u/DeineAgentur)\
**Post date:** [July 17, 2012, 7:22pm UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449/5 "2012-07-17T19:22:09Z")

</div>

Hi Maxim,

here the debug.log

> **[debug\_localhost.rar](https://www.dropbox.com/s/8xwyxw8l0r0a2am/debug_localhost.rar)**
>
> Shared with Dropbox

Maxim, if you send me an eMail, i will give you a link to the video.

Posted at Nginx Forum:

> **[Re: MP4 - start time is out mp4 stts samples](https://forum.nginx.org/read.php?2,228600,228651#msg-228651)**
>
> Hello, i get the following errors: 2012/07/15 22:58:44 \[info\] 30717#0: \*1 client prematurely closed connection while sending mp4 to client, client: 127.0.0.158, server: xxx.com, request: "GET /mp4/mp4/vs-xxx.720p.mp4?start=0 HTTP/1.1",...

---

<div class="post-metadata">

**Author:** ![DeineAgentur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e56c9b/32.png) [@DeineAgentur](https://www.ruby-forum.com/u/DeineAgentur)\
**Post date:** [July 20, 2012, 10:44am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449/6 "2012-07-20T10:44:36Z")

</div>

Hello!

On Tue, Jul 17, 2012 at 01:21:38PM -0400, DeineAgentur wrote:

> Hi Maxim,
> 
> here the debug.log
> 
> [Dropbox - debug\_localhost.rar - Simplify your life](https://www.dropbox.com/s/8xwyxw8l0r0a2am/debug_localhost.rar)

Ok, debug log suggests that there are 4 tracks in the file, and one  
of them is just 0.8 seconds long:

2012/07/17 19:01:26 [debug] 4539#0: \*10 tkhd duration:4208128,  
time:7013.547s  
2012/07/17 19:01:26 [debug] 4539#0: \*10 tkhd duration:487, time:0.812s  
2012/07/17 19:01:26 [debug] 4539#0: \*10 tkhd duration:4208128,  
time:7013.547s  
2012/07/17 19:01:26 [debug] 4539#0: \*10 tkhd duration:4208140,  
time:7013.567s

This is what causes your problem, as nginx isn’t currently able to  
drop short tracks, only seek them all. And nginx complains as one  
of the tracks is too short for a requested seek.

This should be handled better.

> Maxim, if you send me an eMail, i will give you a link to the video.

Actually, my email is included in all messages to the mailing  
list (though forum interface hides it). See e.g. here:

[http://mailman.nginx.org/pipermail/nginx/2012-July/034659.html](http://mailman.nginx.org/pipermail/nginx/2012-July/034659.html)

Maxim D.
