I want to save the first and last frames of a video as images.
Is there any way to do this?
You can take a look at the MediaMetadataRetriever class.
MediaMetadataRetriever
In particular, the getFrameAtTime(long) method.
getFrameAtTime(long)
To get the time of the last frame, use getDuration() , which will return the duration of the video.
getDuration()
Note. Accessible from API Level 10!
You can use the MediaMetadataRetriever class.
And the getFrameAtTime(timeUs) method. timeUs is in microseconds.
getFrameAtTime(timeUs)
Source: https://habr.com/ru/post/1386055/More articles:Best Practices for Keeping a Permanent Socket Open to the Server for an iOS Application - iosMerge two paragraph objects - javaDoing work on Amazon ec2: multi node - amazon-ec2Rewrite Rule to redirect the entire website except one route - .htaccessNSURL is null and NSString in Objective-C is iosDjango caching error or reload - djangoChanging java keystore password - javadjango-haystack - Updating an index after adding a new field to the index causing the error - djangoCross-platform 3d engine for embedding in iOS / Android-View? - androidHaystack error in Django + error - pythonAll Articles