搭建直播系统

硬件:

  电脑摄像头或手机摄像头

软件:

  DroidCam Windows Client 6.0。获取手机摄像头信息,电脑摄像头则不需此应用

  Adobe Media Server 5。媒体服务器

  Adobe Flash Media Live Encoder 3.2。视频流工具

  flowplayer-3.2.18。网页播放插件,需下载相关插件。

步骤一

  电脑摄像头可跳过此步骤。

  获取视频信息。手机和电脑安装DroidCam客户端,配置后连接。具体方式请问度娘。

步骤二

  安装Adobe Media Server 5,配置实例为“live”。

步骤三

  配置Adobe Flash Media Live Encoder 3.2

  1、“Device”为摄像头设备。

  2、FMS URL为“rtmp://localhost/live”,Stream为“livestream”。

  3、点击“Connect”。

  4、Start

步骤四

  页面显示。

  

复制代码
  <a class="player"   style="display: block; width: 480px; height: 270px;"    id="player" runat="server"></a>

 <script language="JavaScript" type="text/javascript" style="z-index: 0;">
                    flowplayer("player", { src: "../Scripts/flowplayer-3.2.18.swf", wmode: 'transparent' }, {
                        clip: {
                            url: 'rtmp://localhost/live/livestream',
                            //scaling: 'fit',
                            autoPlay: true,
                            // configure clip to use hddn as our provider, referring to our rtmp plugin
                            provider: 'rtmp',
                            live: true,
                        },
                        // streaming plugins are configured under the plugins node
                        plugins: {
                            // here is our rtmp plugin configuration
                            rtmp: {
                                url: '../Scripts/flowplayer.rtmp-3.2.13.swf',
                                // netConnectionUrl defines where the streams are found
                                netConnectionUrl: 'rtmp://localhost/live'
                            },
                            controls: {
                                play: false, opacity: 0, scrubber: false, volume: false, mute: false
                            }
                        }
                    });
</script>
复制代码

 

  

posted @   阿日斯兰  阅读(307)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示