为什么RTP/RTSP与我的H.264 NAL混为一谈? [英] Why RTP/RTSP meddle with my H.264 NALs?

查看:186
本文介绍了为什么RTP/RTSP与我的H.264 NAL混为一谈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了RFC,注意到可以解释为什么发生以下情况(尽管解码器仍可以制作原始电影).

I looked in The RFC and noting could explain why the following happens(Though the decoder can still produce the original movie).

我使用VSS h.264编码器传输了H.264/AVC二进制文件,字节流看起来像这样E5 46 0E 4F FF A0 23 ...

I transmitted the H.264/AVC nals using VSS h.264 encoder, the byte stream looked something like this E5 46 0E 4F FF A0 23...

当我在RTP Broadcaster/RTSP接收器之后的接收器一侧读取电影数据时,我得到了额外的未知数据,但是总是在相同的地方,在开始代码前缀(0x00000001)之前添加了8个字节, 并在开始代码"前缀后添加了2个字节.

when I read the movie data one the receiver side after the RTP Broadcaster/RTSP receiver, I get extra unknown data but always in the same places, 8 bytes are added before Start Code prefix (0x00000001), and 2 bytes are added after Start Code prefix it looks something like this.

XX XX XX XX XX XX XX XX 00 00 00 01 XX XX,然后我看一下Wireshark,我可以看到RTP将字节添加到数据有效载荷中.

XX XX XX XX XX XX XX XX 00 00 00 01 XX XX, then I look in the Wireshark and i could see that the RTP adds the bytes to the data payload.

为什么会发生为什么?以及为什么解码器似乎能够很好地处理这些多余的字节?!

Why does it happens why? and why the decoder seems to cope well with those extra bytes?!

推荐答案

那是一些混乱的流……您甚至可以将其弄乱,并且它仍然可以工作,因为解码器将其解析为0x000001起始代码,跳过开头添加的字节.最后的那两个新字节必须是H264碎片字节...或与H264相关的东西,因为它们可以工作.

Thats some messed up stream... And you can mess it up even more, and it will still work, because decoder parses it for 0x000001 start code, skipping the bytes that are added at the beginning. Those two new bytes at the end must be H264 fragmentation bytes... or something H264 related since they work.

因此,基本上,这是由于打包程序/RTSP源过滤器有缺陷.我的猜测是,如果您对这8个字节进行ASCII编码,您将获得RTSP源过滤器的供应商名称... xD

So basically, this is due to defective packetizer/RTSP source filter. My guess is that if you ASCII encode those 8 bytes you will get the vendor name of the RTSP source filter... xD

这篇关于为什么RTP/RTSP与我的H.264 NAL混为一谈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆