NetStream和步骤()或寻求()? [英] Netstream and step() or seek()?

查看:292
本文介绍了NetStream和步骤()或寻求()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是在一个AS3的项目,播放视频(H264)。我想,对于一些特殊原因,要到一定的位置。

I'm on an AS3 project, playing a video (H264). I want, for some special reasons, to go to a certain position.

一)我尝试用NetStream.seek()。目前那就只为关键帧。在我目前的设置,这种方式,我可以找到一个位置,每1秒。 (一个更好的解决,我不得不EN code电影与许多关键帧越好,又名每一帧关键帧)

a) I try it with NetStream.seek(). There it only goes to keyframes. In my current setting, this means, i can find a position every 1 second. (for a better resolution, i'd have to encode the movie with as many keyframes as possible, aka every frame a keyframe)

  • 这是definetly不是我喜欢的方式,因为我不想reen code所有的VID。

二)我尝试用NetStream.step()。这应该给我一个机会,从框架步骤慢慢框架。但文件中这样说的:

b) I try it with NetStream.step(). This should give me the opportunity to step slowly from frame to frame. But in the documentation it says:

此方法仅当数据从Flash Media Server 3.5.3或更高版本以及何时NetStream.inBufferSeek为true。

This method is available only when data is streaming from Flash Media Server 3.5.3 or higher and when NetStream.inBufferSeek is true.

<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#step" rel="nofollow">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#step()

这是否意味着,这是不可能的,空气的桌面?当我尝试它,没有什么作品。

Does this mean, it is not possible with Air for Desktop? When I try it, nothing works.

任何建议,如何解决这个问题呢?

Any suggestions, how to solve this problem?

问候和放大器;谢谢! 萨科

Greetings & Thank you! Nicolas

推荐答案

Flash视频只能用秒来推进,除非你有Flash Media Server的托管视频。从技术上讲,这意味着你可以拥有它的工作按预期在空气中,但是,视频将不得不流(愚蠢的土坯...)。

Flash video can only be advanced by seconds unless you have Flash Media Server hosting your video. Technically, that means that you can have it working as intended in Air, however, the video would have to be streaming (silly adobe...).

您有两种选择:

1)导入的素材为影片剪辑。闪存IDE有一个向导,这一点,如果你正在开发只在非FlashIDE环境中,您可以转换和导出为外部资产,如SWF或SWC。这将被嵌入或运行时加载到你的应用程序让您获得影片剪辑的每一帧steppable方法。然而,这并配备了一些音频同步问题(IIRC)。此外,擦洗倒退不是一个MC的强项。

1) Import the footage as a movieclip. The Flash IDE has a wizard for this, and if you're developing exclusively in non-FlashIDE environment, you can convert and export as an external asset such as an SWF or SWC. This would then be embedded or runtime loaded into your app giving you access to the per-frame steppable methods of MovieClip. This, however, does come with some audio syncing issues (iirc). Also, scrubbing backwards is not an MC's forté.

2)写一个加载图像序列并显示,以每帧自己的视频对象。你必须要建立自己的音频同步的能力,但它可能是从FLVComponent或NetStream最直接的解决办法分开。

2) Write your own video object that loads an image sequence and displays each frame in order. You'd have to setup your own audio syncing abilities, but it might be the most direct solution apart from FLVComponent or NetStream.

这篇关于NetStream和步骤()或寻求()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆