How to compile ffmpeg via Alchemy gcc?

我与影子孤独终老i 提交于 2019-12-02 11:47:22
Pavel

FlasCC(Alchemy 2) does compile ffmpeg fine - for anyone who is trying, basically you need to download ffmpeg source. Go to ffmpeg directory, do

PATH=/cygdrive/c/PATH_TO_FLASCC/sdk/usr/bin:$PATH ./configure --prefix=/cygdrive/c/PATH_TO_FLASCC/sdk/usr

Now it's good if you run configure with some restrictions so it doesn't include every codec or filter there is(takes ages). Additional configure params from my use case:

--disable-ffserver --disable-everything --enable-filter=scale --enable-demuxer=flv --enable-muxer=ogg --enable-protocol=file --disable-network --disable-debug --disable-yasm --disable-asm --disable-stripping --enable-memalign-hack --disable-shared --enable-decoder=flashsv --enable-encoder=mpeg1video --enable-encoder=libtheora --enable-encoder=libvorbis --enable-libtheora --enable-libvorbis

Important is to --disable-everything and then enable only what you need.

Then run ./make and ./make install (with the PATH in front of those commands), it should produce and install ffmpeg libs.

When I built a test swf, all seemed to work. I've used their (modified) sample where they encode 25 dummy mpeg frames. I'm tracing the encoding progress at least and seeing the frames being encoded.

SWC is a problem though, if you would want to use that. I'm getting strange errors - first it couldn't find codec(got NULL when using the find codec function), when I specified it by name, it can't allocate codec context(also got NULL). Then I compiled it in pure Flex and it got over this one, but couldn't open the codec (basically all of those are av_ something library functions). I really don't understand why SWC doesn't work with these as with emit-swf all works perfectly fine.

Maybe someone could enlighten on the SWC / SWF differences.

There was some discussion about this on the Adobe Forums here. It seems rather involved, though some folks seem to have made some progress.

Try it with the new flash c compiler Adobe Flash cc. I hope it may help you to compile ffmpeg in flash.

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