jjzjj

ios - iOS 中的交互式视频 : Is it possible to trigger specific actions in code by tapping discrete parts in the video?

coder 2024-01-26 原文

我问这个是因为我无法在任何地方找到答案,至少使用我能想到的关键字是这样。 我找到的最相关的问题/答案是:( Create interactive videos in iPad - An app for product demo )。用户Jano 回复:

The easiest way to create interactive videos for iOS is to use Apple's HTTP Live Streaming technology. You have to create a video, embed metadata, play it using MPMoviePlayerController or AVPlayerItem, and then display clickable areas in response to metadata notifications.

Metadata should contain coordinates for the element you are tracking, eg: a dress, and a identifier for the product. You overlay this info with a clickable subview that reveals more information about the product. There are several applications of this kind in iTunes, here is one.

Once you get a working product and weeks-time of videos, the most difficult part is to perform motion tracking with the less possible human interaction. One approach is to use Adobe After Effects, another is to code your own solution based on OpenCV.

我找到的有关此技术的示例 (http://vimeo.com/16455248) 显示了当视频到达嵌入的元标记时自动添加 NSButtons。我的客户想要一个在特定时间暂停的人体互动视频(可能使用元标记)并对用户点击视频中的元素使用react(例如:想象胃里有一颗药丸;点击这个药丸后它会触发另一个预呈现的视频,以对用户不透明的方式)。想过用 Cocos2D 或 Open GL ES 做动画,但缺少掌握这些技术的人。

我不太理解上面引述中的“运动跟踪”引用。 Jano 提到了 Adob​​e After Effects 和 OpenCV。这种运动跟踪就像一个“UIGestureRecognizer”?它是否跟踪视频本身的部分内容或用户发起的 Action (如点击)?

我希望我已经以最清晰的形式公开了问题。提前谢谢你。

最佳答案

这个问题已有一年之久,但我可以让您深入了解 After Effects 问题。 AE 具有一项功能,您可以在其中定义视频帧中的区域,软件将在时间轴上跟踪该区域,以特定间隔记录坐标。例如,在一个人骑山地自行车的视频中,您可以选择他们 Helm 周围的一个区域,AE 将在整个时间轴上记录 Helm 的坐标。

由于 Flash 最有可能成为交互式视频的目标,典型的工作流程会将此坐标数据编码为 Flash 视频作为提示点事件(这是我亲 body 验过的唯一方法)。根据一些谷歌搜索,数据存储在关键帧中,可以使用脚本提取。

更多信息:http://helpx.adobe.com/after-effects/using/tracking-stabilizing-motion-cs5.html

这是一个 manual method for extracting the data :

In the timeline panel select the footage and press the U key, all track points keyframes will show up. Here’s the magic, select the Feature Center property of each track point and copy it (Cmd+C for Mac or Ctrl+C for PC)

Now open any text editor such as TextMate or Notepad and paste the data (Cmd+V for Mac or Ctrl+V for PC)

关于ios - iOS 中的交互式视频 : Is it possible to trigger specific actions in code by tapping discrete parts in the video?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14735808/

有关ios - iOS 中的交互式视频 : Is it possible to trigger specific actions in code by tapping discrete parts in the video?的更多相关文章

随机推荐