<div>I am successfully using libav to receive the video stream from an RTSP network source. The point is that I need to syncronize my computer's time with the video capturing, meaning that I need to know which datetime of my computer corresponds to the first frame (pts = 0). My API calls are the following ones:</div>

<div><br></div><div>    av_register_all()</div><div>    avcodec_register_all()</div><div>    avformat_network_init()</div><div>    avformat_open_input()</div><div>    avformat_find_stream_info()</div><div>    av_read_play()</div>

<div>    loop</div><div>      av_init_packet()</div><div>      av_read_frame()</div><div>      [...]</div><div>      av_free_packet</div><div>    end loop</div><div><br></div><div>With the calls above, I successfully read frames, but I do need to know how can I know the exact absolute datetime that corresponds to the first frame, since it has a pts of 0. Maybe I can use a time() function or GetSystemTime (I am using Windows) between two calls of the above, but do not really know how libav works. I will appreciate your help,</div>

<div><br></div><div>Kind regards,</div><div><br></div><div><span style="color:rgb(102,102,102)">--</span><br></div><div><font color="#666666">Dídac Pérez</font><div><br></div></div><br>