检测RTP流中使用的编解码器(用于动态PT) [英] Detecting codec used in RTP stream (for dynamic PTs)

查看:425
本文介绍了检测RTP流中使用的编解码器(用于动态PT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过仅分析RTP流来检测RTP流中使用的编解码器?我知道RTP标头中的有效负载类型(PT)字段-可用于标识具有静态分配的PT号的编解码器.使用动态PT号码范围的其他编解码器又如何呢?是否有任何启发式方法来检测有效载荷的类型?我对各种解决方案都感兴趣,即使检测仅适用于一个编解码器.

Is it possible to detect the codec used in an RTP stream by analyzing the RTP stream alone? I know about the payload type (PT) field in the RTP header -- that can be used to identify codecs that have statically assigned PT numbers. What about the other codecs that use the dynamic PT number range? Are there any heuristics to detect the type of the payload? I'm interested in all kinds of solutions, even if the detection works for one codec only.

推荐答案

当然,您可以在数据包周围嗅探一下,看它是否看起来像是RFC XXX或YYY等.长度检查(尽管是固定长度的编解码器)注意每个数据包有多个帧);时间戳率(告诉您窄/宽/超宽带音频或视频);然后您可以查看前N个字节是否与其中一个可能匹配项的有效模式匹配.

Sure, you can sniff around the packet to see if it appears to be RFC XXX, or YYY, etc. Length checks (for fixed-length codecs, though watch out for multiple frames per packet); timestamp rate (tells you narrow/wide/ultra-wide band audio or video); and then you can see if the first N bytes matches the valid pattern for one of the possible matches.

除非您只对子集感兴趣,否则工作量不小.

Not a small amount of work unless you're only interested in a subset.

这篇关于检测RTP流中使用的编解码器(用于动态PT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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