what are the animation formats supported by iphone? - iphone

i have an flash based animation.but since iphone doesnt support flash.which format can i convert it to other than gif? (gif doesnt support audio)

You may not be able to directly convert it but check out Raphael for javascript / vector animation. It's great! It works on any modern browser including iPhone.
http://raphaeljs.com/
Not sure about the sound part though.

Related

Convert video to GIF

I'm building an iOS app which requires me to allow the users to record a 15sec clip (with UIImagePickerController for example) and then convert it into an animated GIF. How could I achieve this? Is there any library/framework available for such task?
Thanks!
This gist code piece may help you.
https://gist.github.com/mayoff/4969104
It shows how to export frames into a gif image.
I don't believe there is any existing library that would do a straight conversion for you. There's a lot of libraries for displaying animated GIFs - far fewer native Objective-C libraries for creating them.
Fortunately, iOS does have support for saving as GIFs. There's an existing StackOverflow answer that covers how to create animated GIFs in-depth here:
Create and and export an animated gif via iOS?
...there's also a library on GitHub that abstracts the lower-level stuff away, although it's not been maintained for a while (link here).
All you'll need to do is create an array of the frames you want to convert into your GIF. I strongly recommend you don't try and convert every single frame in your 15 second video, if only because you'll end up with a very large GIF at a frame-rate that's too high. You would be better off picking every other, or even every 3/4 frames from your video sample. Capturing images from video is also pretty well documented on iOS.
I recently created a library called Regift for converting videos to gifs on iOS. Hopefully it will help anyone coming to this in the future :)

Which formats can I use for animated 3D objects

.. in order to use in augmented reality application on iphone?
I have an app working like that; camera detects the marker and then it places an object related to that marker. However the object is not animated. It stands there. Of course i can move the object programmatically but i don't want to do that. What i want is the object has animation itself. I searched but i can't find exact file format. There are .obj files (not animated itself, is it true?), .mtl files, .anm files .etc. If the format is one of them, then can you give me an example model?
Thanks
Definitely MD2 is your best choice. I have integrated jPCT-AE and Vuforia and it works like a charm. AFAIK MD2 is best for animated models mainly because it can store the key-frame animation in itself and you can have any kind of animation with it at almost no cost.
Here is a test video:
http://youtu.be/chsHh0pEhzw
If you have more question do not hesitate ;)
You should specify what AR SDK/platform you are using to create the iPhone application you are talking about. That being said, for many of the common AR SDK available the MD2 format is often used to display animated models (either with a built in render engine or with example code that shows how to use the MD2 format with that SDK):
http://en.wikipedia.org/wiki/MD2_(file_format)
http://www.junaio.com/develop/docs/documenation/general/3dmodels/
OBJ (Wavefront) files do not support animation.

what is difference between AVCapture and camera default of iPhone

my app use AVCapture for capture image, this is my supervisor's ideal. But i research in internet and a can't get any information about the difference between AVCapture and default camera of iPhone or iPop (tab focus or camera quality...). please tell me what advance of AVFoundation framework ...
with the AVCaptureSession you can give your recorder a lot more functionality. You can customize nearly every aspect of the recording session. and you can ever get the raw data straight from the camera. the code can get quite complex however, and nothing is taken care of for you.
With the iOS default image capture controller you will be stuck with a few presets, and you will only have a little bit of camera functionality. But it is really simple to implement.
updated with link to apple code
If you want to see how to use the AVFoundation to do you camera recording you will probably like this app from apple.
Like I said, you will have to do everything manually. so be prepared for a handful of work.
AVCam demo app by Apple

Animations for ipad/iphone

I am trying to make an app for ipad/iphone with a lot of animations.
There is anyway to make an app in objective-c with animations in other languages and interligate them???
because i have a lot of skills in languages like after effects/illustrator/flash/etc, for that, will be better to me to make the animations in that technologies..
Thanks
If you can export your animations into an HTML5 format, you can certainly display them in a UIWebView. There are a few Flash-to-HTML5 projects available out there now, and new apps like Hype and Purple that can be used to create HTML5 animations "from scratch."
The most simple way to do this is to create the videos in whatever tools and then export to a series of PNG images or use ffmpeg to convert flash or whatever to a series of images. Then display these PNG images one at a time (and don't load them all or you will use up all app memory). If you can deal with a more lossy format, then h.264 can save a lot of space at the cost of a significantly reduced 4:2:0 YUV type colorspace. If you need lossless video or require an alpha channel, or you want to save a lot of space as compared to the PNG method then you should take a look at AVAnimator. Note that you should not integrate any ffmpeg related code into your iOS due to license issues having to do with static linking of LGPL code.

How to capture a motion in iphone camera

In My application as the user opens the camera, camera should capture a image as soon as there is a difference in image when compared to previous image and camera should always be in capturing mode.
This should be done automatically without any user interaction.Please Help me out as i couldn't find the solution asap.
Thanks,
ravi
I don't think the iPhone camera can do what you want.
It sounds like your doing a type of motion detection by comparing two snapshots taken at different times and seeing if something has changed between the older and the newer image. To that you need:
I don't think the iPhone can do what you want. The camera is not setup to automatically take photos and I don't think the hardware can support the level of processing needed to compare two images in enough detail to detect motion.
Hmmmm, in thinking about it, you might be able to detect motion by somehow measuring the frame differentials in the compression of video. All the video codecs save space by only registering the parts of the video that change from frame-to-frame. So, a large change in the saved data would indicate a large change in the environment.
I have no idea how to go about doing that but it might give you a starting point.
You could try using opencv for motion detection based on differences between captured frames but I'm not sure if the iPhone API allows reading multiple frames from the camera.
Look for motempl.c in the opencv distribution.
You can do a screenshot to automatically capture the image, using the UIGetScreenImage function.