Open ggslayer opened 1 year ago
You may try this count technique
AVPacket pkt;
int videoFrameNumber = 0;
int vsInd = grabber.getVideoStream();
while ((pkt=grabber.grabPacket())!=null) {
if (pkt.stream_index() == vsInd) videoFrameNumber++;
}
thank you, I will try it
Hi, I'm using FFMpegFrameGrabber to a mp4 file , I use getLengthInvideoFrame after start method, and I get 2108 frames, But when I grab every video frames, totally only 2107 frames, the getLengthInvideoFrame returned is not the real frame count, How can I get the accurately frame count beore grab one by one? Thank you