Open tjsm-dev opened 1 year ago
Don't call getLengthInVideoFrames(), it's an approximation that may not always be accurate.
Don't call getLengthInVideoFrames(), it's an approximation that may not always be accurate.
Thanks for your kind reply. Can you recommend an exact iteration method for extracting the whole frame?
grabImage() returns null at the end of the stream.
I see, you're saying that MediaCodec doesn't do that reliability. That's a problem with FFmpeg or Android, so we'll need to report that upstream, unless @tmm1 has an idea?
Also, please try with the snapshots since maybe that has already been fixed somewhere: http://bytedeco.org/builds/
Also, please try with the snapshots since maybe that has already been fixed somewhere: http://bytedeco.org/builds/
Thanks, I tried with the version you provided: '1.5.8-SNAPSHOT', but the result was the same as 1.5.7.
[Environment] JavaCV: 1.5.7 OS: Android 30 Device: LG V50(LM-V500N)
[What i'm trying to do]
[Description of the problem situation] My program works fine when I use software codecs. I got the same result N times(93 frames were extracted from the reference video).
When the program is executed after writing the code to use the hardware codec, the first execution is extracted with the same number of frames as when using the software codec.
But FFmpegFrameGrabber.grab() occasionally skipped(returned null) sometimes. As a result, the total number of frames is different each time. 1st: 93 frames 2nd: 91 frames 3rd: 88 frames ...
[Video extraction code]
[Solutions I tried but failed]
Is there any other way I can try?