Learn about Centmin Mod LEMP Stack today
Register Now

Nginx Nginx for Stream Videos Server

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by KinderOvO, Jun 13, 2015.

  1. KinderOvO

    KinderOvO Member

    52
    1
    8
    Jan 13, 2015
    Ratings:
    +1
    Local Time:
    8:13 PM
    1.4
    10
    Hello , I have already installed the cenminmod , I would add the pseudo-stream option, only will serve videos , which have to disable modules

    apc, xcache , memcache .
    these modules can I disable or makes any difference in the videos .
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    How are videos served via nginx or php ? the modules you listed only affect PHP and not nginx.
     
  3. KeVo

    KeVo Active Member

    179
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    5:13 AM
    1.11.x
    10.1.18
    Well, I am not sure how it works, but I do know that Netflix and Hulu both use NGINX. I imagine he wants to achieve something similar.
     
  4. KinderOvO

    KinderOvO Member

    52
    1
    8
    Jan 13, 2015
    Ratings:
    +1
    Local Time:
    8:13 PM
    1.4
    10
    Precisely must enable option to advance the video, think it's pseudo-stream.
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    no idea to be honest.. closest is needing Nginx RTMP Module support compiled into Nginx I believe Nginx-rtmp-module - Wikipedia, the free encyclopedia. On github arut/nginx-rtmp-module · GitHub

     
  6. KinderOvO

    KinderOvO Member

    52
    1
    8
    Jan 13, 2015
    Ratings:
    +1
    Local Time:
    8:13 PM
    1.4
    10
  7. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    check nginx compiled options via
    Code:
    nginx -V
    flv should already be compiled into Centmin Mod's Nginx. But not mp4

    .08 beta03 output
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    I posted an example of how to add nginx modules to Centmin Mod at centminmod.com/nginx_webdav.html for webdav prior to it becoming an official part of Centmin Mod's default module list. You can use that example to pretty much add or extend Nginx with additional modules.

    Only limitations are
    1. You need to know generally how to add Nginx modules and that is basically the same for any Nginx server not just Centmin Mod
    2. You also need to know the instructions for specific Nginx module
    3. You also need to know any prerequiste system dependencies and YUM packages that the Nginx module requires as I may not know what they are as I may have never used the Nginx module you want.
    4. I'm limited to what I can add to Centmin Mod by what I know and use usually and what I am comfortable with supporting. So that limits what officially I can add to Centmin Mod. But you are free to add whatever you need using above as a guide.
    For Centmin Mod Nginx, download tar.gz nginx modules to /svr-setup and extract and then editing inc/nginx_configure.inc just use the same --add-module=../nginx-module-name line.

    Posted a more recent example below. Actual Github commits for adding 3 new Centmin Mod Nginx modules, echo-nginx-module, set-misc-nginx-module and ngx_devel_kit are located below (you can use these changes and webdav example as a blue print for understanding how to extend and add your own Centmin Mod Nginx modules.

    Github commits for 3 new Nginx modules

    General Info on Adding New Nginx Modules



    There's 5 basic steps involve in adding a new Nginx module into Centmin Mod Nginx server for Centmin Mod .08 beta02 and higher. They involve editing 5 Centmin Mod files.
    1. centmin.sh - add VARIABLE name to define the nginx module's version number if there is one
    2. inc/downloadlinks.inc - add 2 VARIABLES to define the module download link and filename
    3. inc/downloads.inc - add download function to download the module using download link defined in inc/downloadlinks.inc and test the download validity i.e. untar it using filename defined in inc/downloadlinks.inc
    4. inc/nginx_configure.inc - add check variables to grab latest nginx module extracted directory and put it info directory variable to be called from Nginx ./configure options only if NGINX_OPENRESTY='y'
    5. inc/nginx_upgrade.inc - add to existing file check, the new module download file name (defined in inc/downloadlinks.inc). This ensures, when you run centmin.sh menu option 4 to upgrade Nginx, if the new nginx module download file doesn't exist in /svr-setup, it will download it and extract it before the Nginx compilation begins
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Jun 14, 2015
    • Like Like x 1
  10. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Jun 14, 2015
  11. KinderOvO

    KinderOvO Member

    52
    1
    8
    Jan 13, 2015
    Ratings:
    +1
    Local Time:
    8:13 PM
    1.4
    10
    add --with-http_mp4_module on /usr/local/src/centminmod-123.08beta03/inc/nginx_configure.inc and not work :(
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    see posts 9 and 10 above

     
  13. KinderOvO

    KinderOvO Member

    52
    1
    8
    Jan 13, 2015
    Ratings:
    +1
    Local Time:
    8:13 PM
    1.4
    10
    my centmin.sh no have option NGINX_MP4=
     
  14. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    separate github branch you need to try by upgrading or testing that branch or can use git command line to get that branch 123.08beta03-rtmp instead of 123.08beta03 Upgrade - Working with git command line for updating Centmin Mod local copies | Centmin Mod Community

    Code:
    centminmod-123.08beta03]# git branch -a
      123.08beta03
    * 123.08beta03-rtmp
      master
      remotes/origin/123.06stable
      remotes/origin/123.07stable
      remotes/origin/123.08beta03
      remotes/origin/123.08beta03-libresslclang
      remotes/origin/123.08beta03-rtmp
      remotes/origin/123.08beta03clang
      remotes/origin/123.08beta03libressl
      remotes/origin/123.08centos7beta01
      remotes/origin/123.08centos7beta02
      remotes/origin/123.08zerodown
      remotes/origin/HEAD -> origin/master
      remotes/origin/master
     
  15. KinderOvO

    KinderOvO Member

    52
    1
    8
    Jan 13, 2015
    Ratings:
    +1
    Local Time:
    8:13 PM
    1.4
    10
    I did not understand, never used github.
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    if you have test server, try github commands if not use traditional upgrade method for zip overwrites in 1st post outlined at CentOS 7.x - How to help test .08 CentOS 7 Betas with Github code ? | Centmin Mod Community but use 123.08beta03-rtmp zip download from github on right side bar there's a zip download link at centminmod/centminmod at 123.08beta03-rtmp · GitHub (says download link which is zip file at https://github.com/centminmod/centminmod/archive/123.08beta03-rtmp.zip)

    so upgrade would be

    Code:
    branchname=123.08beta03-rtmp
    rm -rf /usr/local/src/${branchname}.zip
    rm -rf /usr/local/src/centminmod-${branchname}
    mv centmin-v1.2.3mod/ centmin-v1.2.3mod-orig
    mv centminmod-123.08centos7beta01/ centminmod-123.08centos7beta01-orig
    mv centminmod-123.08centos7beta02/ centminmod-123.08centos7beta02-orig
    mv centminmod-123.08centos7beta03/ centminmod-123.08centos7beta03-orig
    wget -O /usr/local/src/${branchname}.zip https://github.com/centminmod/centminmod/archive/${branchname}.zip
    cd /usr/local/src
    unzip ${branchname}.zip
    cd centminmod-${branchname}
    chmod +x centmin.sh
    ./centmin.sh
    sed -i 's|centminmod-123.08centos7beta01|centminmod-123.08beta03-rtmp|g' /root/.bashrc
    sed -i 's|centminmod-123.08centos7beta02|centminmod-123.08beta03-rtmp|g' /root/.bashrc
    sed -i 's|centminmod-123.08centos7beta03|centminmod-123.08beta03-rtmp|g' /root/.bashrc
    git is easier as you can switch branches easily see Upgrade - Working with git command line for updating Centmin Mod local copies | Centmin Mod Community
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
  18. deltahf

    deltahf Active Member

    207
    101
    43
    Jun 8, 2014
    Ratings:
    +154
    Local Time:
    6:13 AM
    I'm running a dedicated RTMP server (DigitalOcean droplet) via Nginx on Ubuntu. I'm not very knowledgeable about Ubuntu or RTMP, but had it up and running pretty quickly thanks to this guide. Check it out:

    How to set up your own private RTMP server using nginx | Open Broadcaster Software

    I just keep the server image at DigitalOcean and spin up an instance whenever I need to use it (about once a month), so it only costs me a few dollars at most. Well worth it to not bother with the hassle of configuring the RTMP module with Centminmod or messing with my primary server.
     
    • Informative Informative x 1
  19. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  20. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    8:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1