Encode video from any format to .flv format in AS3

不问归期 提交于 2019-12-02 21:41:07

问题


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

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.

Thanks in advance.


回答1:


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. play the video in flash and grab 'screenshots'
  2. decode it and get actual data

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 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.



来源:https://stackoverflow.com/questions/9760496/encode-video-from-any-format-to-flv-format-in-as3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!