Hi Nvidia,
Hope you are doing well. I’m encoding h264 video on a Jetson Tx2 and noticing the last 2-3 frames of each video are missing. I know its the last three frames because I burned frame numbers into each video, and its always the last few (confirmed with ffprobe). Clearly this has to do with how the encoder is being destructed and cleaned up, which currently includes the following steps:
- encoder_->output_plane.setStreamStatus(false);
encoder_->capture_plane.setStreamStatus(false);
if (is_multithreaded_)
{
auto ret = encoder_->capture_plane.waitForDQThread(10000);
} - close(out_file_fd_);
- encoder_->abort();
Is there something wrong with the way I am finishing writing to disk? What order or steps do I need to do to safely write all remaining frames in the output plane to capture plane and finally to disk?
PS: If my video is 150 frames, after step 1 capture plane reports I have 0 data in the capture plane, 153 total queues, and 147 total dequeues.