We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11190
    • 109 Posts
    Hello, all. I’m not sure that this is a MODx issue but I’d appreciate any help. Our site, www.spiritualoutreach.com hosts a large number of fairly lengthy videos. MODx (1.0.0) has done an excellent job of laying them out and we play them via flowplayer (3.1.2) - another excellent product.

    Most of them are over 30 minutes long and we find that they simply stop playing after around five minutes. It’s not a buffering issue. A bit of googling turned up tips about compression in apache and instructed us to add:

    <IfModule mod_deflate.c>
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png|flv|mp3|ogg)$ no-gzip dont-vary
    </IfModule>

    to our httpd.conf. We did that and it seemed to fix the problem. So we moved all 60GB to our own server since our 1and1 packaged would not allow us to change that setting. But, alas, we still have the same problem. Any idea what causes this and how we fix it? Thanks - John
      http://www.spiritualoutreach.com
      Making Christianity intelligible to secular society
      • 11190
      • 109 Posts
      All right - this does look like a MODx problem after all - or at least a php problem. If I use straight html, e.g., open VLC and point it to the URI of one of these videos, they play perfectly fine to completion. If I play them on the web page, they all stop after roughly five minutes.

      At first I thought this might be an Apache timeout problem as I read that defaults to 300 seconds (five minutes). However, my CentOS distribution defaults to 120 seconds. It also seems to be more a setting about how long it will wait for a missing packet and not how long it keeps a connection open. I changed it to 50 seconds anyway. I also enabled keepalives as they seemed more relevant perhaps but that did not make a difference either.

      I wondered if playing a video via a friendly url was, in effect, running the index.php script. Thus I looked in php.ini for max_execution_time but it set to 30 seconds. The video is playing for much longer than 30 seconds. I changed it to 3000 anyway but it did not make a difference.

      There is nothing in the error logs to indicate a problem. It happens on every desktop on every location so it smells like a server issue and not a desktop or browser issue.

      What would cause the http stream to simply stop? How do I troubleshoot this further? Thanks - John
        http://www.spiritualoutreach.com
        Making Christianity intelligible to secular society
        • 10449
        • 956 Posts
        This is neither a modx, PHP or Apache problem:
        http://www.spiritualoutreach.com/assets/downloads/ChristianJourneyPart04High.flv is 283MB big! That’s just too big for smooth delivery over the web.
        It’s not the video-length in minutes/seconds that matter, but the total filesize. You’re using progressive download, not streaming, so this is what you have to expect.

        Use a professional video tool to reduce filesize, or cut up the different section into smaller pieces. Or forget about embedding the videos altogether and just offer downloads as MPG/AVI.

        What actually might happen behind the scenes (apart from bandwidth problems) is that the browser fills up the entire default cache.
          • 11190
          • 109 Posts
          Thank you very much. That makes perfect sense. I was finally able to find someone who had a similar problem (http://mark.kolich.com/2009/02/howto-turn-any-apache-server-into-an-flv-streaming-server-with-php.html). It looks like I’m off to learn about video streaming! Thanks again - John
            http://www.spiritualoutreach.com
            Making Christianity intelligible to secular society