0

我希望有人对此有所了解,因为这让我发疯。我有一个 Net Stream 对象,用于从 Amazon Flash Media Streaming 服务流式传输视频。

视频建立连接并播放正常,但随机它似乎只是冻结,让它再次工作的唯一方法是重新建立连接。我也尝试将其他视频放入该亚马逊存储桶中,它们似乎可以正常播放。当它是 .FLV 格式和 .mp4 格式时会发生这种情况。

我已将缓冲时间设置为 5 秒,并且我观察缓冲区的输出以查看它的完整百分比。当问题发生时,缓冲区 5 从 100 变为 0,然后引发缓冲区失败错误(我正在使用 OVP 框架)。

我得出的结论是,它要么是视频编码问题,要么可能是防火墙问题阻止了数据通过。

有没有人对此有任何问题,如果有,您是如何解决的。

4

1 回答 1

0

Perhaps not really a great solution but what I wound up doing is

checking the buffer percentage and when the buffer indicates that it is loaded less than 20% I just trigger a re-connection. (OVP has a property called bufferPercentage, but its just a calculation of NetStream.bufferLength/NetStream.bufferTime). I also save the ns.time so that when I call play after re-connecting I tell it to start at the point where it left off.

Not an ideal solution but it seems to have at least offered an alternative to a freezing video stream.

This might be an isolated incident as I was using the Open video Player, but i've used this library several times without any issues along with the Amazon S3 Flash Streaming server. http://openvideoplayer.sourceforge.net/ovpfl/docs/asdocs-fp10/index.html

于 2011-11-23T16:14:52.340 回答