Nginx MP4 streaming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arena18
    Confirmed User
    • Jan 2013
    • 246

    #1

    Nginx MP4 streaming

    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
    Code:
    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 idea where is problem? im aslo try same video to stream via apache, video is working fine, so its not corrupted!
    Wordpress Tube Theme - wpXtube Theme - TubeAce Theme
  • Zeiss
    Confirmed User
    • May 2012
    • 5189

    #2
    you may want to increase mp4_max_buffer_size
    Last edited by Zeiss; 07-05-2013, 04:06 PM.


    Adult Webmasters Guides

    Comment

    • arena18
      Confirmed User
      • Jan 2013
      • 246

      #3
      im try
      mp4_buffer_size 5m;
      mp4_max_buffer_size 10m;

      but pproblem is still there...
      Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

      Comment

      • Zeiss
        Confirmed User
        • May 2012
        • 5189

        #4
        How large are those video files? lol Try with smaller files just to see, if it works.
        Last edited by Zeiss; 07-05-2013, 04:14 PM.


        Adult Webmasters Guides

        Comment

        • arena18
          Confirmed User
          • Jan 2013
          • 246

          #5
          files is just a 40mb
          Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

          Comment

          • Zeiss
            Confirmed User
            • May 2012
            • 5189

            #6
            Could you show "nginx -V" output?


            Adult Webmasters Guides

            Comment

            • arena18
              Confirmed User
              • Jan 2013
              • 246

              #7
              Here is output
              Code:
              [root@server1 ~]# nginx -V
              nginx version: nginx/1.4.1
              built by gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
              TLS SNI support disabled
              configure arguments: --sbin-path=/usr/local/sbin --with-http_flv_module --with-http_mp4_module --with-http_ssl_module --with-http_secure_link_module
              Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

              Comment

              • Zeiss
                Confirmed User
                • May 2012
                • 5189

                #8
                Weird. Should work on this vers.


                Adult Webmasters Guides

                Comment

                • Nevet
                  Registered User
                  • Dec 2011
                  • 10

                  #9
                  Are there multiple tracks in the video?

                  Comment

                  • arena18
                    Confirmed User
                    • Jan 2013
                    • 246

                    #10
                    No... only one
                    Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

                    Comment

                    • Nevet
                      Registered User
                      • Dec 2011
                      • 10

                      #11
                      The metadata might be incorrect. This would have the effect of stopping the seeking. This can also happen if the audio track metadata is wrong, so check that too.

                      Comment

                      • arena18
                        Confirmed User
                        • Jan 2013
                        • 246

                        #12
                        But if meta is not correct why same video working fine on PC and also working fine on apache... strange
                        Wordpress Tube Theme - wpXtube Theme - TubeAce Theme

                        Comment

                        • Nevet
                          Registered User
                          • Dec 2011
                          • 10

                          #13
                          Without seeing the file or your setup it is difficult for anyone to be able to say what is going on. It might be nothing to do with the file and an undiagnosed bug in nginx or the http_mp4_module. I was trying to give you some easy to check issues which can cause the behaviour you described.

                          Comment

                          Working...