I am trying to understand what is required in SDP in order to be able to decode H264 from RTP packets.
This is due to this question , since the answer to this question only works in a small number of cases.
Example
I pass the following command from VLC.
vlc -vvv sample_video/big_buck_bunny_480p_h264.mov --sout '#transcode{vcodec=h264,vb=700,fps=20,scale=0.25,acodec=none}:rtp{dst=10.5.110.117,port=5004,ttl=1}'
This transcodes the video to:
- Bitrate: 700 Kbps
- Frame Rate: 20 per second
- Resolution: 25% of the original
The receiver correctly receives and interprets the stream with the next SDP file (delete the first line, its just the name).
//test.sdp
c=IN IP4 10.5.110.117
m=video 5004 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=640014;sprop-parameter-sets=Z2QAFKzZQ0R+f/zBfMMAQAAAAwBAAAAKI8UKZYA=,aOvssiw=;
Command to run: vlc test.sdp
An accessible document here , entitled "SIP Video File Best Practices" in chapter 7.2 for level-level conditions:
( ) RFC 6184, " -id" , , . SDP, . , 420010, RFC 6184.
, sprop-:
sprop-parameters-sets
H.264 , . SIP- , H.323 SIP- .
1
, profile-level-id .
//test.sdp
c=IN IP4 10.5.110.117
m=video 5004 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 sprop-parameter-sets=Z2QAFKzZQ0R+f/zBfMMAQAAAAwBAAAAKI8UKZYA=,aOvssiw=;
sprop-parameter-sets.
2
RTCP, SIP SAP, SDP sprop-parameter-sets.