Windows安装

ffmpeg

ffmpeg

  1. windows版下载地址https://ffmpeg.zeranoe.com/builds/ static版本就行
  2. 配置环境变量:下载的压缩包解压后的路径加入path
  3. 测试运行:cmd 输入ffmpeg -version 显示如下:
  4. 安装完毕。
  5. Rtsp转Rtmp 并推送到Nginx命令:
ffmpeg -rtsp_transport tcp -i "rtsp://root:pass@10.1.30.11/axis-media/media.amp" -vcodec copy  -acodec copy -f flv "rtmp://127.0.0.1:1935/live/"

Nginx

nginx rtmp module下载地址https://github.com/illuspas/nginx-rtmp-win32
配置rtmp代理:conf/nginx.conf 确保有以下内容
rtmp {
server {
listen ;
application live {
live on;
}
application hls {
live on;
hls on;
hls_path temp/hls;
hls_fragment 8s;
}
}
}
点击nginx.exe运行或者cmd窗口中输入nginx.exe
测试是否运行:访问http://127.0.0.1:8080/index.html

测试搭建是否成功

Cmd 窗口执行: ffmpeg -rtsp_transport tcp -i “rtsp://root:pass@10.1.30.11/axis-media/media.amp” -vcodec copy -acodec copy -f flv “rtmp://127.0.0.1:1935/live/”
使用vlc播放器播放rtmp://127.0.0.1:1935/live/ 是否成功

Linux 安装

Nginx

软件包nginx-1.15..tar.gz,nginx-rtmp-module-master.tar
依赖库openssl-1.0.2l.tar.gz; pcre-8.42.tar.gz; zlib-1.2..tar.gz;
安装openssl
解压openssl-1.0.2l.tar.gz
进入文件夹 ./config
make && make install
安装zlib
解压tar xf zlib-1.2..tar.gz
./configure
make && make install
安装 nginx
解压nginx-1.15..tar.gz; nginx-rtmp-module-master.tar
cd nginx-1.15.
./configure --prefix=/usr/local/nginx --add-module=../nginx-rtmp-module-master --with-http_ssl_module --with-pcre=../pcre-8.42 --with-openssl=../openssl-1.0.2l --with-zlib=../zlib-1.2.
安装: make &&make install
cd /usr/local/nginx/
vi ./conf/nginx.conf
添加以下内容
rtmp {
server {
listen ;
chunk_size ;
application live{
live on;
}
application hls {
live on;
hls on;
hls_path html/hls;
hls_fragment 3s;
}
}
}
修改http server端口为8001 修改servername 为本机ip,保存退出 开放1935端口和8001端口 firewall-cmd --zone=public --add-port=/tcp –permanent firewall-cmd --reload 启动 ./sbin/nginx -c ./conf/nginx.conf 查看是否启动成功:ps aux|grep nginx

ffmpeg

安装编译环境(root权限):yasm yasm-1.3..tar.gz
cd yasm-1.3./
./configure
make && make install
安装 ffmpeg tar -xvf ffmpeg-4.0..tar.gz
./configure
make && make isntall
修改文件/etc/ld.so.conf 内容增加第二行/usr/local/ffmpeg/lib/
增加环境变量ffmpeg:输入 export PATH=/usr/local/ffmpeg/bin/:$PATH
测试执行 ffmpeg -version 无报错则安装完成
推流测试

ffmpeg+nginx 实现rtsp转rtmp并通过nginx转发的更多相关文章

  1. ffmpeg+nginx将rtsp转为rtmp

    一.安装ffmpeg 1.http://ffmpeg.org/download.html下载地址,选择合适的操作系统版本下载,因为我的操作系统是centos7,所以下面的安装都是命令都是针对cento ...

  2. ffmpeg 文件推流 rtsp和rtmp

    // rtsp推流  /opt/srs/srs2 ./objs/ffmpeg/bin/ffmpeg -re -i /root/mp4/1.mp4 -vcodec copy -codec copy -f ...

  3. Nginx+FFmpeg实现RTSP转RTMP

    RTSP转RTMP 本次转流采用Centos+Nginx+FFmpeg实现,具体实现如下: 1. 安装Ngxin 安装详细略(可以选择安装阿里的Tengine,官方[下载路径](Download - ...

  4. Windows10环境下 Nginx+ffmpeg自搭服务器制作RTMP直播流

    Windows10环境下 Nginx+ffmpeg自搭服务器制作RTMP直播流学习笔记 所需条件: nginx-rtmp-module(带rtmp模块) ,链接:https://link.jiansh ...

  5. 海康&大华&DSS视频拉流-RTSP转RTMP多媒体播放技术

    海康&大华&DSS获取RTSP 实时流 海康:rtsp://[username]:[password]@[ip]:[port]/[codec]/[channel]/[subtype]/ ...

  6. windows下流媒体nginx-rmtp-module服务器搭建及java程序调用fmpeg将rtsp转rtmp直播流【转】

    https://github.com/illuspas/nginx-rtmp-win32 http://bashell.sinaapp.com/archives/build-nginx-rtmp-mo ...

  7. nginx搭建http和rtmp协议的流媒体服务器

    nginx搭建http和rtmp协议的流媒体服务器 时间:2013-09-23 23:52来源:佚名 作者:本站 举报 点击:232次 实验目的:让Nginx支持flv和mp4格式文件,同时支持Rtm ...

  8. iOS 直播推流 - 搭建基于RTMP的本地Nginx服务器

    前端时间,公司要调研直播相关的内容,特地花时间进行了一番调研. 本篇将记录其中的推流篇-本地推理播放测试. 关于Nginx: 配置Nginx以支持HLS.RTMP的推流与拉流,iOS系统使用LFLiv ...

  9. 利用Nginx搭建http和rtmp协议的流媒体服务器[转]

    利用nginx搭建http和rtmp协议的流媒体服务器 实验目的:让Nginx支持flv和mp4格式文件,同时支持Rtmp协议:同时打开rtmp的hls功能资料:HTTPLive Streaming( ...

随机推荐

  1. LESSON 3- Discrete Memory-less Sources

    1.     Entropy H[X] - bounds on Lmin 2.      Huffman’s algorithm for optimal source code

  2. Java集合框架 10 连问,你有被问过吗?

    首先要说一下,本文对这些Java集合框架的面试题只做了一个总结式的回答,对每一道题目,都值得深入去了解一下(什么是扎实基本功,这些就是基本功~~),后续可能对每一道题目拆开独立篇章来深入讲解一下. 大 ...

  3. 利用 Flask 动态展示 Pyecharts 图表数据的几种方法

    本文将介绍如何在 web 框架 Flask 中使用可视化工具 pyecharts, 看完本教程你将掌握几种动态展示可视化数据的方法,不会的话你来找我呀- Flask 模板渲染 1. 新建一个项目fla ...

  4. 大型情感剧集Selenium:2_options设置 #华为云·寻找黑马程序员#

    上集回顾 昨天说简单介绍了什么是selenium,它能干what,和发展史与梗概.当的是python如何通过pip安装selenium,并下载对应浏览器的webdriver. 最后简单通过一个Demo ...

  5. React Native--Animated:`useNativeDriver`is not supported because the native animated module is missing

    目录 问题描述 解决方法 问题描述 react-native init 项目,在运行中报错 解决方法 打开Xcode项目,点击Libraries文件夹右键Add Files to "项目名& ...

  6. git 使用详解(10)-- 远程分支

    远程分支 远程分支(remote branch)是对远程仓库中的分支的索引.它们是一些无法移动的本地分支:只有在Git 进行网络交互时才会更新.远程分支就像是书签,提醒着你上次连接远程仓库时上面各分支 ...

  7. [TimLinux] Python3.6 异常继承关系

    Python3.6 异常继承结构 object └── BaseException ├── Exception │   ├── ArithmeticError │   │   ├── Floating ...

  8. UVA-136Ugly numbers

    Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9 ...

  9. 一份详细的 Matplotlib入门指导

    hMatplotlib是最受欢迎的二维图形库,但有时我们很难做到得心应手的去使用. 如何更改图例上的标签名称? 如何设置刻度线? 如何将比例更改为对数? 如何在我的情节中添加注释和箭头? 如何在我的图 ...

  10. python 金融应用(四)金融时间序列分析基础

    1.1.创建DataFrame df=pd.DataFrame(list(range(10,50,10)),columns=['num'],index=['a','b','c','d']) df Ou ...