AS3 Video Encoding at runtime with high compression (H.264?)

六月ゝ 毕业季﹏ 提交于 2019-12-07 17:09:35

问题


I need to compress video image data (lets say a display object) in AS3 to a Byte Array with high compression at runtime. Framerate only needs to be around 5 but 1024x768 video needs to go to < 40 Kilobyte per Second without the quality beeing tooo bad. I wrote a custom encoder and got it to around 80-100 Kilobyte per Second for 1024*768 which still is too much and i dont see a lot of improvements to be mad to my encoder.

Using JPG or PNG Encoder gives way higher KB/s. Is there any open source way to to decode and encode video in as3 at runtime ? E.g. a H.264 as3 encoder and decoder ? Or other codecs ?

Or maybe a C# source code of h.264 encoder and decoder ? I think i could port it to as3...

EDIT: Doesnt need to be h.264, just something with good quality when running at 5 Frames/Sec and 40 Kilobyte...


回答1:


Flash Player 11 (beta) has H.264 encoding:

H.264/AVC SW Encoding — Encode higher quality video locally using H.264 video.

Edit: Flash Player 11 is no longer beta




回答2:


ffmpeg is the only open source encoder/decoder I know of. I don't think it is C#. Due to licensing and patent issues around H.264, I'd be very surprised if an open source encoder didn't get sued into oblivion. this is why, for example, Firefox doesn't support H.264 in their HTML5 initiative.



来源:https://stackoverflow.com/questions/3717176/as3-video-encoding-at-runtime-with-high-compression-h-264

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