AS3:是否有可能捕捉到舞台元素或位图数据到NetStream的? [英] AS3: Is it possible to capture stage elements or bitmap data into a netstream?

查看:186
本文介绍了AS3:是否有可能捕捉到舞台元素或位图数据到NetStream的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在看<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#appendBytes%28%29"相对=nofollow> NetStream的文档。却无法真正搜集,如果对appendBytes()真的可以任意的数据。难道我真的只是把任意的位图数据(一个字节数组)和(其发送到FMS保存文件前psumably $ P $)追加帧流?我想我是错的:它仅适用于动态流非常有用。我知道这是可以通过抢FMS摄像头饲料和直接连接code视频。但说我想在编码之前增加一些覆盖,是甚至有可能在Flash?即您可以动态生成的Flash NetStream对象,或者是你可以做的唯一事情是的从NetStream的绘制位图数据,而不是相反?

I'm looking at the netstream documentation. but can't really glean if appendBytes() can really take arbitrary data. Could I really just take arbitrary bitmap data (as a byte array) and append the frame to stream (presumably before sending it to a FMS to save a file)? I think I am wrong: it's only useful for dynamic streaming. I know that it is possible to grab a webcam feed and directly encode video via FMS. But say I wanted to add some overlays before encoding, is that even possible in Flash? I.e. Can you dynamically generate netStream objects in Flash, or is the only thing you can do is draw bitmap data from a netStream and not vice-versa?

基本上,目标是操纵视频和音频很像电影捣碎并直接保存出实际的视频文件。电影VIP会员实际上节省了单帧到服务器后转换。

Basically the goal is to manipulate video and audio much like Movie Masher and save out actual video files directly. Movie Masher actually saves out single frames to the server for later conversion.

我听说FP11具有本土H264 Encoding--所以the'spec问题:请问最终的NetStream是连接codeD在浏览器中,然后上传到服务器上通过HTTP,或FMS还是有要求吗?我看着这实时连接codeR演示,但我不知道,如果他们只是使用FMS作为filedump,或者如果它是过程的一部分。

I've heard that FP11 has native H264 Encoding-- so the'spec' question: Could the final netStream be encoded in-browser then uploaded to the server over HTTP, or is FMS still a requirement? I'm looking at this realtime encoder demo, but I'm not sure if they're just using FMS as a filedump, or if it's part of the process.

有用于编码的FLV一个开源项目,它采用ByteArrayFlvEn codeR,它允许您连接code原料的ByteArray。是否有一个相当于H264?

There's an open source project for encoding FLV, it uses ByteArrayFlvEncoder which allows you to encode raw ByteArrays. Is there an equivalent for H264?

推荐答案

根据该文件,它似乎并不能使用本机的连接codeR,因为你不能同时利用 NetStream.publish () NetStream.appendBytes()在同一时间:

According to the documentation, it does not seem possible to use the native encoder because you cannot leverage both NetStream.publish() and NetStream.appendBytes() at the same time :

NetStream可以发布流或播放流,但不能两者都做。   要发布流,并查看从服务器上播放,创建两个NetStream对象。

A NetStream can either publish a stream or play a stream, it cannot do both. To publish a stream and view the playback from the server, create two NetStream objects.

在换句话说,它好像是没有办法将自定义数据通过的NetStream 对象发送到FMS。

In other words, it seems like there is no way to send custom data to FMS over a NetStream object.

所以,你可以:

  1. 将相机安装到视频对象
  2. 在应用了一系列影响它瓦特/像素处理
  3. 为以后的编码像素数据发送到服务器通过套接字,或使用AS3 EN codeR您提到一个烤FLV保存为一个文件(在用户的计算机上或在服务器上)
  1. Attach the camera to a Video object
  2. Apply a series of effects to it w/ pixel manipulation
  3. Send the pixel data for later encoding to a server over a socket, or use the AS3 encoder you mentioned to save a baked FLV as a file (on the user's computer or on the server)

这篇关于AS3:是否有可能捕捉到舞台元素或位图数据到NetStream的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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