Payload Type to transmit the webcam stream
I would like to know the payload type, from the list that appears in the rfc3551 (http://www.ietf开发者_开发问答.org/rfc/rfc3551.txt page 33), to transmit, via RTSP, the webcam stream.
Can be any of them?
Thanks for the help. Greetings!
It can be any of them, but the payload type must reflect the A/V encoding you are using. In H.264 for instance, the fmtp mapping to the payload type line contains information needed by the client to decode the video. Best thing is to refer to the RFC's related to the codecs you are using to encode the webcam data.
Generally a dynamic payload type is used these days (96 and up), which maps a payload to an audio/video encoding for a session. See https://www.rfc-editor.org/rfc/rfc1890 for more info about dynamic payloads.
As for the static payloads, these are assigned by IANA for well known codecs. IIRC it was quickly realised, that the space was limited, and therefore usage of dynamic payloads was recommended.
I found the answer to my question. The webcam stream to create the YUV format and for transmission over RTSP / RTP, we must turn to JPEG_RTP.
Furthermore, this means that the SDP message, the parameter "m " (http://www.ietf.org/rfc/rfc4566.txt page 22) and the parameter "a" (http://www.ietf.org/rfc/rfc4566.txt page 21) must have the value:
m=video 3000 RTP/AVP 26
a=rtpmap:26 JPEG/90000
a=mimetype: video/JPEG
Greetings!
精彩评论