Hi! I'm using such code for initialization:<br><br> avcodec_register_all();<br> av_register_all();<br> avformat_network_init();<br><br> const char *filename="rtp://<a href="http://192.168.0.101:10202">192.168.0.101:10202</a>";<br>
<br> AVOutputFormat *formatRTP = av_guess_format("rtp", filename, NULL);<br> pFormatRTP = avformat_alloc_context();<br> pFormatRTP->oformat = formatRTP;<br> <br> video_st = av_new_stream(pFormatRTP, AVMEDIA_TYPE_VIDEO);<br>
avcodec_get_context_defaults3(video_st->codec, avcodec_find_encoder(CODEC_ID_H264));<br> H264Context = video_st->codec;<br> H264Context->codec_id = CODEC_ID_H264;<br> H264Context->codec_type = AVMEDIA_TYPE_VIDEO;<br>
H264Context->width = VideoWidth;<br> H264Context->height = VideoHeight;<br> H264Context->time_base.den = VideoFps;<br> H264Context->time_base.num = 1; <br> H264Context->pix_fmt = PIX_FMT_YUV420P;<br>
H264Context->flags |= CODEC_FLAG_GLOBAL_HEADER;<br> <br> if (avio_open(&pFormatRTP->pb, filename, 2) != 0) {<br> return S_FALSE;<br> }<br> <br> if(avformat_write_header(pFormatRTP, NULL)!=0)<br>
{<br> return S_FALSE;<br> } <br><br>But when I call av_sdp_create after that, it neither returns sprop-parameter-sets for sdp nor profile-level-id.<br>Can somebody help?