Video creation from series of images? - android

How to create the video from series of png images. Is it possible in android can any body suggest me to do that?

yes its possible to generate a video (not exactly video, but like video) through the series of images.There is what you call "mpeg stream" which consists of the JPEG images in the multipart fashion that you read from a source (remote basically) and continuously updating the UI on the screen by parsing it nad fetching the binary content and converting it to objects of bitmap.If you are having the images locally, you can simply instanciate the bitmap objects and the place them periodically on the UI / ImageView on screen.What you needs to care about is that the updating frequency should be such that user sees it like a video is playing.If you have to make a short period video (some animation kinda video) with the help of the already made frames/images, you can follow the linkhttp://android-support-akkilis.blogspot.com/2011/12/animation-drawbles-in-android.html Hope this helps

Related

Parse, use Cloud Code to only send the first frame of gifs

Currently, I'm downloading a list of ParseObjects that have a URL, which I then use to load gifs over the network into my list items. This is obviously quite slow for a list, and even using Glide and only displaying the first frame, it still takes several seconds to display anything into the view.
What I'd like to do, is write some custom Cloud Code to only send the client the first frame of the gif and use that as a preview to display in the list, then download the actual gif when the preview is clicked on. Obviously I would have to have the gifs uploaded as a ParseFile instead of just a URL but that isnt the issue.
Could this be done? If so, how?

How to display preview thumbnail while scrubbing the video.

I am trying to display the preview thumbnail when user move his finger over video scrubber.
The only solution I m finding is to extract thumbnails using some 3rd party tool and save it to server or pass it to app via some JSON.
What I m trying to do is something similar to JwPlayer (http://jwplayer.electroteque.org/controls-preview)
Any idea where to start?
Or is here any standard protocol that support manual generated thumbnails? Or i need to go with my own feed format.
I don't quite know what the configuration of your project is, but one possibility is too actually instantiate a mini player and display the progress of the video as the user the slides. So essentially this "mini player" would appear when the user begins drag, and skip to whatever time is specified, and pause. It is similar to a project I am working on now. This is a great reference as well: http://www.autodeskresearch.com/pdf/p1159-matejka.pdf. This technique is much different then the one I suggested, but is another alternative depending on your scenario.

Show blurred thumbnail before downloading the whole image (like in Whatsapp)?

I am trying to get the same nice UI effect guys at Whatsapp did. Each time I receive some image, not matter of its size, I can see blurred thumbnail in a matter of 1 sec, and over it an indicator that the real image is being downloaded.
How do they do this? I want to achieve the same effect when users download images from our server. I am not sure if they are doing some server-side image processing, or there is a built-in feature in Android SDK which can do this.
Let's say a user requests an image of 4MB. Almost instantly he clicks download, a blurred thumbnail of the image will appear over the screen and download status indicator over it. I am mainly interested how to get image preview so quickly, literally in a matter of 1 sec (feels like being instantly).
PS. Similar effect has StackOverflow when you try to upload an image. When you drag it to the upload popup, you see its preview almost instantly. I guess Stackoverflow does this by using client side scripting, which we cannot apply in Android app. But this is a good showcase of what I need (in case you don't use Whatsapp).
Basically what is happening in these situations is you need to request a blurred thumbnail from the server (Usually very small so it downloads quickly), and then begin the download of the full image. This is something that has to be done by the server.
Update:
You can now use a technology like progressive jpeg to achieve the same effect without having your server store two separate images. Progressive jpegs basically encode a very low quality image in the first bytes of an image, and then as the image continues to load the quality improves. This may not be the exact effect you are looking for, but it should be able to show a quick low quality preview while loading in the full sized image. Currently the only way to load these on Android is with Facebook's Fresco library.
I have another theory. I think the method used here is that before publishing the message, they have some algorithm to generate a lightweight fuzzy low-quality picture (in the sender) and then send the contents of that array (a few bytes as a byte[] array maybe) along the published message .. now once the receiver receives the message, he can instantly display that fuzzy image and get the full image by doing a full request to the server .. What makes me think this is that if they are going to request the thumbnail from the server then why not have a detailed thumbnail ? it can be small in size as well .. why have a fuzzy thumbnail that is only a mere shallow representation of the original one and not complete like thumbnails we see in the web.
I believe that there are two part in this process
First is message part which is loaded from api server which will have text contents of the message and very small/blurred image (Base64 encoded string of the image) with url to actual video. example
{message:"Hi this is my video uploaded..", thumbnail:"..base64 string of image", url:"...url to video file with key or without"}
Second is Media part which starts when user click on download button after seeing the preview image from url served with message.
While uploading the message we can also so the same thing either we
generate thumbnail/blurred image and submit the message in two part
First upload message with thumbnail to api server and get key for media server
Submit video to media server with key provided by api server.
Or
First upload message to api server and get key for media server
Submit video to media server with key provided by api server and let
server generate thumbnail for video.
Here i believe that we are running two separate server one for handling static contents and another for api calls.
Hope you all agree with me or suggest any correction.

The Best Way To Load Multiple Large Image in a GridView

My Problem deals with Memory, I have a Web service that provide me a List of Urls. Each URL corresponds to a large image. My Mobile app have to parse the xml provided by the web service and than show in a GridView these images. I tried several features in order to display images such as:
Multithreading
Lazy Loading
Reduce image size using inSampleSize ( this causes my app takes too long)
should i have to attach for each large image a thumbnail image, and make the web service return to me the list of all thumbnails, after that show these thumbnail to the user, and if he clicks on one of them than i have to show the large image in a separate view, i have this idea because i noticed when i show one image i don't get an outofMemory exception!!
Is this a reliable solution? is there a better way?
Welcome to one of the hardest issues on Android. First I would start by reading this new documentation google wrote on how to handle bitmaps. Its not a light read, but you probably need to read it all the way through. It has only been up for a few weeks so you may not have seen it. It details many of the things you mentioned such as multithreading, lazy loading, and down sampling. They also recommend using an image cache.
Downloading the large images for each image and then down sampling is going to be very inefficient. First the download size is larger than needed. Second you need to load it into memory to perform the down sample and third down sampling is somewhat slow.
I would have the web api return you a list of thumbnail urls and full image urls that you can lazy download as the view comes on screen and use the cache to keep them around a while. Make sure you down sample the sizes of the thumbnails as well. I would then when the user clicks on an image go download the full image and on the background when it arrives down sample it before displaying it.

creating Video from Android screen activities

In my app I have a requirement to create a video from the screen activities programatically. (ie: I am running some animations for some time I need to convert these animations to a video, like video demos.)
I have been searching for this for the last week, but I haven't found any solution. I don't know whether it is possible in Android or not. If it is, please tell me the way or suggest me some links.
If you want to capture the screenshots from "within your activity", it is possible. Follow this post
Having grabbed the screenshoton a bitmap, you need to encode the frames to a video yourself.
Captured bitmap --> JNI (Native-bitmap) --> feed input buffer to a native encoder (ffmpeg) --> save to file
This project will meet your request Android-MJPEG-Video-Capture-FFMPEG
It is just to convert jpegs into a movie file by ffmpeg bin

Categories

Resources