iPhone 使用 UIImagePickerController 从视频中捕获选择性帧
我想使用 UiImagePicker 录制视频,然后让用户使用 UiImagePicker 中内置的滚动视图浏览帧,并选择一些用户感兴趣的帧。
我知道我可以在 uiimagepicker 顶部覆盖一个控件来触发选择
我不确定的是我是否可以通过编程访问 UIImagePicker 显示的当前帧以便从中提取图像。
请告诉我这是否可行/可能。
还有其他省时/优雅的方法来实现上述目标吗?
我通过自己的视图创建了视频录制和帧选择(使用 AVCaptureSession、AVCaptureVideoDataOutput),但需要花费我相当多的时间来完善它,使其看起来像 UIImagePicker 一样,而且每个人都熟悉 iPhone 中的默认相机应用程序。
我希望我想要实现的目标是有意义的。
我知道可以通过截取屏幕截图来实现这一目标,但我只想用户单击一个按钮来捕获当前的显示帧。
谢谢
I wanted to use the UiImagePicker to record a video then let the user browse the frames using the scrollview built in the UiImagePicker and while at it, select a few frames that interest the user.
I know I can overlay a control on top of the uiimagepicker to trigger the selection
What I am not sure about is whether I have programatic access to the current frame shown by the UIImagePicker for me to extract an image out of it.
Please let me know if this is doable/possible.
Are there any other time efficient/elegant ways to achieving the above?
I had created by own view with video recording and frame selection (using AVCaptureSession, AVCaptureVideoDataOutput) but would take me quite a bit of time to polish it to make it look good like UIImagePicker plus everyone is familiar with the default camera app in the iPhone.
I hope it makes sense what I want to achieve.
I know one can kind of achieve the goal by taken a screenshot of the screen but I just want the user to click one button to capture the current show frame.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
屏幕截图方法不适用于视频录制中的冻结帧。
使用基于自定义 AVFoundation 的帧捕获。
Screenshot method did not work for frozen frame from the video recording.
Went with a custom AVFoundation based frame capture.