ffmpegwasm / ffmpegwasm/ffmpeg.wasm

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

Aperta
#225 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C
Stelle
17.8k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.