从RTP数据包或Rtsp服务器获取视频宽度高度 [英] Getting video width height from RTP Packets or Rtsp Server

查看:439
本文介绍了从RTP数据包或Rtsp服务器获取视频宽度高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须获取流视频(来自rtsp服务器)宽度和高度。

I have to get stream video [ which is from rtsp server] width and height.

第三方服务器在RTSP DESCRIBE REQUEST上提供以下信息:

Third party servers give the following info at RTSP DESCRIBE REQUEST:

一台RTSP服务器为我提供宽度高度

Server Response:

RTSP/1.0 200 OK
....

Content-Type: application/sdp

Content-Length: 376

a=x-dimensions:1280,1024 // GET WIDTH HEIGHT

....




a = x尺寸:1280,1024

但是另一个不给我宽度/高度信息...。似乎它支持ONVIF ...

But the other does not give me width/height info.... It seems that it supports ONVIF...

Server Response:


RTSP/1.0 200 OK

x-Accept-Dynamic-Rate: 1
... 
Content-Length: 625
... 
m=video 0 RTP/AVP 96

i=Video channel in H264 VBR format

a=mpeg4-esid:201

a=control:trackID=0

a=rtpmap:96 H264/90000

a=fmtp:96 packetization-mode=1;profile-level-id=640032;....

m=application 0 RTP/AVP 107

i=ONVIF metadata

a=control:events

a=sendonly

a=rtpmap:107 vnd.onvif.metadata/90000

是否可以通过任何方法获得流的宽度高度?建议。 。

最美好的祝愿

推荐答案

宽度和高度可以从H.264序列参数集提取,该序列集通常是DESCRIBE响应中SDP的fmtp行的一部分。参见cipi的有用的SO帖子

Width and height can be extracted from the H.264 sequence parameters set, which is is usually part of the fmtp line of the SDP in the DESCRIBE response. See this helpful SO post by cipi.

这篇关于从RTP数据包或Rtsp服务器获取视频宽度高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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