<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div><br></div><div><br></div><div id=""><div>Hello,<br></div><div><br></div><div>I am using FFMpeg libavformat library to generate a webm file from RTP video and audio streams that I receive on my server. I receive already encoded streams. Video - vp8 encoded and audio - opus encoded.<br></div><div><br></div><div>I will have RTP timestamps for both the streams and NTP timestamps for the corresponding RTP packets from the RTCP. Now how do I set PTS and DTS of AVPacket with these values ? I parse the video byte stream to get frame wise byte array and I will have the timestamps mentioned above. So, while constructing AVPacket, how should I set the timestamps so that audio and video will be in sync properly in my final output file ?<br></div><div><br></div><div><br></div><div>Regards,<br></div><div>Ravi Kiran B S<br></div><div><br></div></div><div><br></div></div></body></html>