Giter Club home page Giter Club logo

videohttpserver's Introduction

VideoHttpServer

在Windows平台上提供简单的视频web服务。

python实现视频资源页面,nginx实现视频流服务。

注:用python,是因为Windows平台上,nginx不支持中文路径,不支持中文路径,不支持中文路径。

python

安装python,2.7或3.6以上,地址:https://www.python.org/downloads

代码是从python2 SimpleHTTPServer(python3 http.server)修改过来的,用于枚举目标目录下所有视频,并把视频的超链接指向nginx。

nginx

下载nginx,最新版本,地址:https://nginx.org/en/download.html

配置nginx.conf(端口自定义):

  # D:/Temp资源目录
  location /{
      #root   html;
      root D:/Temp;
      index  index.html index.htm;
      charset utf-8;
      autoindex on;
      #autoindex_exact_size on;
      #autoindex_localtime on;
  }
  
  # 反向代理到python http server
  location /home {
      proxy_pass   http://127.0.0.1:8089;
  }

注:Windows平台上的nginx的文件名是用utf-8编码的,因此,web页面中的超链接必须是utf-8编码,否则会出错。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.