编译windows版nginx-rtmp-module

>>>>>整合版,一键运行,点我<<<<<

准备工作

要在 Microsoft Win32??平台上编译Nginx你需要:

  • Microsoft Visual C compiler. Microsoft Visual Studio??8 and 10 are known to work.(用来编译)
  • MSYS.(执行配置脚本)
  • Perl, if you want to build OpenSSL??and nginx with SSL support. For example?ActivePerl?or?Strawberry Perl.(注意这里不能使用MSYS的perl)
  • Mercurial?client.(通过HG下载最新源码)
  • PCRE,?zlib?and?OpenSSL?libraries sources.(PCRE用来重写url,zlib支持页面压缩,这里编译rtmp模块,必须编译出openssl)
  • win32版nginx-rtmp-module模块源代码

编译步骤

在开始之前,你需要将Perl,Mercurial,MSYS bin目录加入PATH环境变量,也就是打开cmd,输入perl,hg,bash不会提示找不到命令.运行vcvarsall.bat或者叫Visual Studio命令提示(2010).

  • 敲入bash,进入msys的环境
  • 从hg.nginx.org检出最新的Nginx源代码
  • Create a build and lib directories, and unpack zlib, PCRE and OpenSSL libraries sources into lib directory: 创建一个编译和库目录,并且解压zlib,PCRE,OpenSSL,git回win32分支的nginx-rtmp-module模块
  • 回到nginx主目录,运行配置脚本
  • 编译

成功后会在objs目录内生成nginx.exe文件,创建conf,logs,temp,tmp目录,将nginx-rtmp-module-win32/test/nginx.conf拷贝到conf目录,运行nginx.exe

使用任意rtmp客户端测试,默认app为myapp的直播应用,请参考官方配置开启record,vod等功能.

注意事项:
由于原作者是在*UNIX环境开发,使用了部分UNIX系统调用,部分功能在windows上暂时无法实现,比如vod 为mp4文件,exec ffmpeg来切片.但作为直播流,点播flv文件,在线录制是没有问题的.

下载撸主的编译版本:
nginx 1.7.10
nginx-rtmp-module 1.1.6
https://github.com/illuspas/nginx-rtmp-win32?

原创文章,转载请注明: 转载自贝壳博客

本文链接地址: 编译windows版nginx-rtmp-module

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据