Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add support for -i pipe:0

Đang mở
#334 8 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java
Lĩnh vực
cli, tooling

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ả

enhancement

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bramp/ffmpeg-cli-wrapper

Tất cả issue của bramp/ffmpeg-cli-wrapper

Issue tương tự

Thêm issue về Java

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.