当前位置:网站首页>CRTMP视频直播服务器部署及测试
CRTMP视频直播服务器部署及测试
2022-06-27 21:36:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
1、下载CRTMP服务器软件
svn co –username anonymous –password “” https://svn.rtmpd.com/crtmpserver/trunk crtmpserver
2、进入一下目录,运行cleanup.sh
cd crtmpserver/builders/cmak/ sh cleanup.sh
3、搭建编译环境
安装cmake、build-essential、libssl0.9.8、libssl-dev。
4、make
cmake .
make
5、运行服务器
./crtmpserver/crtmpserver ./crtmpserver/crtmpserver.lua(在crtmpserver/builders/cmak/ 目录下运行,其中crtmpserver.lua为配置文件)
二、测试播放器
6、直播测试
下载 http://www.longtailvideo.com/players/jw-flv-player/ 播放器
下载后有一个mediaplayer-5.6-viral压缩包,解压后,player.swf为播放器,video.mp4为测试视频,将player.swf\video.mp4\swfobject.js\jwplayer.js上传到web服务器上做测试
编辑一个简单的页面进行测试
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” ” http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“> <html xmlns=” http://www.w3.org/1999/xhtml“> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf8″ /> <title>视频测试</title> </head>
<body style=”width:980px; background-color:#000000;”> <div style=”margin-left:300px;”> <embed id=”player” width=”480″ height=”380″ flashvars=”&streamer=start&type=http&autostart=true&logo=&plugins=none&file= http://192.168.3.108/test/video.mp4” wmode=”transparent” allowscriptaccess=”always” allowfullscreen=”true” quality=”high” name=”player” style=”” src=” http://192.168.3.108/test/player.swf” type=”application/x-shockwave-flash”> </div> </body> </html>
经测试,测试成功
发觉可以发布,但是没有用到两个js文件,后来发觉原来这个两个文件是用来javascrip的使用使用的。
三、流媒体直播
编辑一个直播页面
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” ” http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“> <html xmlns=” http://www.w3.org/1999/xhtml“> <head> <meta http-equiv=”Content-Type” content=”text/html”; charset=”utf8″ /> <script type=”text/javascript” src=”/test/jwplayer.js”></script> <script type=”text/javascript” src=”/test/swfobject.js”></script> <title>视频测试</title> </head>
<body style=”width:980px; background-color:#003000;”>
<div id=’mediaplayer’>The player will be placed here</div>
<script type=”text/javascript”> jwplayer(‘mediaplayer’).setup({ flashplayer: ” http://192.168.3.108/test/player.swf“, width: ‘1024’, height: ‘788’, provider: ‘rtmp’, streamer: ‘rtmp://192.168.3.68/flvplayback/’, file: ‘vod’ }); </script>
</div> </body> </html>
打开crtmpd服务器
./crtmpserver/crtmpserver ./crtmpserver/crtmpserver.lua
下载FlashMediaLiveEncoder用于直播机
下载e2eSoft VCam作为虚拟摄像机,作为直播的输入设备
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/133034.html原文链接:https://javaforall.cn
边栏推荐
- How to solve the problem that the browser developed with CeF3 does not support flash
- 图的存储结构
- 股市小白在网上股票开户安全吗?
- MySQL character set
- Build an open source and beautiful database monitoring system -lepus
- mysql 字符集
- Webserver flow chart -- understand the calling relationship between webserver modules
- 十大券商注册账户安全吗,会有风险吗?
- Golang uses Mongo driver operation - query (basic)
- vmware虚拟机桥接连通
猜你喜欢

一文剖析C语言函数

Halcon's region: features of multiple regions (6)

MySQL分表查询之Merge存储引擎实现

Storage structure of graph

【PCL自学:PCLVisualizer】点云可视化工具PCLVisualizer

圖的存儲結構

Zero foundation self-study SQL course | if function

Cornernet understands from simple to profound

Zero foundation self-study SQL course | complete collection of SQL basic functions
![[idea] idea formatting code skills](/img/06/38079517e901bc48dc4ca0f8cc63fe.jpg)
[idea] idea formatting code skills
随机推荐
零基础自学SQL课程 | IF函数
One step forward is excellent, one step backward is ignorant
ValidateRequest=”false” 是做什么的「建议收藏」
吴恩达《机器学习》课程总结(11)_支持向量机
NDSS 2022 received list
使用cef3开发的浏览器不支持flash问题的解决
Eliminate gaps around El image images
【tinyriscv verilator】分支移植到正点原子达芬奇开发板
赛尔笔记|视频文本预训练简述
Zero foundation self-study SQL course | complete collection of SQL basic functions
Is it safe for Huatai Securities to open an account online?
文献综述如何挑选文献进行阅读,比如我的检索结果有200多篇根本看不完,如何进行文献挑选呢?...
Is it safe to open a stock account through the account opening QR code of CICC securities manager? Or is it safe to open an account in a securities company?
智慧风电 | 图扑软件数字孪生风机设备,3D 可视化智能运维
零基础自学SQL课程 | SQL基本函数大全
Windows环境下的ELK——Logstash+Mysql(4)
证券注册账户安全吗,会有风险吗?
C WinForm reads the resources picture
golang使用mongo-driver操作——查(进阶)
C语言malloc函数的功能及用法