ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Unable to use ffmpeg.run on rtsp input stream

Đang mở
#67 7 bình luận 1 reaction 0 người được giao Xem trên GitHub
help wanted
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**
Unable to use `ffmpeg.run` to use rtsp stream as the input, and output the transcoded stream over an http stream using mpeg1video encoding.
In `ffmpeg`, I can do the following
```bash
ffmpeg -i rtsp://192.168.0.101/av0_1 -f mpegts -codec:v mpeg1video -b 800k -r 30 http://localhost:8081/password
```
However, when I try doing the same thing using ffmpeg.wasm, I get the following:
```
[info] load ffmpeg-core
[info] ffmpeg-core loaded
starting
[info] ffmpeg command: ./ffmpeg -nostdin -hide_banner -i rtsp://192.168.0.101/av0_1 -f mpegts -codec:v mpeg1video -b 800k -r 30 http://localhost:8081/password
[ffmpeg-stdout] Assertion failed: undefined
[ffmpeg-stderr] Assertion failed: undefined
[ffmpeg-stdout] RuntimeError: abort(Assertion failed: undefined). Build with -s ASSERTIONS=1 for more info.
[ffmpeg-stderr] RuntimeError: abort(Assertion failed: undefined). Build with -s ASSERTIONS=1 for more info.
// then prints out ffmpeg-core.js file
```

The code I used is below:
example_stream.js:
```javascript
const { createFFmpeg } = require('@ffmpeg/ffmpeg');
const ffmpeg = createFFmpeg({ log: true });
(async () => {
await ffmpeg.load();
console.log("starting");
await ffmpeg.run("-i rtsp://192.168.0.101/av0_1 -f mpegts -codec:v mpeg1video -b 800k -r 30 http://localhost:8081/password");
})();
```

**To Reproduce**
Steps to reproduce the behavior:
1. Create a new node project
2.` npm install "@ffmpeg/ffmpeg"`
3. Run code above
4. See error

**Expected behavior**
Output similar to ffmpeg terminal command:
```
eng6@eng6-ThinkPad-P50s:~$ ffmpeg -i rtsp://192.168.0.101/av0_1 -f mpegts -codec:v mpeg1video -b 800k -r 30 http://localhost:8081/password
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
...
Input #0, rtsp, from 'rtsp://192.168.0.101/av0_1':
Metadata:
title : av0_1
Duration: N/A, start: 0.034000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709), 1280x720, 29.97 tbr, 90k tbn, 180k tbc
Output #0, mpegts, to 'http://localhost:8081/password':
Metadata:
title : av0_1
encoder : Lavf56.40.101
Stream #0:0: Video: mpeg1video, yuv420p, 1280x720, q=2-31, 800 kb/s, 30 fps, 90k tbn, 30 tbc
Metadata:
encoder : Lavc56.60.100 mpeg1video
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg1video (native))
Press [q] to stop, [?] for help
```

**Desktop (please complete the following information):**
- OS: Ubuntu 16.04
- Browser Firefox
- Version 75
- Node version: 12.7.0
- NPM version: 6.14.5
- "@ffmpeg/ffmpeg" version: "^0.8.3",

**Additional context**
Add any other context about the problem here.

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.