CRTMP视频直播服务器部署及测试

CRTMP视频直播服务器部署及测试一、搭建CRTMP视频直播服务器1、下载CRTMP服务器软件svnco–usernameanonymous–password””https://svn.rtmpd.com/crtmpserver/trunkcrtmpserver2、进入一下目录,

大家好,又见面了,我是你们的朋友全栈君。 

一、搭建CRTMP视频直播服务器
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、直播测试
下载后有一个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.net/133034.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 无效的token怎么解决_登录token

    无效的token怎么解决_登录token解决无效token的方法在调用API接口时遇到了无效token的问题,网上搜了一大圈还以为是token时效的问题,最后发现是给需要授权的API,必须在请求头中使用Authorization字段提供token令牌。需要在main.js文件里添加axios拦截器axios.interceptors.request.use(config=>{console.log(config);config.headers.Authorization=window.sessionSt

    2022年9月13日
    0
  • 用python写一个简单的表白代码

    用python写一个简单的表白代码fromturtleimport*color(‘black’,’red’)begin_fill()penup()goto(50,50)pendown()right(45)goto(100,0)left(90)fd(120)circle(50,225)penup()goto(0,0)pendown()left(135)fd(120)circle(50,225…

    2022年5月18日
    44
  • pytest指定用例_测试用例怎么编写

    pytest指定用例_测试用例怎么编写前言测试用例在设计的时候,我们一般要求不要有先后顺序,用例是可以打乱了执行的,这样才能达到测试的效果.有些同学在写用例的时候,用例写了先后顺序,有先后顺序后,后面还会有新的问题(如:上个用例返回

    2022年8月6日
    3
  • GridView使用RenderControl取得HTML的问题[通俗易懂]

    GridView使用RenderControl取得HTML的问题[通俗易懂]
    如果想在CodeFile中取得GridView结果的HTML内容,首先会遇到这样的错误讯息:
     型别’GridView’的控制项’GridView1’必须置于有runat=server的表单标记之中。
    这个问题,可以在您的CodeFile中加入以下这段来解决Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)      ‘处理’GridView’的控制项’GridView’必须置

    2022年7月20日
    10
  • Windows端口被占用_windows如何打开端口

    Windows端口被占用_windows如何打开端口电脑系统为Windows10一以管理员身份打开命令行窗口【Win+R】:使用快捷键打开“运行”窗口输入【cmd】,点击确定,打开“命令”窗口二查看被占用端口对应的PID比如在开发时,系统提示你1080已被占用,我们首先要做的就是找到1080端口对应的PID。在命令行中输入命令:netstat-aon|findstr”1080″回车执行命令后,最后一位数字就是被占用窗口的PID。我这里对应的是16996和18912。三查看指定PID的进程在命令行中输入命令:ta.

    2022年9月6日
    1
  • linux 磁盘碎片整理

    linux 磁盘碎片整理1、sudofdisk-l查看各分区情况2、sudoe4defrag-c/dev/sda2查看碎片情况3、sudoe4defrag-v/dev/sda2碎片整理

    2022年6月25日
    33

发表回复

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

关注全栈程序员社区公众号