Recording Audio and Video using AVFoundation frame by frame

后端 未结 2 1040
眼角桃花
眼角桃花 2020-12-16 05:49

How to record audio and video using AVFoundation frame by frame in iOS4?

相关标签:
2条回答
  • 2020-12-16 06:16

    If you are a registered developer, look at the videos from the 2011 WWDC (which you can find by searching in the developer portal). There are two sessions relating to AVFoundation. There was also some sample code from one of the WWDC sessions, which was extremely useful.

    0 讨论(0)
  • 2020-12-16 06:28

    The AVCamDemo you mention is close to what you need to do and should be able to use that as reference, among those these are the following classes you need to use in order to achive what you are trying... All the classes are part of AVFoundation, you need

    • AVCaptureVideoDataOutput and AVCaptutureAudioDataOutput - use these classes to get raw samples from the video camera and the microphone

    • Use AVAssetWriter and AVAssetWriterInput in order to encode the raw samples into a file - the following sample mac OS X project shows how to use these classes (the sample should work for ios too), however they use an AVAssetReader for input (it reencodes a movie file) instead of the Camera and microphone... You can use the outputs mentioned above as the input in your case to write what you want

    That should be all you need in order to achieve what you want to do...

    Heres a link showing how to use VideoDataOutput

    Hope it helps

    0 讨论(0)
提交回复
热议问题