Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RxFFmpegInvoke如何处理ProcessBuilder写入数据的机制? #334

Open
lowpair opened this issue Dec 7, 2023 · 0 comments
Open

RxFFmpegInvoke如何处理ProcessBuilder写入数据的机制? #334

lowpair opened this issue Dec 7, 2023 · 0 comments

Comments

@lowpair
Copy link

lowpair commented Dec 7, 2023

如下ProcessBuilder写数据,RxFFmpegInvoke如何处理呢?
// 使用Java的ProcessBuilder类启动FFmpeg进程
ProcessBuilder pb = new ProcessBuilder("ffmpeg", "-f", "rawvideo", "-pix_fmt", "nv12", "-s", width + "x" + height, "-r", "30", "-f", "sio", "-i", "pipe:0");
Process process = pb.start();

// 将YUV数据写入管道
OutputStream outputStream = process.getOutputStream();
outputStream.write(yuvData);
outputStream.flush();
outputStream.close();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant