I have to get stream video [which is from rtsp server] width and height.
Third party servers give the following info at RTSP DESCRIBE REQUEST:
One RTSP server give me width-height
Server Response:
RTSP/1.0 200 OK
....
Content-Type: application/sdp
Content-Length: 376
a=x-dimensions:1280,1024 // GET WIDTH HEIGHT
....
a=x-dimensions:1280,1024
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
Anyway/method to get stream width-height?
Width and height can be extracted from the H.264 sequence parameters set, which is usually part of the fmtp line of the SDP in the DESCRIBE response. See this helpful SO post by cipi.