Welcome! Log In Create A New Profile

Advanced

Nginx MP4 streaming

Posted by forumwt 
Nginx MP4 streaming
July 05, 2013 07:30PM
Have problem with mp4 streaming, flv working fine and can seek in player, but when i try seek mp4 in firebug have internal 500 error...

here is my nginx.conf

location ~* \.(png|jpg|jpeg|gif)(\?ver=[0-9.]+)?$ {
root /home/xxx/public_html/media;
access_log off;
log_not_found off;
expires 30d;
}
location ~\.mp4$ {
secure_link $arg_st,$arg_e;
secure_link_md5 segredo$uri$arg_e;
if ($secure_link = "") {
return 403;
}
if ($secure_link = "0") {
return 403;
}
gzip off;
root /home/xxx/public_html/media;
limit_rate_after 10m;
limit_rate 400k;
#internal;
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
}

location ~ \.flv$ {
secure_link $arg_st,$arg_e;
secure_link_md5 segredo$uri$arg_e;
if ($secure_link = "") {
return 403;
}
if ($secure_link = "0") {
return 403;
}
gzip off;
root /home/xxx/public_html/media;
limit_rate_after 10m;
limit_rate 400k;
#internal;
flv;
}


In log im found only this 2013/07/05 01:16:50 [error] 2224#0: *481 start time is out mp4 stts samples in "/home/xxx/public_html/media/videos/0613/2808363858/06132808363858.mp4",

Any help where can be problem? im aslo try same video to stream via apache, video is working fine, so its not corrupted!
Re: Nginx MP4 streaming
July 18, 2013 07:55PM
I've never used the MP4 streaming module, so I can't really answer but:

From memory, the stts MP4 atom maps frames to their display time. Basically for videos with a constant frame rate (most videos) there should only be one entry in the stts. If your MP4 has a variable frame rate, then there'll be multiple entries in the stts.

The error seems to suggest that you're trying to seek outside the length of the video, for example, you're trying to seek to position 00:20:00 when the video is only 00:15:00 long. Perhaps check if the correct units are being used to represent position.
Also uploading a sample MP4 and the position you're trying to seek to may help.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
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