• 安装ffmpeg及nginx模块


    安装ffmpeg:

    下载文件

    wget http://ffmpeg.org/releases/ffmpeg-1.0.1.tar.gz

    tar -xf ffmpeg-1.0.1.tar.gz

    cd ffmpeg-1.0.1

    ./configure

    显示错误:

    [root@tester ffmpeg-1.0.1]# ./configure
    yasm not found, use --disable-yasm for a crippled build
    If you think configure made a mistake, make sure you are using the latest
    version from Git.  If the latest version fails, report the problem to the
    ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
    Include the log file "config.log" produced by configure as this will help
    solving the problem.

    yum install yasm

    然后再编译

    ./make

    ./make install

    安装libx264

    http://www.cnblogs.com/MikeZhang/archive/2012/07/21/installFFmpegFromSourceCode.html

    http://zhidao.baidu.com/question/192172258.html

    nginx和nginx_mod_h264_streaming模块

    安装这个模块的目的是让视频可以在线播放,否则视频就只能下载下来才能看了

    下载nginx-1.2.6和nginx_mod_h264_streaming源码

    ./configure --add-module=/XXXX/nginx_mod_h264_streaming/

    ./make

    make的时候可能会出现错误:

    In file included from /root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_h264_streaming_module.c:2:
    /root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_streaming_module.c: In function ‘ngx_streaming_handler’:
    /root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_streaming_module.c:158: error: ‘ngx_http_request_t’ has no member named ‘zero_in_uri’
    make[1]: *** [objs/addon/src/ngx_http_h264_streaming_module.o] Error 1
    make[1]: Leaving directory `/root/software/nginx-1.2.6'
    make: *** [build] Error 2

    解决方法:

    注释掉nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c的158到161行

    http://lxneng.com/posts/160

    然后重新make,make install就安装成功了

    实时了解作者更多技术文章,技术心得,请关注微信公众号“轩脉刃的刀光剑影”

    本文基于署名-非商业性使用 3.0许可协议发布,欢迎转载,演绎,但是必须保留本文的署名叶剑峰(包含链接http://www.cnblogs.com/yjf512/),且不得用于商业目的。如您有任何疑问或者授权方面的协商,请与我联系

  • 相关阅读:
    MySQL的四种事务隔离级别
    线上CPU飚高(死循环,死锁...)
    Tomcat7 调优及 JVM 参数优化
    tomcat8.5配置高并发
    Tomcat 8.5 基于 Apache Portable Runtime(APR)库性能优化
    android 高德地图 轨迹平滑处理
    android高德地图绘制线 渐变处理
    按下home键,重新打开,应用重启
    小米9屏下指纹判断
    android 9.0以上charles https抓包
  • 原文地址:https://www.cnblogs.com/yjf512/p/2918047.html
Copyright © 2020-2023  润新知