Want to subscribe to topics you're interested in?
Become a Member

Nginx Best way to stream a video file from a server.

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hitman, Dec 27, 2018.

  1. hitman

    hitman Member

    Jul 18, 2014
    Local Time:
    9:57 AM
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.15.7
    • PHP Version Installed: 5.6.x

    Hello everyone and Merry Christmas and a Happy New Year.
    I have some videos in a server which is running centminmod and I would like to stream these videos. So I have created a very simple flask app that takes the video file places it in a directory and I have access to it through http.

    What is the best way to stream this file?
    I read about the RTMP and how i can set it up to stream video files from the server. If that is the case how do i recompile nginx in centminmod to add the module of RTMP?
    Any suggestion you might have please share

    thank you for your time :D
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    4:57 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    stream as in live streaming or you mean serving non-live video i.e. mp4 ? live streaming needs RTMP while non-live can do via nginx mp4/flv optional nginx modules - nice discussion at https://community.centminmod.com/threads/help-with-a-solution-for-video-streaming.15538/

    Centmin Mod 123.09beta01 has NGINX_VIDEO option when enabled will auto enabling additional nginx modules outlined at https://community.centminmod.com/threads/add-nginx_video-control-variable-in-123-09beta01.15540/

    Then with nginx modules in place, configuration of nginx is left to end users to figure out as how to serve the videos.