在 AS3 中将视频从任何格式编码为 .flv 格式 [英] Encode video from any format to .flv format in AS3

查看:26
本文介绍了在 AS3 中将视频从任何格式编码为 .flv 格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Action Script 中是否有任何库可以将任何视频格式转换为 .FLV?

Is there any library in Action Script that be able to convert any video format to .FLV?

我一直在寻找它,但没有成功.我认为 as3 具有用于此目的的功能,但没有找到.

I've been looking for it with no success. I thought that as3 had functions for that purposes but not found.

我想让用户可以在我的网站上上传任何视频,因此我需要将其转换为标准并将其压缩为固定分辨率.

I want to give the possibility that in my site, users can upload any video, so I need to convert it to a standard and compress it to a fixed resolution.

提前致谢.

推荐答案

有一个 FLV 编码器 AS3 库.据我记得,它需要一个帧的图像字节和音频字节.但是您必须在某处获取图像数据和声音数据.你也可以

There's a FLV encoder AS3 library. As far as I remember it requires image bytes and audio bytes for a frame. But you will have to get image data and sound data somewhere. You could either

  1. 在 Flash 中播放视频并抓取屏幕截图"
  2. 对其进行解码并获取实际数据

在第一种情况下,您将以 mp4/flv -> flv 转换器结束,我猜这不是您需要的.在第二种情况下,您将不得不以某种方式解码视频.因此,您要么必须在 AS3 中实现解码算法,要么使用 Alchemy 和现有的 C/C++ 解决方案.

In the first case you'll end with a mp4/flv -> flv converter which I guess is not what you need. In the second case you will have to decode videos somehow. So you either will have to implement decoding algorythms in AS3 or use Alchemy and existing C/C++ solutions.

Adobe 目前正在搞砸 Alchemy,所以我想这不是一个选择.

Adobe is messing up with Alchemy at the moment, so I guess it is not an option anyway.

但他们心中的每个人都使用服务器端脚本来转换视频.网络上有大量文章.这将是最简单、最快和最不痛苦的解决方案.

But everyone in their mind uses a server-side script to convert videos. There are tons of articles in the web. This will be the simplest, fastest and least painful solution.

这篇关于在 AS3 中将视频从任何格式编码为 .flv 格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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