You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 fileFFmpegffmpeg = newFFmpeg();
ffmpeg.setProcessOutputStream(appenable);
ffmpeg.run(newFFmpegBuilder().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
The text was updated successfully, but these errors were encountered:
It's a bit more nuanced then what I wrote above:
FFmpeg will output to stderr and send the resulting file to stdout, but only if the command succeeded.
If, for example, the output does not specify the format (no -f) or specifies a format that does not support seaking (-f mp4), it will still output to stdout.
However, replacing CharStreams with ByteStreams does not make a difference in that case, as the chars are just coppied as is
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
Expected behavior
processOutputStream should be treated as binary.
Version (if applicable):
The text was updated successfully, but these errors were encountered: