Is it possible to extract a Video Thumbnail using other frames than the first frame? Usually the first frame of a Video File is a black screen so I'm thinking its better to use other frame number or a frame anywhere in the middle of a video file that is not a black screen.
Take a look at ThumbnailUtils at this page:
http://developer.android.com/reference/android/media/ThumbnailUtils.html
That should help.
Related
I am trying to get the last frame from a video as a bitmap in good quality. I am now using MediaMetadataRetriever with the method getFrameAtTime, but the picture quality is very poor - see a similar post here.
I tried to use this method here:
https://bigflake.com/mediacodec/#ExtractMpegFramesTest but I cannot get it to work, the frames are all just horizontal lines
Also, another library that is very interesting: https://github.com/wseemann/FFmpegMediaMetadataRetriever
This one can get very good quality images from frames, but it only has at-second precision (for example if I try to get the last frame or a frame at 2300ms, it only shows corrupted image)
Are there any other options?
i am a beginner on android.
My question is simple, i need to capture a video frame from my device but i need to capture just a part of the entire camera view. For example, if my camera view display my frame on the entire screen i need to cut half frame to display.
I did this with opencv through image processing (image cropping) but i wanna know if this is possible also specifing the layout parameters. I need know if this is possible because i working with a video frame not with simple image and i need to ease the entire processing.
Thank you for all advices.
I'm currently working of a file explorer for Google Glass and I would like to display a still image for every video I take. They should be bigger than the thumbnails already provided in Android, so I'm guessing I should create them myself from a video.
I'd be grateful if someone could push me into the right diection as to how to find a still image of a video file.
Easy way: Use ThumbnailUtils.createVideoThumbnail(). This will return an image at most 512 * 384 (for MINI_KIND).
You can also do it manually, with MediaMetadataRetriever.getFrameAtTime(). This should return a bitmap with the same dimensions as the video file.
I want to make a small part of the image glow whenever the activity is loaded. Do I need to take the exact coordinates of the image part?
I recommend using a GIF. It can be loaded as an image and won't require any changes in your code. A smallish tutorial can be found in this Youtube video.
I am working on image animation. I have 200 transparent png images which I am trying to show one by one over a background image.
Can you tell me the best way to do it. The image should change in such a way that it should appear that a cartoon is running.
If you can tell me in steps, it will be great.
Have a look at animation frames: http://developer.android.com/guide/topics/resources/animation-resource.html#Frame
You can use animation-list to play them frame by frame
http://app-solut.com/blog/2011/05/playing-animations-in-android/
or create a GIF and play it
http://droid-blog.net/2011/10/14/tutorial-how-to-use-animated-gifs-in-android-part-1/
Gif is more lightweigt, but it gave me trouble once when played on some MDPI screen devices, where I had a single Gif file in the drawable-hdpi folder. So give it a try first..