如何播放单个 NetStream 但在不同的视频对象上显示它的不同部分?
我的 3D 视频在每一帧上并排编码了每只眼睛的内容。我想做的是将左半部分放在右半部分上。 (然后我将更改颜色和叠加,以便佩戴蓝青色 3D 眼镜的人可以观看视频)。
我尝试将单个 NetStream 附加到两个视频对象并偏移它们,但这只能让流在一个对象上播放。
有什么建议吗?
I have 3D videos encoded with each eye's content side-by-side on each frame. What I want to do is take the left-half and over-lay it on the right-half. (I'll then change with the colors and the overlaying so that someone with blue-cyan 3D glasses can view the video).
I tried to attach a single NetStream to two video objects and offset them, but that only let the stream play on one object.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于 流 根据定义或多或少是连续的小数据流,而不是固定长度的对象,您永远不能同时访问 NetStream 的两个不同位置。您可以尝试在帧与帧之间的位置之间“跳跃”,产生一种“快门”效果,但这可能效果不佳。
但是,您可以让视频对象共享相同的 NetConnection,并让两个 NetStream 实例加载同一部电影,或者您可以在两个单独的 FLV 中同时播放左眼和右眼的内容。不过,您必须注意同步,并且可能会出现轻微的不一致。
如果您的目标是 Flash Player 10.1 或更高版本,则可以将两个 FLV 作为 byteArray 加载到内存中,然后使用 NetStream.appendBytes 播放它们。这应该可以解决同步问题。
Since a stream is by definition a more or less continuous flow of small bits of data, rather than an object of fixed length, you can never access two different positions of a NetStream at the same time. You could try to "jump" between positions from frame to frame, producing a kind of "shutter" effect , but that would probably not perform well.
You can, however, let the video objects share the same NetConnection, and have two NetStream instances load the same movie, or you could just have your content for the left eye and right eye in two separate FLVs playing at the same time. You would have to take care of synchronization, though, and there might by slight inconsistencies.
If you are targeting Flash Player 10.1 or later, you can load both FLVs into memory as a byteArray, and then use NetStream.appendBytes to play them. This should take care of the synching problems.
从那时起,我就知道如何实现我想要的目标。
伪代码:
然后将 bmp1 和 bmp2 组织到您想要的位置,并进行相应的转换。
I've since figured out how to accomplish what I want.
pseudo-code:
then organize bmp1 and bmp2 to be where you want the pieces to be, and transform accordingly.