ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Connection Error while using a remote url for input.

未关闭
#230 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
17.8k
派生
1.1k
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。