public class FFMPEGExecutor extends Object
| Constructor and Description |
|---|
FFMPEGExecutor(String ffmpegExecutablePath)
It build the executor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(String arg)
Adds an argument to the ffmpeg executable call.
|
void |
destroy()
If there's a ffmpeg execution in progress, it kills it.
|
void |
execute()
Executes the ffmpeg process with the previous given arguments.
|
void |
execute(boolean destroyOnRuntimeShutdown,
boolean openIOStreams)
Executes the ffmpeg process with the previous given arguments.
|
InputStream |
getErrorStream()
Returns a stream reading from the ffmpeg process standard error channel.
|
InputStream |
getInputStream()
Returns a stream reading from the ffmpeg process standard output channel.
|
OutputStream |
getOutputStream()
Returns a stream writing in the ffmpeg process standard input channel.
|
int |
getProcessExitCode()
Return the exit code of the ffmpeg process
If the process is not yet terminated, it waits for the termination
of the process
|
public FFMPEGExecutor(String ffmpegExecutablePath)
ffmpegExecutablePath - The path of the ffmpeg executable.public void addArgument(String arg)
arg - The argument.public void execute(boolean destroyOnRuntimeShutdown,
boolean openIOStreams)
throws IOException
destroyOnRuntimeShutdown - destroy process if the runtime VM is shutdownopenIOStreams - Open IO streams for input/output and errorout,
should be false when destroyOnRuntimeShutdown is false tooIOException - If the process call fails.public void execute()
throws IOException
IOException - If the process call fails.public InputStream getInputStream()
public OutputStream getOutputStream()
public InputStream getErrorStream()
public void destroy()
public int getProcessExitCode()
Copyright © 2020. All rights reserved.