Skip to content

Process stdout should not use CharStream.copy #354

@Euklios

Description

@Euklios

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions