<div dir="ltr"><div><div><div><div><div>Hi, <br></div>I'm trying to write a plugin for a webrtc gateway (Janus). Basicaly, the code deals with incomping RTP packet (not SRTP, as the gateway decrypt et demux RTCP ...), depacketize it, decode it with the use of avcodec_decode_video2. Some manipulations are made on the raw outputted frames and then frame are encoded with avcodec_encode_video (not avcodec_encodevideo2 because it's not available on my system for a mysterious reason. ) <br><br></div><div>Then, with the use of libavformat I write the encoded frame in "rtp" (tu  specific url rtp://<a href="http://127.0.0.1:5000">127.0.0.1:5000</a>). <br></div><div>another plugin of the gateway send the stream to a list of participant.   <br></div><br></div>But, nobody could render the video. Chrome send a pli for each packet received. So i tried to force the encoder to send a keyframe : <br><br>if(complete_frame%140 == 0)<br>                    m_pFrame->pict_type = FF_I_TYPE ;<br>just before the call of avcodec_encode_video<br><br>But nothing change. <br>After some investigations i discovered strange things in the output of the decoder : <br><br></div><div>I tried to parse header of packets from avcodec_encode_video and it never contain this : <br><br>/* vet via sync code */<br>                    if(c[0]!=0x9d||c[1]!=0x01||c[2]!=0x2a) <br>                        JANUS_LOG(LOG_WARN, "First 3-bytes after header not what they're supposed to be?\n");<br><br></div></div><div><div>the "keyframe marker". But all packet contains xbit = 1, sbit = 1 and pbit = 0. That is what we have in the case of a keyframe. <br><br></div><div>Also i get this message from the lib when beginin the process : RTP VP8 payload implementation is incompatible with the latest spec drafts.<br><br></div><div>The question is, what is the proper way to get valid VP8 packets and RTP VP8 packet. <br></div><div>I need to set the correct RTP payload for the streamer configuration so how can I access to it through libavformat ? <br><br></div><div>Thanks a lot for your advices. <br></div><div>William. <br></div><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none"></span></div></div>