Home Database Mysql Tutorial FMS4 P2P直播解决方案

FMS4 P2P直播解决方案

Jun 07, 2016 pm 03:12 PM
p2p plan at present live streaming Introduction Live video solution

一、方案简介 目前视频直播通用的方案有两种,分别是单播模式和多播模式。单播模式虽然有着数据流稳定的特点,但具有地域化问题,且随着客户量的增加,服务器负载也随之增大,需要投入大量的硬件设备以及巨额的带宽费用。多播模式通常体现为现今的P2P技术。P

 一、方案简介

目前视频直播通用的方案有两种,分别是单播模式和多播模式。单播模式虽然有着数据流稳定的特点,但具有地域化问题,且随着客户量的增加,服务器负载也随之增大,需要投入大量的硬件设备以及巨额的带宽费用。多播模式通常体现为现今的P2P技术。P2P模式解决了单播模式的问题,在提高传输速度和缓解服务器带宽压力上有较大优势,一般在直播中应用得较多。使用P2P技术后可节省内容发布商资金,提高数据流通量。

Adobe Flash Media Server 4(以下简称FMS4)发布后, 联讯软件立即投入大量人力进行研究与开发。在其发布短短几周内便掌握了Flashplayer P2P API的使用以及服务器的配置方法。 

P2P功能采用了最新的Flash RTMFP协议,该协议可以允许使用Adobe Flash Player 10.1的终端用户之间进行直接通信即实现了P2P传输技术。通过使用RTMFP,直播系统将极大降低带宽消耗,媒体数据在终端用户之间流动,不完全由服务器提供,更适合做大规模直播应用。

二、关于P2P
P2P是英文Peer-to-Peer(对等)的简称,又被称为“点对点”。“对等”技术是一种网络新技术,依赖网络中参与者的计算能力和带宽,而不是把依赖都聚集在较少的几台服务器上。P2P还是英文Point to Point (点对点)的简称。它是下载术语,意思是在你自己下载的同时,自己的电脑还要继续做主机上传,这种下载方式,人越多速度越快。

三、单播和多播的区别
单播(Unicast)传输:在发送者和每一接收者之间实现点对点网络连接。如果一台发送者同时给多个的接收者传输相同的数据,也必须相应的复制多份的相同数据包。如果有大量主机希望获得数据包的同一份拷贝时,将导致发送者负担沉重、延迟长、网络拥塞;为保证一定的服务质量需增加硬件和带宽。
FMS4 P2P直播解决方案
(单播)

多播(Multicast)传输:在发送者和每一接收者之间实现点对多点网络连接。如果一台发送者同时给多个的接收者传输相同的数据,也只需复制一份的相同数据包。它不仅提高了数据传送效率,还减少了骨干网络出现拥塞的可能性。

FMS4 P2P直播解决方案
(多播)

四、RTMP和RTMFP的区别
RTMP(Real- Time Messaging Protocol)协议用于单播, RTMFP(Real‐Time Media Flow Protocol)协议用于多播。RTMP是基于TCP的,RTMFP是基于UDP的。UDP在传送直播数据方面比TCP有较多的优势,比如减少延时、对丢包的容忍,虽然在可靠性上有所损失。不象RTMP, RTMFP支持Flash Player直接发送数据给另一个,而不经过Server。服务端连接将被用来初始化并交互一些客户端之间的信息,也可用来进行服务端调用或者作为进入其他系统的网关。FMS4也将用来为用户提供地址认证服务和NAT地址转换服务,避免用户陷入混乱。
FMS4 P2P直播解决方案
(RTMP协议)

FMS4 P2P直播解决方案
(RTMFP协议)

五、方案实现
FMS4 P2P直播解决方案 

(1)视频源:可以使用电视信号、摄像机以及其他编码机支持的视频源。
(2)编码机通过采集卡将信号采集并转码,配合FMS4配置器以RTMP协议发送给FMS4服务器。
(3)配置器(为方便用户使用,我公司重新编写了中文版配置器)专用于生成多播地址的应用。并将此地址分发给编码机及直播应用(联讯电视直播系统、网络课堂系统及网络电视台系统适用)。
(4)直播应用将多播地址发送至我公司客户端视频播放器,视频播放器识别多播地址后,向FMS服务器请求后,获得视频源及其他种子信息并开始视频数据传送。

FMS4 P2P直播解决方案

六、技术特点
1、布置简单。 只需要安装流媒体服务器并进行简易配置即可。
2、高扩展性。 可配置多台FMS服务器组成集群, 增加负载能力。
3、RTMFP协议采用了UDP提升了传送的速度,相对之前的TCP协议在数据传输效率上大大提高。 UDP是Internet上一种更有效传送音频视频的方法,虽然会有一些丢包,错包。RTMFP有两个特性可以帮助解决一些连接错误。
(1)快速连接恢复:连接在以外情况下将快速恢复。例如,一个无线连接掉线了,一旦重连,他将迅速拥有所有的传送能力。
(2)IP动态化:一个活动的网络会话将以PEER来标识,即使他变了一个IP,也可以保持原来的会话。例如,一个笔记本在一个无线网络获得了一个新IP地址,他将立刻继续刚才的会话。
4、减少音视频直播、点播、多人在线游戏等应用的网络带宽的消耗,减轻服务器的负担。
5、负载均衡。P2P网络环境下由于每个节点既是服务器又是客户机,减少了对传统C/S结构服务器计算能力、存储能力的要求,同时因为资源分布在多个节点,更好的实现了整个网络的负载均衡。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Implementing Machine Learning Algorithms in C++: Common Challenges and Solutions Implementing Machine Learning Algorithms in C++: Common Challenges and Solutions Jun 03, 2024 pm 01:25 PM

Common challenges faced by machine learning algorithms in C++ include memory management, multi-threading, performance optimization, and maintainability. Solutions include using smart pointers, modern threading libraries, SIMD instructions and third-party libraries, as well as following coding style guidelines and using automation tools. Practical cases show how to use the Eigen library to implement linear regression algorithms, effectively manage memory and use high-performance matrix operations.

How to start a live broadcast on Xiaohongshu How to start a live broadcast on Xiaohongshu How to start a live broadcast on Xiaohongshu How to start a live broadcast on Xiaohongshu Mar 28, 2024 pm 01:50 PM

Xiaohongshu is a life community platform application that you are very familiar with. It has many functions and allows everyone to see a variety of information content at any time. There are many notes with pictures and texts. All of them can make everyone very satisfied, and sometimes you can see some live broadcast rooms, so everyone also wants to start a live broadcast and chat with everyone, but they don’t know how to start a live broadcast. The editor below I can also give you specific operation methods, I hope it can help you. How to start live streaming in Xiaohongshu: 1. First open Xiaohongshu and click + at the bottom of the homepage. 2. Then switch to live broadcast and click the start live broadcast entrance.

How to watch live broadcast on PotPlayer? -PotPlayer to watch live tutorials How to watch live broadcast on PotPlayer? -PotPlayer to watch live tutorials Mar 19, 2024 pm 10:04 PM

Friends, do you know how to watch live broadcasts with PotPlayer? Today I will explain the tutorial for watching live broadcasts with PotPlayer. If you are interested, come and take a look with me. I hope it can help everyone. First we open PotPlayer, then select the multi-functional sidebar in the lower right corner of the software, and then we click; refer to the picture below and a playlist will pop up. We can select the "Add" option, where we can adjust the live broadcast settings and Add to. At this time, in the drop-down box that pops up, we choose to add a link. Of course, if we have a live broadcast source file, we can directly choose to add the file and then import the file. Then in the address box that pops up, we enter what we want to watch

Python ORM Performance Benchmark: Comparing Different ORM Frameworks Python ORM Performance Benchmark: Comparing Different ORM Frameworks Mar 18, 2024 am 09:10 AM

Object-relational mapping (ORM) frameworks play a vital role in python development, they simplify data access and management by building a bridge between object and relational databases. In order to evaluate the performance of different ORM frameworks, this article will benchmark against the following popular frameworks: sqlAlchemyPeeweeDjangoORMPonyORMTortoiseORM Test Method The benchmarking uses a SQLite database containing 1 million records. The test performed the following operations on the database: Insert: Insert 10,000 new records into the table Read: Read all records in the table Update: Update a single field for all records in the table Delete: Delete all records in the table Each operation

How to enable Douyin live broadcast How to enable Douyin live broadcast Mar 26, 2024 pm 04:01 PM

Douyin live broadcast is becoming more and more popular. I believe many users want to start live broadcast and give it a try. So how do we start Douyin live broadcast? In fact, starting Douyin live broadcast requires a series of live broadcast procedures. Below, the editor will bring you a detailed overview of the entire process of starting Douyin live broadcast. Come and take a look. Douyin usage tutorial: How to start Douyin live broadcast 1. First, we open Douyin, click the + button as shown in the bottom of the main interface to shoot videos or start live broadcast. 2. Then we enter the live broadcast page. We need to select our own live broadcast type. We can choose according to our own equipment and actual situation. Click to start the video live broadcast. 3. Then the most important step before we start the live broadcast is real-name authentication. Enter your relevant information and click the same button.

How to live broadcast on Douyin PC version - How to upload videos on Douyin PC version? How to live broadcast on Douyin PC version - How to upload videos on Douyin PC version? Mar 18, 2024 pm 05:30 PM

Douyin is a particularly popular short video playing software in China. Many friends will use this software to watch short videos. But in the process of using computers, they will also upload videos for live broadcast. Today, let the editor explain to you how to live broadcast on Douyin PC version and how to upload videos on Douyin PC version. 1. How to live broadcast on the computer version of Douyin Douyin is a short video sharing platform launched by ByteDance. It was officially launched in September 2016. It quickly became popular with its unique content format and innovative user experience, becoming one of the most popular social media applications in the world. The core feature of Douyin is that users can show their talents, life and creativity by shooting and editing 15-second short videos. UGC model: Douyin adopts user-generated content (UGC) model

How to watch the replay of Xiaohongshu live broadcast How to watch the replay of Xiaohongshu live broadcast Mar 21, 2024 pm 08:52 PM

How to watch the replay of Xiaohongshu live broadcast? You can watch the live broadcast replay in the Xiaohongshu APP. Most users don’t know how to watch the live broadcast replay. Next, the editor brings to users the pictures and texts of how to watch the replay of Xiaohongshu live broadcast. Tutorial, interested users come and take a look! Xiaohongshu usage tutorial How to watch the replay of Xiaohongshu live broadcast 1. First open the Xiaohongshu APP, enter the main page and click [My] in the lower right corner; 2. Then in the My function area, select the [three horizontal lines] in the upper left corner Line]; 3. Then expand the function bar on the left and click [Creation Center]; 4. Then enter the creation service page and select [Anchor Center]; 5. Finally jump to the page below and click [Live Broadcast] Playback].

How to make money from Douyin live broadcast and where does it come from? How to make money from Douyin live broadcast and where does it come from? Apr 12, 2024 am 11:41 AM

1. Live broadcast rewards: When users watch live broadcasts, they can give virtual gifts to the anchors, and the anchors can earn profits from them. 2. Live streaming: The anchor sells goods through the live streaming platform and obtains sales commissions or profit shares. 3. Brand cooperation: Anchors cooperate with brands to promote their products or services and obtain cooperation fees or advertising revenue. 4. Advertising revenue: The Douyin platform places advertisements in the live broadcast room, and the anchors can get a share of it. 5. Position fee: Merchants pay anchor fees to place their products or services in a conspicuous location in the live broadcast room.

See all articles