<HTML><BODY><div>Hi, I'm trying to modify ffserver.c of the old version to use rtps server.</div><div>If I send an rtsp/rtp stream via <strong><em>av_interleaved_write_frame(pFmtCtxOut, ppktout)</em></strong> to rtsp-simple-server and watch it in VLC, then there are no errors, I install pts/dts myself in my source.</div><div> </div><div>But if I send x264 encoded packets via udp protocol to a connection implemented so as not to use temporary files.</div><div> </div><div><div><div>    AVDictionary * pDicStm = NULL;</div><div>    av_dict_set(&pDicStm, "rtsp_flags", "listen", 0);</div><div>    av_dict_set(&pDicStm, "protocol_whitelist", "tcp,udp,rtp", 0);</div><div>    av_dict_set(&pDicStm, "rtsp_transport", "udp", 0);</div><div>    av_dict_set(&pDicStm, "allowed_media_types", "video", 0);</div><div>    avformat_open_input(&pFmtCtxStm, rtsp_url, NULL, &pDicStm);</div></div></div><div> </div><div><div><div>Then when reading from such a connection, I see errors</div></div></div><div> </div><div><div><div>[rtp @ ] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly</div><div>[rtp @ ] Encoder did not produce proper pts, making some up.</div><div>[rtp @ ] Packets poorly interleaved, failed to avoid negative timestamp -12886 in stream 0.</div><div>Try -max_interleave_delta 0 as a possible workaround.</div><div> </div><div>Yes, I know that it is suggested to use -fflags +genpts for ffmpeg, but what should I actually specify to avoid this error?</div><div> </div></div></div></BODY></HTML>