Does the SDK support #2x files for video - iphone

We are using the MPMoviePlayerController to control video playback, I just wanted to know (as I couldnt find any mention online) whether it took advantage of #2x files when displayed on iPod4/iPhone4, like the UIImage does

No, #2X it's only for UIimages.

It doesn't do it automatically like UIImage will. But you could always implement a system your self. Using a subclass, category or just in your current code before set what file is played by the movie player. So the code would be something like. If it has a retina display append #2x to the file path.

Related

How to save images in camera roll in iphone programmatically?

I am developing one application. In that I want to save my pictures in camera roll. So how to save my pictures in camera roll through code?
The most basic way (and the only way if you're targeting iOS before 4.0) is to use UIImageWriteToSavedPhotosAlbum. This lets you specify a selector to be called on a target object when the save is complete.
In 4.0, you can use ALAssetsLibrary's writeImageToSavedPhotosAlbum:orientation:completionBlock: to write the image; in this case, you provide a block to be called when the save is complete.
In 4.1, you can also use ALAssetsLibrary's writeImageDataToSavedPhotosAlbum:metadata:completionBlock: or writeImageToSavedPhotosAlbum:metadata:completionBlock: to write an image along with metadata (e.g. geotagging information). The former is also the only way to write an image from an NSData object without first loading it as a UIImage or CGImageRef.
See this blog post..UIImageWriteToSavedPhotosAlbum is your friend..

How to obtain m4v metadata using iOS SDK

Is there a way to access the metadata (such as width and height of the video) via iOS SDK for m4v inside the resource bundle? I would like to use this info to center the video around the screen bounds.
On a mac this would be easy, because you can utilise the spotlight metadata, but on iOS it's slightly more complicated. A couple of suggestions:
The easiest way to do this is just to load your movie into an MPMoviePlayerController and check the naturalSize property. There are a number of other properties including playableDuration. The downside to this is you have to load the movie into an MPMoviePlayerController, which may be fine for you if you're going to play the file straight away.
The harder but more efficient way is to use the open source libmediainfo library, but it's obviously more complex to integrate than using an MPMoviePlayerController 'out of the box'.

Record Camera from iPhone and use as overlay in another video

I know how to record a video from the camera on the iPhone, my question, is it possible to take the recording and overlay it on a saved video and save it out as another file?
No, I don't think so. Not using an standard framework. You could probably do something involving screen capture and combing a load of images to make a video. But it would be complicated.

Iphone - Load image from camera roll to UIImageView without UIImagepicker

Is it possible to load the last photo from camera roll to UIImageView without using a UIImagepicker?
I mean retrieve the path to the file or something like that.
Thankz :D
You should be able to do this by using the new AVFoundation framework. You may want to take a look at the WWDC 2010 session videos discussing the framework and the related source code.

Is there a way to get paths of all the images of CAmera roll

Is there any way to create an array or something
having paths of all the images stored in camera roll.
Please enlighten me on this.
Thnx in advance
SpyPhone uses a direct path to the users photo library:
http://github.com/nst/spyphone/
It seems that any application can read it. However, this seems like falls under the area of "undocumented API" and could well be rejected in a real application.
I don't think there is. As far as the API is concerned for the UIImagePickerController you can only get a single path for a Movie that was recorded by the user (if running 3.0 on a 3GS). And even that path is a file URL to the temporary folder where the movie is stored before being written to the library.
You can't get paths for any images in the photo library or the camera roll.
When you pick an image using the UIImagePickerController the controller returns the Original Image and an "Edited Image" if the image was edited before being chosen.