I am working on an app that involves some video editting, and I’m using the MediaMetadataRetriever to handle the video and the getFrameAtIndex(index)
to retrieve the individual frames. However, this method for some reason runs upwards of 1200ms per frame.
val time = measureTimeMillis {
retriever.getFrameAtIndex(i)
}
println("frame=$i, time=$time")
output:
frame=0, time=1224
frame=1, time=1577
frame=2, time=1241
frame=3, time=1326
frame=4, time=1289
frame=5, time=1319
frame=6, time=1549
frame=7, time=1391
frame=8, time=1250
frame=9, time=1431
frame=10, time=1298
Any explaination to this? From googling around, I learned that the getFrameAtTime
is even slower, so Im not sure that’s an option