在 iPhone 中捕捉视频和图像
我正在使用 ImagePickerController 进行视频捕获。我还需要将捕获视频保存为图像。
所以我选择了 AVCaptureSession 来捕获图像。我无法运行 AVCaptureSession 以及 ImagePickerController。所以我需要将 ImagePickerController 作为 AVCaptureSession 的输入。
但我不知道该怎么做。请帮助我..并建议我正确的方法。
I am using ImagePickerController for Video Capturing. I need to save the capturing video as image also.
So I selected AVCaptureSession for capturing Images. I'm not able to run AVCaptureSession as well as ImagePickerController. So I need to give the ImagePickerController as input to the AVCaptureSession.
But I don't know how to do that. Please Help me.. and suggest me for the right way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我只找到这两个。希望它有帮助。
http://www.iphonedevsdk。 com/forum/iphone-sdk-development/24025-uiimagepickercontroller-videorecording-iphone-3gs.html
UIImagePickerController:从视频中获取图像
I found only these two. Hope its helps.
http://www.iphonedevsdk.com/forum/iphone-sdk-development/24025-uiimagepickercontroller-videorecording-iphone-3gs.html
UIImagePickerController: Getting image capture from video
我遇到了同样的问题..我确实对图像和视频进行了处理,并使用下面的代码进行图像捕获:
对于视频录制,我使用了下面的代码:
希望会对您有所帮助。
I was having same issue.. I did work on image and video and used below code for image capturing:
And for video recording i used below code:
Hope will help you both code snippets.
与 AVFoundation 相关的 Apple 文档和示例代码有几个错误。请参阅 iOS 4:使用 AVFoundation 拍摄实时预览照片,了解实际从实时预览。
The Apple docs and sample code related to AVFoundation has several mistakes. See iOS 4: Take photos with live preview using AVFoundation for code that actually captures images from a live preview.