ffmpeg-cli-wrapper icon indicating copy to clipboard operation
ffmpeg-cli-wrapper copied to clipboard

Process stdout should not use CharStream.copy

Open Euklios opened this issue 6 months ago • 2 comments

Describe the bug setProcessOutputStream takes in an Appendable, and later uses CharStreams.copy to transfer the output as text. This does not work for most cases, as stdout is used to write the output streams. This means, an encoded file would be interpreted as chars, causing some bytes being lost due to interpretation.

To Reproduce

// appendable should be a handle to a file

FFmpeg ffmpeg = new FFmpeg();
ffmpeg.setProcessOutputStream(appenable);

ffmpeg.run(new FFmpegBuilder().addInput("input.mp4")).done().addStdoutOutput().done().build());

Expected behavior processOutputStream should be treated as binary.

Version (if applicable):

  • OS: any
  • Java Version: any
  • FFmpeg version: any

Euklios avatar Aug 22 '24 15:08 Euklios