我如何连接在Adobe AIR / Flash的code视频? [英] How do I encode video in Adobe Air/Flash?

查看:170
本文介绍了我如何连接在Adobe AIR / Flash的code视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Adobe的Flash航,动作脚本3.0应用程序。我需要在网络摄像头(或者说一系列的位图作为帧)保存到一个视频文件。视频文件需要COM pressed,需要保存为框架去了。

I have an Adobe Air Flash, Action script 3.0 application. I need to save the webcam (or rather a series of bitmap as frames) to a video file. The video file needs to be compressed and needs to save as the frames go.

推荐答案

AIR / Flash的不给你访问到任何本地视频连接codeRS,所以COM pressing视频是这个最艰难的部分问题。

AIR/Flash don't give you access to any local video encoders, so compressing the video is the hard part of this problem.

在其他方面,抓取视频帧使用的BitmapData.draw()函数。然后,您可以绘制文本到同一个BitmapData。

For the rest, grab video frames using the BitmapData.draw() function. You can then draw the text into the same bitmapdata.

有关uncom pressed视频,你可以做这样的事情:的http://www.joristimmerman.be/word$p$pss/2008/12/18/flvrecorder-record-to-flv-using-air/.

For uncompressed video, you can do something like this: http://www.joristimmerman.be/wordpress/2008/12/18/flvrecorder-record-to-flv-using-air/.

从理论上讲,你可以写一个视频连接codeR ActionScript中。事实上,没有人这样做的告诉我,你会遇到的问题(无论是technicaql或法人 - 对一些codeCS)。在AIR更好的行动过程将是使用的NativeProcess API或原生扩展卸载的编码天然code。这需要释放AIR应用程序本身作为一个原生应用程序,并创建一个单独的版本,每一个你支持的平台。 (通过在本地code添加依赖,你失去了AIR的跨平台的优点。)

Theoretically, you can write a video encoder in ActionScript. The fact that nobody has done so tells me that you would run into problems (either technicaql or legal -- for some codecs). In AIR a better course of action would be to use the NativeProcess API or a native extension to offload the encoding to native code. This requires releasing the AIR app itself as a native app and creating a separate version for each platform you support. (By adding dependencies on native code, you lose the cross-platform benefits of AIR.)

在闪存(在网络上),典型的方式做到这一点是将摄像头流发送到服务器,并做你的处理存在。

In Flash (on the Web), the typical way to do this is to send the camera stream to a server and do your processing there.

这篇关于我如何连接在Adobe AIR / Flash的code视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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