简体   繁体   English

vp9 处理数据包丢失还是我必须手动处理?

[英]Does vp9 handle packet loss or I have to handle manually?

I am capturing my screen in real-time and encoding them using the vp9 codec (using JNI).我正在实时捕获我的屏幕并使用vp9解码器(使用 JNI)对其进行编码。 encoded frames are I-frame or P-frame.编码帧是 I 帧或 P 帧。 then I divide them into chunks (sub-frames) and send them to the.network.然后我它们分成块(子帧)并将它们发送到.network。 But at receiving end there has been some natural packet loss and even a single miss of sub-frames causing the inability to reconstruct corresponding I/P - frames.但是在接收端出现了一些自然的数据包丢失,甚至单个子帧丢失导致无法重建相应的 I/P 帧。 I tried to simulate (randomly throwing out some sub-frames) the same thing locally and the same things happened.我试图在本地模拟(随机丢弃一些子帧)同样的事情,同样的事情发生了。 Doesn't VP9 codec has some built-in packet loss handling? VP9编解码器没有内置丢包处理功能吗? If so, how to enable them and how can it perform well to a certain percentage?如果是这样,如何启用它们以及它如何在一定百分比下表现良好?

And if there is no built-in packet loss handling Do I have to implement FIR or FEC manually?如果没有内置的数据包丢失处理,我是否必须手动实施 FIR 或 FEC? and where to follow?去哪里? Thanks in advance.提前致谢。

Common way to send video stream is RTP protocol based on UDP, among other libs WebRTC also uses this transport under hood.发送视频的常用方法 stream 是基于 UDP 的 RTP 协议,除其他库之外,WebRTC 也使用此传输。 Each encoded frame before sending is packetized, ie splitted to one or several RTP packets.发送前的每个编码帧都被打包,即拆分为一个或多个 RTP 数据包。 In this context term "packet loss" means RTP packet loss.在此上下文中,术语“数据包丢失”是指 RTP 数据包丢失。 These losses are handled by sender peer using RTCP Receiver Reports from the other peer: the sender can retransmit lost packets.这些丢失由发送方对等方使用来自其他对等方的 RTCP 接收器报告来处理:发送方可以重新传输丢失的数据包。 So, such reconstruction is not related to VP9 or any other specific codec.因此,这种重建与 VP9 或任何其他特定编解码器无关。

As vp9 is a entropy coding, even a single packet missing causes inability to reconstruct the I/P frame.由于 vp9 是熵编码,即使单个数据包丢失也会导致无法重建 I/P 帧。 Even inability to reconstruct I frame cause inability to construct all subsequent & dependent P frame's.即使无法重建 I 帧也会导致无法构建所有后续和相关的 P 帧。 As I am using raw vp9 I have to implement any kind of retransmission or redundancy.由于我使用的是原始 vp9,因此我必须实施任何类型的重传或冗余。

There is a concept of error_resilient packet or golden frame which can be called as budget version of I-frame which I need to send at certain interval from sender so that the I frame & subsequent P frame's will have some resiliency (I tried it and failed generating golden frame from encoder by enabling the parameter, maybe I will have to generate it myself).有一个 error_resilient 数据包或黄金帧的概念,可以称为 I 帧的预算版本,我需要以一定的间隔从发送方发送,以便 I 帧和后续的 P 帧将具有一定的弹性(我尝试过但失败了通过启用参数从编码器生成黄金帧,也许我必须自己生成它)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM