Add support for -i pipe:0
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu với FFmpegBuilder và điểm vào xử lý tiến trình được Java wrapper sử dụng; xem xét cách một InputStream supplier được đề xuất có thể cung cấp dữ liệu cho tiến trình trong khi addInput("pipe:0") chọn stdin. Công việc được xem là hoàn tất khi có thể stream input trực tiếp mà không ghi ra đĩa, có tính đến khả năng tương thích với Java 8 và vẫn giữ nguyên hành vi output hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello, I need to transcode live videos,
essentially reading from an InputStream and pipeing the output into an OutputStream is what I need to do.
Unfortunately writing the file to disk is not possible for my use case.
I tried using 2 unix sockets which did work for some formats, but some input formats did not work that way. notably the MP4 demuxer
didnt like demuxing from a unix socket. It does however work with demuxing from stdin.
Sadly your CLI wrapper has no support for demuxing from stdin, so I have to rely on ProcessBuilder directly for this one task.
I wouldnt mind developing this as a feature and making a PR to this repo if you are intrested in this.
My idea would be to add a function to FFmpegBuilder that accepts a supplier to a InputStream.
A bit like this:
FFmpegBuilder builder = ...
Supplier<InputStream> streamSupplier = ...
builder.setStdIn(streamSupplier)
At some appropriate location in the library I would add this code or something similar:
(This may possible require starting of a "background" thread and I will maybe have to make adjustments for java 8 compat.)
Supplier<InputStream> streamSupplier = ...
Process proc = ...
if (streamSupplier != null) {
try(OutputStream outputStream = proc.getOutputStream();
InputStream stream = streamSupplier.get()) {
stream.transferTo(outputStream);
}
}
After these changes someone could then call
builder.addInput("pipe:0") to pipe the input from the InputStream.
For my usecase the output would still be a unix socket since my output muxer can write to the unix socket
and the input would be from the InputStream.
Tell me if you have any intrest in this feature and I will begin making it and give you a PR shortly.
- Ngôn ngữ chính
- Java
- Star
- 1.9k
- Fork
- 424
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bramp/ffmpeg-cli-wrapper
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
bramp/ffmpeg-cli-wrapper#392 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
bramp/ffmpeg-cli-wrapper#384 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
bramp/ffmpeg-cli-wrapper#383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
bramp/ffmpeg-cli-wrapper#382 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
bramp/ffmpeg-cli-wrapper#355 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bramp/ffmpeg-cli-wrapper
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/java-sdk#1174 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
module: core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
bigbluebutton/bigbluebutton#26028 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix SNMP4J Agent vulnerabilityĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MetricsHub/metricshub-community#1390 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
apache/rocketmq-dashboard#6331 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Upgrade to Commons Codec 1.23.0Đang mởstatus: team-only type: dependency-upgrade
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
spring-projects/spring-boot#52143 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày