ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Crashes with pthread error: f.asm is undefined

オープン
#233 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
C
スター
17.8k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

**Describe the bug**
I am using ffmpeg-wasm to transcode multiple mp2 files to mp3 in the browser. Sometimes, it works flawlessly on multiple files, but then logs an error to the console and the ffmpeg.run promise doesn't even resolve nor reject

```
fferr pthread sent an error! blob:http://localhost:3000/2b82eddd-2ff1-4fd6-8c5c-4b9def392732:219: TypeError: f.asm is undefined
```

**To Reproduce**
I cannot successfully reproduce this, so I'll describe my setup:

* I am using svelte-kit for my website
* I am using `async-mutex` to stop concurrent transcoding, the plan is to transcode one after another
* my code was inspired by the `transcode.html` example in this repo
* I only create a single instance
* I only call load if `isLoaded` returns false

```ts
const { createFFmpeg, fetchFile } = window.FFmpeg

if (!ffmpeg) {
ffmpeg = createFFmpeg({
corePath: "/ffmpeg/ffmpeg-core.js"
})
}

ffmpeg.setLogger(({ type, message }) => {
//...
})

ffmpeg.setProgress(({ ratio }) => {
//...
})

if (!ffmpeg.isLoaded()) {
await ffmpeg.load()
}

ffmpeg.FS("writeFile", file.name, await fetchFile(file))

const mp3 = replaceSuffix(file.name, "mp3")

// sometimes this crashes but doesn't reject, so it never returns
await ffmpeg.run('-i', file.name, "-vn", "-acodec", "libmp3lame", "-b:a", "320k", mp3)

const outfile = ffmpeg.FS('readFile', mp3)
ffmpeg.FS("unlink", mp3)
```

**Expected behavior**
should not crash, and if it crashes, it should at least reject the promise

**Screenshots**
here is a screenshot of my console, I hope that this can help
![image](https://user-images.githubusercontent.com/18500203/127661559-64ecb9a6-1bf4-4972-a43c-ca0650820d26.png)

**Desktop:**
System:
OS: Linux 5.10 Arch Linux
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Memory: 15.14 GB / 31.22 GB
Container: Yes
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.2.0 - ~/.nvm/versions/node/v16.2.0/bin/node
Yarn: 1.22.11 - /usr/bin/yarn
npm: 7.13.0 - ~/.nvm/versions/node/v16.2.0/bin/npm
Browsers:
Chromium: 92.0.4515.107
Firefox: 90.0.2

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。