ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
14.22k stars 831 forks source link

ffmpeg.load failed with error: CompileError: AsyncCompile: Wasm decoding failed: unexpected section: Code @+62335 #551

Closed zzzmm11111 closed 1 year ago

zzzmm11111 commented 1 year ago

An error will be reported when running ffmpeg.load,The problem is only on Android,I tested it on both mac and ios, and it didn't happen Both 0.11.1 and 0.11.0 have this problem

env @ffmpeg/ffmpeg@0.11.1 Android vue3+vuecli

error message detail: [fferr] failed to asynchronously prepare wasm: CompileError: AsyncCompile: Wasm decoding failed: unexpected section: Code @+62335 [fferr] CompileError: AsyncCompile: Wasm decoding failed: unexpected section: Code @+62335

code: import { createFFmpeg, fetchFile } from "@ffmpeg/ffmpeg/dist/ffmpeg.min.js" const ffmpeg = createFFmpeg({ log: true, mainName: "main", corePath: "https://unpkg.com/@ffmpeg/core-st@0.11.1/dist/ffmpeg-core.js" }) window.createFFmpegCore = undefined async function test(){ try { await ffmpeg.load() console.log("success") } catch (error) { Toast(String(error)) } }

jeromewu commented 1 year ago

Please upgrade to the latest version.

zzzmm11111 commented 1 year ago

I tried using the latest version today,But my project base on vuecli,Using 0.12 caused a lot of Webpack-related errors that prevented me from using 0.12。 Can you provide a 0.11 available wasm file, or show me how to make a working wasm file so that Android can also use the version,I would really appreciate it.

jeromewu commented 1 year ago

It it more recommended to fix webpack issues as 0.11 is no longer maintained.