ffmpegwasm / ffmpegwasm/ffmpeg.wasm

TypeError [ERR_WORKER_PATH]: The worker script or module filename must be an absolute path or a relative path

未關閉
#225 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C
星號
17.8k
分支
1.1k
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
Hi, I'm trying to implement a feature which is live transcoding a hls stream (h265) to another hls stream (h264) so the video can be played using html5 as we know that h265 is not supported on browsers. This in an Electron desktop app by the way.

However, when running this ffmpeg command: -i http://10.70.39.32:80/streams/60dd68f…/stream/60dd68f….m3u8 -vcodec libx264 -acodec copy -f hls -hls_list_size 3 -hls_wrap 5 playlist.m3u8

I encountered this error about worker could not find the necessary script.

![image](https://user-images.githubusercontent.com/28868992/124858508-64ae3300-dfd8-11eb-8a3b-34b81d34b357.png)

**To Reproduce**
Steps to reproduce the behavior:

My dev Enviroment:

```
"devDependencies": {
"electron": "^13.1.5",
"electron-packager": "^13.0.1",
"electron-winstaller": "^2.7.0"
}
```
Steps to reproduce:

1. Includes the script in header tag:
`
`
2. Load ffmpeg in the body:

```
Play





var player = videojs('my_video_1');


async function loadPlayerHEVC() {
var resource = 'http://10.70.39.32:80/streams/60dd68fdc88f570012526657/stream/60dd68fdc8....526657.m3u8'
const { createFFmpeg } = FFmpeg;
const ffmpeg = createFFmpeg({ log: true });
const { fetchFile } = FFmpeg;
await ffmpeg.load();
await ffmpeg.run('-i', resource, '-vcodec', 'libx264', '-acodec', 'copy', '-f' ,'hls', '-hls_list_size', '3', '-hls_wrap', '5', 'playlist.m3u8' );
// ffmpeg.exit(0);
}

```
Any help would be much appreciated.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。