ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

Demo RuntimeError: function signature mismatch

Open EladKarni opened this issue 5 years ago • 4 comments

Describe the bug Throws error when trying to add "-preset", "veryfast" worker.js onmessage() captured an uncaught exception: RuntimeError: function signature mismatch

To Reproduce Using your demo section at https://ffmpegwasm.github.io/#demo use the following arguments, and the error should be reproducible.

{
  args: ['-i', 'video.avi', "-preset", "veryfast", '-c:v', 'libx264', 'video.mp4'],
  inFilename: 'video.avi',
  outFilename: 'video.mp4',
  mediaType: 'video/mp4',
}

Expected behavior Should just encode the file. Tested on ffmpeg locally via CLI and arguments are valid.

Screenshots https://i.imgur.com/UVFTbLU.png

Desktop (please complete the following information):

  • OS: [Windows 10 2004]
  • Browser [Chrome]
  • Version [87.0.4280.66]

Additional context Just as a note, encoding is very very slow. Is this normal?

EladKarni avatar Nov 18 '20 17:11 EladKarni

Hmm, can you provide your video file for me to test? And yes, it is normal that it is slow. Lol

jeromewu avatar Nov 19 '20 14:11 jeromewu

Here is a quick video of Minecraft. Test Video.zip

With these arguments ['-i', 'video.avi', "-preset", "veryfast", '-c:v', 'libx264', 'video.mp4'] it crashes. Let me know if you can reproduce this with the given video file.

Note, if I change veryfast to fast it works. Hope that helps

EladKarni avatar Nov 20 '20 03:11 EladKarni

Hi, Faced with a similar issue, after I updated @ffmpeg/ffmpeg from 0.8.3 to 0.9.6.

Command that create a video from images (in 0.8.3 API was different, I keep the latest API for example)

ffmpeg.run(
      `-framerate`, `${videoOptions.fps}`,
      `-pattern_type`, `glob`,
      `-i`, `*.jpeg`,
      `-c:v`, `libx264` ,
      `-preset`, `veryfast`,
      `-crf`, `17`,
      `out.mp4`,
    );

It throwns exeption Uncaught RuntimeError: function signature mismatch.

If I change veryfast to fast/superfast/ultrafast, it works well.

OS: [macOs Mojave 10.14.6] Browser [Chrome] Version [87.0.4280.88]

katmai7 avatar Jan 07 '21 16:01 katmai7

Is this issue abandoned? I am having the same problem, namely that using the veryfast preset gives a "signature mismatch" error, while other fast presets work just fine

Fran314 avatar Sep 18 '25 13:09 Fran314