Description
Tried to build the av module from source and tested the devicerecorder sample using ubuntu 18.04 and ffmpeg 3.4.6
The audio recording seems to be fine but there is no video due to the next pts being calculated as Invalid all the time in the updateStreamPts ()
if (next < _pts) {
LWarn("Invalid pts (", next ,") <= last (", _pts, ")")
return false;
}
else if (next == _pts) {
LWarn("Dropping frame at duplicate PTS: ", next)
return false;
}
Due to this the data is not passed to the video encoder
if (!updateStreamPts(_video->stream, &time)) {
return false; // duplicate PTS
}
Similar issue has been raised previously
#241
Where its been suggested to remove the realtime pts calculation as the av_read_frame() sets up the pts.
I have tried to comment out that line in the mediacapture.cpp but still I am getting the invalid pts and there is no video recording.
if (_realtime) {
// ipacket.pts = time::hrtime() - startTime;
}
Any ideas why is this occurring, the only difference I can see is that I am using a newer version of ffmpeg 3.4.6 compared to 3.0 as in #241