I'm trying to make an Stop-motion movie creator over Android. I'd like to decode a movie file (mpg, avi, mp4...) and play only some frames (not all). Painting it periodically over a Canvas.
Is there an easy way of doing this?
I'd like to decode a movie file (mpg, avi, mp4...) and play only some frames (not all).
Android does not really support this offcially. You may end up using the NDK, using third-party video codec library, like ffmpeg to decode a frame.
EDIT : It turns out that Android supports this after-all
getFrameAtTime()
Call this method after setDataSource(). This method finds a representative frame close to the given time position by considering the given option if possible, and returns it as a bitmap. This is useful for generating a thumbnail for an input data source or just obtain and display a frame at the given time position.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With