ffmpegwasm / ffmpegwasm/ffmpeg.wasm

FFmpeg.wasm exits early when attempting to concatenate frames into video

Đang mở
#445 2 bình luận 2 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**
I am creating a tool that captures frames from an HTML canvas and uses ffmpeg.wasm to make a video out of the frames. The way it works is it saves each frame as a PNG with `ffmpeg.FS()`, then uses a glob pattern in `ffmpeg.run()` to collect all of the frames and concatenate them into a video.

The issue is that FFmpeg is exiting early (without error), causing the video to be cut short. It seems to always stop at 180 frames in both Firefox and Chrome. I have created a simpler version of the code that just uses one image for all of the frames (but still duplicates it multiple times in the FFmpeg FS) so that the code for capturing the canvas can be omitted.

**To Reproduce**

1. Clone the repo (https://github.com/viberfoner/ffmpeg-wasm-frame-limit-bug), install dependencies, and run the server locally.

```bash
git clone https://github.com/viberfoner/ffmpeg-wasm-frame-limit-bug.git
cd ffmpeg-wasm-frame-limit-bug
npm install
node server
```

2. Open http://localhost:8080 in your browser. Open dev tools and note that the frames stop encoding at 180, instead of finishing at 300.

**Expected behavior**
FFmpeg should produce a 5 second long video with 300 frames. Instead, it stops at 180 frames.

**Desktop:**
- OS: Linux Mint 20.2
- Browser: Firefox & Chrome
- Version: 107

**Additional context**
This is my first time submitting an issue on GitHub, so please let me know if I can improve it!

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.