iOS Raw Video Capture - Where to start? - iphone

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.

Related

Does iphone support QuickTime VR?

I have a 10MB QuickTime VR file and I was wondering if it would be possible to play it on an iPod/iPhone/iPad?
I've seen multiple messages about the subject around but nobody could give a straight answer if the iPhone fully support this format, partly support the format or doesn't support the format at all. If this format is supported, which OS version supports it?
Nope, I don't have an iPhone at my disposal to check this, unbelievable right?
Gilad.
It's not possible to use QTVR at all, it's never been developed by apple on iPhone
but there are some other similar object you can use.
take a look at my old answer to a similar:
How to rotate QTVR image 360 degree in iPhone?
There's an app called iPano which views QTVRs, both panoramas and objects. It's ideal for viewing them and it let's you keep a collection of them on your phone. And it's really neat on the iPad too!

How to record videos from an iphone App

Does anyone know how to record videos from an iphone app without making it to close..
it would be greatly helpful, if any one provides the sample code...
Maybe you can see the Apple note:
How to capture video frames from the camera as images using AV Foundation

iPhone SDK: Is it possible to process audio file from local library

Well, I will try best not to make it as a 'I just want the code' question...
I'm recently working on a project which requires some audio signal processing from local music files (e.g. iTunes Library). The whole work includes:
Get the PCM data of an audio file (normally from iTunes library); <--AudioQueue (?)
Write the PCM data to a new file (it seems that Apple does not allow direct modification on music tracks); <--CoreAudio(?)
Do some processing and modification, like filters, manipulators, etc. <-- Will be developed in C++
Play the processed track. <--RemoteIO
The problem is, after going through some blogs and discussions:
http://lists.apple.com/archives/coreaudio-api/2009/Aug/msg00100.html, http://atastypixel.com/blog/using-remoteio-audio-unit/
http://osdir.com/ml/coreaudio-api/2009-08/msg00093.html
as well as the official sample codes, I got a feeling that the CoreAudio SDK allow us to apply audio processing only on voice demos recorded from Mic.
My question is that:
Can I get raw data from iTunes library tracks instead of Mic input?
If the first question is 'No', is there a way to 'fool' the SDK to let it think it is getting data from Mic input, not from iTunes? (I have done some similar 'hacking' stuff in C# before XD)
If the whole processing just doesn't work, can anyone provide some alternative ideas?
Any help will be appreciated. Thank you very much :-)
Thanks.
Just found something really cool yesterday.
From iPhone Media Library to PCM Samples in Dozens of Confounding, Potentially Lossy Steps
(http://www.subfurther.com/blog/?p=1103
And also a class library by MIT:
TSLibraryImport: Objective-C class + sample code for importing files from user's iPod Library in iOS4.
(http://bitbucket.org/artgillespie/tslibraryimport/changeset/a81838f8c78a
Hope they help!
Cheers,
Manca
1) No. Apple does not allow direct access to PCM data of songs. Otherwise you could create music-sharing apps, which is not in Apple's interests.
2) No. Hacking and getting approved is impossible due to Apple's code approval mechanism.
3) The only alternative I could think of is that you have to do the processing part on PC/Mac and then transfer it to the iPhone. Or you would have to store the files in your own applications folder - you should be able to load and process these via CoreAudio.
I know this thread is old but... did this work for you, Manca? And did this app get approved?
EDIT: just discovered the AVAssetReader class, introduced since iOS 4.1, should help

Getting duration of video taken by camera iphone sdk

I am trying to get the duration of a video taken with the camera using UIImagePickerController on the iphone, has anyone found a solution to this?
Thanks
Daniel
You can now do this using AVFoundation you can make your movie into an AVAsset and then check the duration property
Oh, why, hello hopelessly obsolete answer. I'm afraid you're only left here as historical evidence that yes, before iOS 4 if you wanted to do anything remotely interesting on a recorded video (besides playing it) you had to implement the processing yourself.
I don't know of any framework function to do so, so I'm afraid you'll have to parse the video container yourself (which by the way, is QuickTime/.mov) to extract this info. It's not like it's not documented. Luckily since the provider is known, you can trust all info to be truthful, which you can't assume of random videos found on the web.

iPhone AVAudioRecorder Guide?

Can anyone point me to a tutorial or discussion that provides a clear-cut, full explanation of how to use the AVAudioRecorder method of recording audio in iPhone apps? Although I'm new to iPhone programming in general, I do have a basic understanding and yet all my attempts to use AVAudioRecorder have failed miserable. Much appreciated!
Sample code and documentation can be found here. You can fill in the blanks with searches here on StackOverflow. If you haven't started with Audio, it's best to look at the Apple docs and example code first. Then have a look at other sources. This is where a good book on iPhone development comes in.
To use AVAudioRecorder you first need to enable the AVAudioSession and init and start AVAudioRecorder, here's my example of how to set everything up and measure the level of "loudness" for instance http://www.mikitamanko.com/blog/2017/04/15/swift-how-to-get-decibels/