我想将ffmpeg编译为wasm。下载FFMPEG和emsdk源代码后,我使用下面的命令进行构建。
emconfigure ./configure --cc="emcc" --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic \
--disable-ffplay --disable-ffprobe --disable-asm --disable-doc --disable-devices --disable-pthreads --disable-w32threads --disable-network \
--disable-hwaccels --disable-parsers --disable-bsfs --disable-debug --disable-protocols --disable-indevs --disable-outdevs --enable-protocol=file --ranlib="emranlib"
emmake make
然后我得到了这样的错误:
emcc: warning: ignoring unsupported linker flag: `-rpath-
link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavfo
rmat:libavcodec:libavutil:libavresample` [-Wlinkflags]
wasm-ld: error: initial memory too small, 18317952 bytes needed
emcc: error: '/home/ubuntu/emsdk/upstream/bin/wasm-ld -o
/tmp/emscripten_temp_t3l4sg_k/ffmpeg_g.wasm -Llibavcodec -Llibavdevice
-Llibavfilter -Llibavformat -L/home/ubuntu/emsdk/upstream/emscripten
/system/local/lib -Llibavresample -L/home/ubuntu/emsdk/upstream/emscripten
/system/lib -Llibavutil -L/home/ubuntu/emsdk/upstream/emscripten
/cache/wasm -Llibpostproc -Llibswscale -Llibswresample -z noexecstack
fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
fftools/cmdutils.o fftools/ffmpeg.o libavdevice/libavdevice.a
libavfilter/libavfilter.a libavformat/libavformat.a
libavcodec/libavcodec.a libswresample/libswresample.a
libswscale/libswscale.a libavutil/libavutil.a /home/ubuntu/emsdk/upstream
/emscripten/cache/wasm/libc.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libcompiler_rt.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libc++-noexcept.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libc++abi-noexcept.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libdlmalloc.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libpthread_stub.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libc_rt_wasm.a /home/ubuntu/emsdk/upstream/emscripten/cache
/wasm/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm
-enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined --import-
memory --import-table --strip-debug --export main --export malloc --export
free --export stackSave --export stackRestore --export stackAlloc --export
__data_end --export __wasm_call_ctors --export fflush --export
__errno_location --export _get_tzname --export _get_daylight --export
_get_timezone --export memalign --export memset -z stack-size=5242880
--initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed
如何更改默认的emcc
初始内存设置?