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. 计蒜客 The Preliminary Contest for ICPC Asia Nanjing 2019

    F    Greedy Sequence You're given a permutation aa of length nn (1 \le n \le 10^51≤n≤105). For each  ...

  2. 【Android - 问题解决】之ScrollView嵌套ListView时总是自动滑动到ListView顶部的问题

    最近做了一个项目,里面有一个ScrollView嵌套ListView的布局. 做出来之后发现,进入这个界面之后,总是自动滑动到ListView的顶部,而ScrollView中位于ListView上面的 ...

  3. NFS介绍、服务端安装配置、NFS配置选项

    6月21日任务 14.1 NFS介绍14.2 NFS服务端安装配置14.3 NFS配置选项 14.1 NFS介绍 14.2 NFS服务端安装配置 1.首先需要2台机器,一台是服务端,一台是客户端,分别 ...

  4. 使用 Flask 和 Vue.js 来构建全栈单页应用

    在这个教程中,我将向你展示如何将 Vue 的单页面应用和 Flask 后端连接起来. 简单的来说,如果想在 Flask 中使用 Vue 框架是没有什么问题的. 但在实际中存在一个明显的问题就是 Fla ...

  5. sass 安装过程中的坑

    1,需要在项目中使用sass/scss 功能需要先在项目中安装,安装方法: cnpm install node-sass --save-dev //安装node-sass cnpm install s ...

  6. linux gre隧道创建

    目录 linux gre隧道创建 实验环境 实验目的 实验步骤 1.在host A(10.10.10.47)上面操作 2.在host B(192.168.0.118)上面操作 实验结果 还原实验环境 ...

  7. ARTS-S c语言统计程序运行时间

    #include <stdio.h> #include <sys/time.h> #include <unistd.h> int main() { struct t ...

  8. yuv和yCbCr的差异

    一.和rgb之间换算公式的差异 yuv<-->rgb Y'= 0.299*R' + 0.587*G' + 0.114*B' U'= -0.147*R' - 0.289*G' + 0.436 ...

  9. Spring-security-oAuth2分享

    Spring-security-oAuth2分享 oAuth2简介 OAuth 2.0是用于授权的行业标准协议.OAuth 2.0致力于简化客户端开发人员的工作,同时为Web应用程序,桌面应用程序,移 ...

  10. docker-网络管理-桥接网络

    一.配置桥接网络   需求:为了使本地网络中的机器和Docker容器更方便的通信,我们经常会有将Docker容器配置到和主机同一网段的需求.这个需求其实很容易实现,我们只要将Docker容器和宿主机的 ...