webrtc playout-delay

101 篇文章 109 订阅 ¥29.90 ¥99.00
This blog discusses the 'playout-delay' RTP header extension in WebRTC, which allows senders to guide receivers on the desired playout delay range. It covers the introduction, minimum and maximum delay, use cases, and RTP header extension format. The aim is to balance latency and smooth playback in interactive streaming, movie playback, and interactive communication scenarios." 108559205,9826436,Kubernetes集群监控详解,"['Kubernetes监控', '容器监控', '资源管理', '集群管理']
摘要由CSDN通过智能技术生成

playout-delay

Name: “Playout Delay” ; “RTP Header Extension to control Playout Delay”

Formal name: http://www.webrtc.org/experiments/rtp-hdrext/playout-delay

SDP “a= name”: “playout-delay” ; this is also used in client/cloud signaling.

Status: This extension is defined here to allow for experimentation. Once experience has shown that it is useful, we intend to make a proposal based on it for standardization in the IETF.

Introduction

On WebRTC, the RTP receiver continuously measures inter-packet delay and evaluates packet jitter. Besides this, an estimated delay for decode and render at the receiver is computed. The jitter buffer, the local time extrapolation and the predicted render time (based on predicted decode and render time) impact the delay on a frame before it is rendered at the receiver.

This document proposes an RTP extension to enable the RTP sender to try and limit the amount of playout delay at the receiver in a certain range. A minimum and maximum delay from the sender provides guidance on the range over which the receiver can smooth out rendering.

Thus, this extension aims to provide the sender’s intent to the receiver on how quickly a frame needs to be rendered.

The following use cases are addressed by this extension:

  • Interactive streaming (gaming, remote access): Interactive streaming is highly sensitive to end-to-end latency and any delay in render impacts the end-user experience. These use cases prioritize reducing delay over any smoothing done at the receiver. In these cases, the RTP sender would like to disable all smoothing at receiver (min delay = max delay = 0)
  • Movie playback: In some scenarios, the user prefers smooth playback and adaptive delay impacts end-user experience (audio can speed up and slow down). In these cases the sender would like to have a fixed delay at all times (min delay = max delay = K)
  • Interactive communication: This is the scenarios where the receiver is best suited to adjust the delay adaptively to minimize latency and at the same time add some smoothing based on jitter prevalent due to network conditions (min delay = K1, max delay = K2)

MIN and MAX playout delay

The playout delay on a frame represents the amount of delay added to a frame the time it is captured at the sender to the time it is expected to be rendered at the receiver. Thus playout delay is essentially:

Playout delay = ExpectedRenderTime(frame) - ExpectedCaptureTime(frame)

MIN and MAX playout delay in turn represent the minimum and maximum delay that can be seen on a frame. This restriction range is best effort. The receiver is expected to try and meet the range as best as it can.

A value of 0 for example is meaningless from the perspective of actually meeting the suggested delay, but it indicates to the receiver that the frame should be rendered as soon as possible. It is up-to the receiver to decide how to handle a frame when it arrives too late (i.e., whether to simply drop or hand over for rendering as soon as possible).

RTP header extension format

 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  ID   | len=2 |       MIN delay       |       MAX delay       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

12 bits for Minimum and Maximum delay. This represents a range of 0 - 40950 milliseconds for minimum and maximum (with a granularity of 10 ms). A granularity of 10 ms is sufficient since we expect the following typical use cases:

  • 0 ms: Certain gaming scenarios (likely without audio) where we will want to play the frame as soon as possible. Also, for remote desktop without audio where rendering a frame asap makes sense
  • 100/150/200 ms: These could be the max target latency for interactive streaming use cases depending on the actual application (gaming, remoting with audio, interactive scenarios)
  • 400 ms: Application that want to ensure a network glitch has very little chance of causing a freeze can start with a minimum delay target that is high enough to deal with network issues. Video streaming is one example.

The header is attached to the RTP packet by the RTP sender when it needs to change the min and max smoothing delay at the receiver. Once the sender is informed that at least one RTP packet which has the min and max details is delivered, it MAY stop providing details on all further RTP packets until another change warrants communicating the details to the receiver again. This is done as follows:

RTCP feedback to RTP sender includes the highest sequence number that was seen on the RTP receiver. The RTP sender can track the sequence number on the packet that first had the playout delay extension and then stop sending the extension once the received sequence number is greater than the sequence number on the first packet containing the current values playout delay in this extension.

当然也可以直接修改代码;

 

 

 

 

 

 

 

 

 

video-content-type

The Video Content Type extension is used to communicate a video content type from sender to receiver of rtp video stream. Contact ilnik@google.com for more info.

Name: “Video Content Type” ; “RTP Header Extension for Video Content Type”

Formal name: http://www.webrtc.org/experiments/rtp-hdrext/video-content-type

SDP “a= name”: “video-content-type” ; this is also used in client/cloud signaling.

Wire format: 1-byte extension, 1 bytes of data. total 2 bytes extra per packet (plus shared 4 bytes for all extensions present: 2 byte magic word 0xBEDE, 2 byte # of extensions).

Values:

  • 0x00: Unspecified. Default value. Treated the same as an absence of an extension.
  • 0x01: Screenshare. Video stream is of a screenshare type.

Notes: Extension shoud be present only in the last packet of key-frames. If attached to other packets it should be ignored. If extension is absent, Unspecified value is assumed.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值