热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

为什么要创建SRT?

提示:本文为译文,参考https:github.comHaivisionsrtblobmasterdocsmiscwhy-srt-was-created

提示:本文为译文,参考https://github.com/Haivision/srt/blob/master/docs/misc/why-srt-was-created.md




Some people have asked us why we’re using the UDT library within our SRT protocol. Actually, some people claimed that SRT is just a slightly modified version of UDT and that UDT is known to be useless for live video transmission. Guess what, the latter is true. UDT has been designed for high throughput file transmission over public networks. However, SRT is far from being a slightly modified version of UDT. I’ll get into the details, but will start with a little bit of history.
有些人问我们为什么要在SRT协议中使用UDT库。 事实上,一些人声称SRT只是UDT的一个稍微修改的版本,而众所周知,UDT对于直播视频传输是无用的。 你猜怎么着,后者是真的。 UDT是为公共网络上的高吞吐量文件传输而设计的。 然而,SRT远非UDT的一个稍微修改的版本。 我会讲到细节,但会先讲一点历史。

Haivision has always been known for lowest latency video transmission across IP based networks, typically MPEG-TS unicast or multicast streams over the UDP protocol. This solution is perfect for protected networks and if packet loss became a problem, enabling forward error correction (FEC) fixed it.
Haivision一直以在基于IP的网络上进行最低延迟的视频传输而闻名,通常是基于UDP协议的MPEG-TS单播或多播流。 这个解决方案对于受保护的网络是完美的,如果数据包丢失成为一个问题,启用前向错误纠正(FEC)可以解决这个问题。

At some point we were getting questioned whether it would be possible to achieve the same latency between customer sites in different locations, between different cities, countries or even continents. Of course it’s possible with satellite links or dedicated MPLS networks, but those are quite expensive solutions, so people wanted to use their public internet connectivity instead. While it’s possible to go with FEC in some cases, that’s not a reliable solution, as the amount of recoverable packet loss is limited, unless you accept a significant amount of bandwidth overhead.
在某些时候,我们被问到是否有可能在不同地点、不同城市、不同国家甚至不同大洲的客户站点之间实现相同的延迟。 当然,通过卫星连接或专用的MPLS网络也是可能的,但这些解决方案非常昂贵,所以人们希望使用他们的公共互联网连接。 虽然在某些情况下可以使用FEC,但这不是一个可靠的解决方案,因为可恢复的包丢失数量是有限的,除非您接受大量的带宽开销。

After evaluating the pros and cons of different third party solutions, we found that none satisfied all our requirements. Particularly the lack of insight into the underlying technology drove us to the decision to develop our own solution, which we then could deeply integrate into products. That way, it would become the “glue” that enables us to transmit streams between all our different products, locally or across far distances, while maintaining our low latency proposition.
在评估了不同的第三方解决方案的优缺点后,我们发现没有一个能满足我们所有的需求。 特别是对底层技术缺乏深入的了解,促使我们决定开发自己的解决方案,然后将其深入集成到产品中。 这样,它将成为“粘合剂”,使我们能够在本地或长距离传输所有不同产品之间的流,同时保持我们的低延迟观点。

There were a few of possible choices to consider:
有几个可能的选择可以考虑:


  • The TCP based approach. Problem for live streaming: Network congestion, too slow packet loss recovery.
  • 基于TCP的方式。 直播问题:网络拥塞,数据包丢失恢复太慢。
  • The UDP based Approach. General problem: Packet loss, jitter, packet re-ordering, delay
  • 基于UDP的方法。 一般问题:包丢失,抖动,包重新排序,延迟
  • Reliable UDP. Adds framing and selective retransmit.
  • 可靠UDP。 添加帧和选择性重传。

Having had a history with UDT for data transmission, I remembered its packet loss recovery abilities and just started playing with it. Though not designed for live streaming at all, it kind of worked when using really big buffers. I handed it over to one of our extremely talented networking guys in the embedded software team (thanks, Jean!) and asked him whether he’d be able to make this a low latency live streaming solution. I didn’t hear anything back for quite a while and had almost lost my hope, when he contacted me to tell me he had to rewrite the whole packet retransmission functionality in order to be able to react to packet loss immediately when it happens and that he added an encryption protocol, which he had specified and implemented for other use cases before. Nice 😃
曾经使用UDT进行数据传输,我想起了它的丢包恢复功能,并开始使用它。 虽然不是为实时流设计的,但当使用真正大的缓冲区时,它是有效的。 我把它交给了我们嵌入式软件团队中一个非常有才华的网络人员(谢谢Jean!),并问他是否可以把它变成一个低延迟的直播流媒体解决方案。 我很长一段时间没有收到任何回复,几乎失去了希望,当他联系我,告诉我他必须重写整个数据包重传功能,以便能够在发生数据包丢失时立即做出反应,他添加了一个加密协议, 他之前已经为其他用例指定并实现了。 好:-)

We started testing sending low latency live streams back and forth between Germany and Montreal and it worked! However, we didn’t get the latency down to a level we had hoped to achieve. The problem we faced turned out to be timing related (as always in media …).
我们开始测试在德国和蒙特利尔之间发送低延迟的实时流,它工作了! 然而,我们并没有将延迟降低到我们希望达到的水平。 我们所面临的问题其实与时间有关(游戏邦注:在媒体中总是如此)。

What happened was this:
事情是这样的:
在这里插入图片描述

The characteristics of the original stream on the source network got completely changed by the transmission over the public internet. The reasons are delay, jitter, packet loss and its recovery on the dirty network. The signal on the receiver side had completely different characteristics, which led to problems with decoding, as the audio and video decoders didn’t get the packets at the expected times. This can be handled by buffering, but that’s not what you want in low latency setups.
原始流在源网络上的特性完全被公共互联网上的传输所改变。 其原因是恶劣网络存在时延、抖动、丢包及其恢复。 接收端的信号具有完全不同的特征,这导致解码问题,音频和视频解码器没有在预期的时间内得到数据包。 这可以通过缓冲来处理,但在低延迟设置中这不是您想要的。

The solution was to come up with a mechanism that recreates the signal characteristics on the receiver side. That way we were able to dramatically reduce the buffering. This functionality is part of the SRT protocol itself, so once the data comes out of the SRT protocol on the receiver side, the stream characteristics have been properly recovered.
解决方案是想出一种机制,在接收端重建信号特征。 这样我们就能显著减少缓冲。 这个功能是SRT协议本身的一部分,所以一旦数据从接收端的SRT协议出来,流的特征就被正确地恢复了。

The result is a happy decoder:
结果是一个令人愉快的解码器:
在这里插入图片描述

We publicly showed SRT (Secure Reliable Transport) the first time at IBC 2013, where we were the only ones to show an HEVC encoded live stream, camera to glass, from a hotel suite outside the exhibition directly onto the show floor, using the network provided by the RAI. Everybody who has been at such a show before knows how bad these networks can get. And the network was bad. So bad that we expected the whole demo to fall apart, having pulled the first trial version of SRT directly from the labs. The excitement was huge, when we realized that the transmission still worked fine!
我们首次在IBC 2013上公开展示了SRT (Secure Reliable Transport),在那里我们是唯一一个使用RAI提供的网络,从展会外的酒店套房直接到展厅展示HEVC编码的直播流,摄像机到玻璃。 每个看过这种节目的人都知道这些网络有多糟糕。 网络也不好。 如此糟糕,以至于我们预计整个演示会崩溃,并直接从实验室取出了SRT的第一个试验版本。 当我们发现变速器还能正常工作时,我们非常兴奋!

Since then, we added SRT to all our products, enabling us to send high quality, low latency video from and to any endpoint, including our mobile applications. Of course there were improvements to be made and the protocol matured on the way. Until NAB 2017, where we announced that SRT is now Open Source.
从那时起,我们将SRT添加到我们所有的产品中,使我们能够从任何端点发送高质量、低延迟的视频,包括我们的移动应用程序。 当然,该协议还有待改进,也在不断成熟。 直到2017年NAB,我们宣布SRT现在是开源的。

Marc
马克


推荐阅读
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 在Docker中,将主机目录挂载到容器中作为volume使用时,常常会遇到文件权限问题。这是因为容器内外的UID不同所导致的。本文介绍了解决这个问题的方法,包括使用gosu和suexec工具以及在Dockerfile中配置volume的权限。通过这些方法,可以避免在使用Docker时出现无写权限的情况。 ... [详细]
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • Go Cobra命令行工具入门教程
    本文介绍了Go语言实现的命令行工具Cobra的基本概念、安装方法和入门实践。Cobra被广泛应用于各种项目中,如Kubernetes、Hugo和Github CLI等。通过使用Cobra,我们可以快速创建命令行工具,适用于写测试脚本和各种服务的Admin CLI。文章还通过一个简单的demo演示了Cobra的使用方法。 ... [详细]
  • 深度学习中的Vision Transformer (ViT)详解
    本文详细介绍了深度学习中的Vision Transformer (ViT)方法。首先介绍了相关工作和ViT的基本原理,包括图像块嵌入、可学习的嵌入、位置嵌入和Transformer编码器等。接着讨论了ViT的张量维度变化、归纳偏置与混合架构、微调及更高分辨率等方面。最后给出了实验结果和相关代码的链接。本文的研究表明,对于CV任务,直接应用纯Transformer架构于图像块序列是可行的,无需依赖于卷积网络。 ... [详细]
  • 十大经典排序算法动图演示+Python实现
    本文介绍了十大经典排序算法的原理、演示和Python实现。排序算法分为内部排序和外部排序,常见的内部排序算法有插入排序、希尔排序、选择排序、冒泡排序、归并排序、快速排序、堆排序、基数排序等。文章还解释了时间复杂度和稳定性的概念,并提供了相关的名词解释。 ... [详细]
  • 详解 Python 的二元算术运算,为什么说减法只是语法糖?[Python常见问题]
    原题|UnravellingbinaryarithmeticoperationsinPython作者|BrettCannon译者|豌豆花下猫(“Python猫 ... [详细]
  • 如何用UE4制作2D游戏文档——计算篇
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了如何用UE4制作2D游戏文档——计算篇相关的知识,希望对你有一定的参考价值。 ... [详细]
  • 使用在线工具jsonschema2pojo根据json生成java对象
    本文介绍了使用在线工具jsonschema2pojo根据json生成java对象的方法。通过该工具,用户只需将json字符串复制到输入框中,即可自动将其转换成java对象。该工具还能解析列表式的json数据,并将嵌套在内层的对象也解析出来。本文以请求github的api为例,展示了使用该工具的步骤和效果。 ... [详细]
  • 关于我们EMQ是一家全球领先的开源物联网基础设施软件供应商,服务新产业周期的IoT&5G、边缘计算与云计算市场,交付全球领先的开源物联网消息服务器和流处理数据 ... [详细]
  • sklearn数据集库中的常用数据集类型介绍
    本文介绍了sklearn数据集库中常用的数据集类型,包括玩具数据集和样本生成器。其中详细介绍了波士顿房价数据集,包含了波士顿506处房屋的13种不同特征以及房屋价格,适用于回归任务。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 本文介绍了在Cpp中将字符串形式的数值转换为int或float等数值类型的方法,主要使用了strtol、strtod和strtoul函数。这些函数可以将以null结尾的字符串转换为long int、double或unsigned long类型的数值,且支持任意进制的字符串转换。相比之下,atoi函数只能转换十进制数值且没有错误返回。 ... [详细]
  • HSRP热备份路由器协议的应用及配置
    本文介绍了HSRP热备份路由器协议的应用及配置方法,包括设计目标、工作原理、配置命令等。通过HSRP协议,可以实现在主动路由器故障时自动切换到备份路由器,保证网络连通性。此外,还介绍了R1和R2路由器的配置方法以及Sw1和Sw2交换机的配置方法,最后还介绍了测试连通性和路由追踪的方法。 ... [详细]
  • 概述H.323是由ITU制定的通信控制协议,用于在分组交换网中提供多媒体业务。呼叫控制是其中的重要组成部分,它可用来建立点到点的媒体会话和多点间媒体会议 ... [详细]
author-avatar
兔子东大门一手批发
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有