The AVCam sample code isn't flexible enough to do what you want. You need to use AVAssetWriter to write out the media. I'm not 100% sure on the uncompressed audio bit but the VideoSnake sample code from WWDC 2012 session 520 is a great place to start with AVAssetWriter. I can't speak to performance but you could have 2 AVAssetWriters for video and audio, just modify that code to vend the samplebuffers to the appropriate writer.
IOS: Is it possible to record compressed video and uncompressed audio simultaneously
-
01-06-2022 - |
문제
I'm writing an IOS-App which should record video, using front camera, and audio of the user working with the app. Later I want to analyse the user behavior offline. This App should run on an iPad 3.
Remark: The observed users will be people form my office. Code & data is only needed for the development process and won't be included in the final APP.
My requirements: Video and audio should be uncompressed, at least audio must be uncompressed. I think uncompressed video recording without skipping frames is not possible on an iPad (See: where can i find an uncompressed video recording from iPhone 3G/3GS/4 ), but uncompressed audio is possible.
Here are my questions:
- Is it possible to record a video (compressed) and audio (uncompressed / kAudioFormatLinearPCM) simultaneously?
- Is it possible to save video and audio in seperate files?
- If one of the two questions is YES then what should I do in AVCam-Example http://developer.apple.com/library/ios/#samplecode/AVCam/Introduction/Intro.html to solve my problems :-)
Thank you all in advance!
해결책
제휴하지 않습니다 StackOverflow