Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to use the http_mp4_module on my Ubuntu server but that didnt seem to work at all. When i check nginx -V i get :

nginx version: nginx/1.1.19
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-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.1.19/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.1.19/debian/modules/chunkin-nginx-module --add-module=/build/buildd/nginx-1.1.19/debian/modules/headers-more-nginx-module --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-development-kit --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-http-push --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-lua --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-upload-module --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-upload-progress --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.1.19/debian/modules/nginx-dav-ext-module

--with-http_mp4_module and --with-http_flv_module are there, I also add on sites-available/domaine.conf

location ~ .mp4$ {
mp4;
mp4_buffer_size 4M;
mp4_max_buffer_size 10M;
}

location ~ .flv$ {
flv;
}

and Nginx restarted witout error, everything seem ok but when i check my urls myvideo.mp4?start=60 return a 404 error (what i think is normal) and video.mp4?starttime=60 return the video but whatever the starttime number is i get the full video from the begining, did i miss something ?

share|improve this question

You should request video.mp4?start=60, not video.mp4?starttime=60.

A quote from the docs:

The pseudo-streaming works in alliance with a compatible Flash players. A player sends an HTTP request to the server with a start time specified in the query string argument (named simply start and specified in seconds), and the server responds with the stream such that its start position corresponds to the requested time, for example:

http://example.com/elephants_dream.mp4?start=238.88

p.s. Please also note, that you're using obsolete and unsupported version of nginx from development branch. Upgrade to the latest stable or mainstream is strongly advised.

share|improve this answer
    
Thanks you bbut as i say i get a 404 error with ?start and i dont get any with ?starttime maybe my nginx version work with the starttime request. Also i see some website using startparam: "starttime"in jwplayer. – Tahola Nov 12 '13 at 21:44
    
The 404 error has nothing to do with query parameters. You can request video.mp4?qwertyuiop and still get the video. – VBart Nov 12 '13 at 22:17
    
maybe my nginx version work with the starttime request All nginx versions from nginx.org don't work with starttime. But with 3rd party patches and modules you can experience any strange and undocumented behaviour. – VBart Nov 12 '13 at 22:22
    
Are you sure that myvideo.mp4 exists in requested directory, and your request actually is caught by location ~ .mp4$? Check your configuration. I'm sure 404 doesn't related to mp4 module at all. – VBart Nov 12 '13 at 22:25
    
Just turn on debug log and look what happens. – VBart Nov 12 '13 at 22:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.