Live camera data access In iOS 4 - iphone

Prior to the release of the new SDK there has been some buzz about Apple finally providing access to live camera data:
I've been reading through Apple's documentation but have not found any reference to this. Now that the NDA has been lifted, does anyone know where this new functionality is documented?

This is thoroughly demonstrated in the WWDC 2010 session video 409: Using the Camera with AV Foundation. If you download the WWDC sample code, you'll find three or four sample applications that show how to use the various aspects of live camera capture and processing.
As Shaji points out, all of this is done through the AV Foundation framework using the new capture classes AVCaptureSession, AVCaptureInput, AVCaptureDevice, and AVCaptureOutput.

Have a look at the the AV Foundation framework specially the AVCapture* classes.

Related

iphone AVEditDemo or any video processing examples

I am trying to process videos in some way:
Cut and merge videos.
Record the screen and make the video out of that recording.
I look up on the Internet and stackoverflow as well and see that there is a code sample from apple called AVEditDemo but I could never find it out. If anybody has that example and willing to share with me or has any similar examples that can teach me how to do the 2 above jobs, it would be excellent.
I see there are some similar questions like this one, but I would love to have the code sample. It would help me move forward quickly.
There is a WWDC 2010 video called Editing Media with AV Foundation which may be useful to you and is available through the Developer Portal.
The AVEditDemo application is included in the WWDC 2010 Sample Code because it goes with the video. This should contain the AVEditDemo Application which goes with the Video. Unfortunately you need to download all the WWDC 2010 Sample Code to get it (232.6mb). You can get the entire download of all the code here: http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?code=y&source=x&bundleID=20645

Can I record videos on iPhone 3G using AVFoundation?

Is it possible to record video on iphone 3g with ios 4.1 using AVFoundation?
I m able to record audio and can pick still image using AVFoundation but not able to record video.
If you see the AVFoundation reference documentation its stated that
You should typically use the
highest-level abstraction available
that allows you to perform the tasks
you want. For example:
If you simply want to play movies, you can use the Media Player
Framework (MPMoviePlayerController or
MPMoviePlayerViewController), or for
web-based media you could use a
UIWebView object.
To record video when you need only minimal control over format, use the
UIKit framework
(UIImagePickerController).
As long as a device has a camera, you should be able to record using AVFoundation, check out the AVCam demo code from WWDC 2010 to see how you can do that.

iOS Raw Video Capture - Where to start?

It's easy enough to use the system-supplied user interfaces for taking pictures and movies on supported iOS devices. How do I do raw video capture and manipulation in iOS 3 and iOS 4? I'm looking for the names of the relevant classes and methods, and possibly a tutorial or reference from Apple...
You can look at these place
AVCam sample
How to Play, Record, and Edit Videos in iOS
Audio & Video Starting Point
AVCaptureSession preference
Wrapper library by Andrew
If you're looking for tuts, there are a lot here.
There good start from Apple with a lots of links that can help. See Audio & Video Starting Point.
You can't do raw video capture on iOS anymore (there used to be hack for iOS3, but now that's it's official in iOS4, they disallowed the hack).
And on iOS 4 - I believe this is the best start:
http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html
(Read a little, then browse to Processing Frames of Video)
Cheers,
Oded.

How can I cut videos from multiple videos and merge them in iPhone programmatically

I have a requirement where I need to cut the video between some selected time frames from different videos and merge them to make those a single video. How can I achieve this in iPhone programmatically. Are there any API's available?
I didnt use them my self but yes there are available APIs to help you do this.
Have a look at AV Foundation programming guideline
I also recommend you to check the WWDC 2010 video session "Editing media with AV Foundation"
Cheers

MPMoviePlayerController alternatives on iPhone?

I am looking for alternatives to the MPMoviePlayerController on the iPhone. As a video player its functionality is very limited. According to the class reference there is no way to get the current play back time or set a new time, for example. It's just play and stop.
Are there any middleware solutions out there for iPhone video playback that offer more functionality? CRI has something in development but it has not been released. I haven't been able to find anything else.
Thanks.
Keep in mind that even though a project is GPL, that does not mean you can't contact the author's about an LGPL option on the underlying code.
A possible roll your own solution would be to use openGL as a compositing surface for the video and obtain a behind the scenes library like ffmpeg if you need to process specific video types.
NeHe has an example of rendering AVI's to openGL: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=35
FFMpeg has recently been ported to iPhone and is an LGPL based product: http://geek.thinkunique.org/2008/03/05/ffmpeg-on-the-iphone/
(Note: There is some debate over the commercial use of LGPL on iPhone because the license references the phrase "dynamic" when referring to library linkage, which iPhone doesn't allow. I have not seen any project teams balk at their code being used on the iPhone statically, but you should contact the authors directly for clarification.)
Another (though GPL) version of an OpenGL video player is: http://code.google.com/p/glover/
What your getting through a solution like this is basically a bypass on the iPhone/Mac/CALayer specific technical details and leveraging an existing knowledge base of video through OpenGL which although not extensive, is still broadly supported.
If you are dealing with a specific video style, then you may want to see if a library is avaiable for the specific video format direct from the vendor instead of using a multi-purpose tool like FFMpeg. Once you have the compositing working, the video can come from most any library.
Barney
You could use AVPlayer. See the documentation
You can then get the current playback time with currentTime and seek to a specified time with seekToTime:.
You have to direct the visual output of an AVPlayer instance to an AVPlayerLayer object (subclass of CALayer). See the first listing here.
VLC has been ported to iPhone but not using the official SDK.