ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Connection Error while using a remote url for input.

Abierto
#230 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
17.8k
Forks
1.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Describe the bug**
In short, I got the 'host is unreachable error' for every public url that I have tried. None of them work?

**To Reproduce**
Quick summery of my tech stack:

-Electron desktop app as the client. -FFMPEG.WASM library: https://ffmpegwasm.github.io/

(*) The on-the-fly transcoding is supposed to happen right on the client side.

My dev enviroment:

`"devDependencies": { "electron": "^13.1.5", "electron-packager": "^13.0.1", "electron-winstaller": "^2.7.0" }
`
There are 2 ways to use this library, one is as normal html script, and the other is nodejs style which I have tried both and get different errors (though they are all about connection):

**(*) Regular JS way**

```

Play

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('-re','-i', resource, '-vcodec', 'libx264', '-acodec', 'copy', '-f' ,'hls', '-hls_list_size', '3', '-hls_wrap', '5', 'playlist.m3u8' );
// ffmpeg.exit(0);
}

```
![image](https://user-images.githubusercontent.com/28868992/125754932-42c03117-c760-4640-b3a9-ef5b4ac770e5.png)
**(*) Nodejs way**

```
async function tester(url)
{
const { createFFmpeg, fetchFile } = require('@ffmpeg/ffmpeg');
const ffmpeg = createFFmpeg({ log: true });
await ffmpeg.load();
await ffmpeg.run('tcp','-re', '-i', url, '-vcodec', 'libx264', '-acodec', 'aac', '-f', 'flv', '-hls_list_size', '3', '-hls_wrap', '5', 'playlist.m3u8');
// ffmpeg.exit(0);
}
```
![image](https://user-images.githubusercontent.com/28868992/125754904-cef37d3b-0819-4f71-85ae-6f0e39d3117e.png)
URL for testing

You guys can use this public stream to reproduce the scenario: http://113.163.94.245/hls-live/livepkgr/_definst_/liveevent/thbt.m3u8

Any help would be much appreciated.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.