Hi, I have put together a code that takes data from FFmpeg encoded h264 packets and sends it to RTSP server. With VLC (3.0.8), I am able to view the frames fine but noticed the time stays at "00:00" in the seek bar. I tried defining videoFrame.timestamp with both definitions under xop::H264Source::GetTimestamp():
Hi, I have put together a code that takes data from FFmpeg encoded h264 packets and sends it to RTSP server. With VLC (3.0.8), I am able to view the frames fine but noticed the time stays at "00:00" in the seek bar. I tried defining
videoFrame.timestamp
with both definitions underxop::H264Source::GetTimestamp()
:auto time_point = chrono::time_point_cast<chrono::microseconds>(chrono::steady_clock::now());
return (uint32_t)((time_point.time_since_epoch().count() + 500) / 1000 * 90 );
and
struct timeval tv = {0};
gettimeofday(&tv, NULL);
uint32_t ts = ((tv.tv_sec*1000)+((tv.tv_usec+500)/1000))*90; // 90: _clockRate/1000;
return ts;
Appreciate any pointers on what might be causing this issue and how to fix it. Thanks.