ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Connection Error while using a remote url for input.

Đang mở
#230 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
17.8k
Fork
1.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.