Package net.bramp.ffmpeg.builder
Class FFmpegBuilder
java.lang.Object
net.bramp.ffmpeg.builder.FFmpegBuilder
Builds a ffmpeg command line
- Author:
- bramp
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Log level options: https://ffmpeg.org/ffmpeg.html#Generic-options -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddExtraArgs
(String... values) Add additional ouput arguments (for flags which aren't currently supported).addInput
(FFmpegProbeResult result) Adds new output file.Adds new output file.addOutput
(FFmpegOutputBuilder output) Adds an existing FFmpegOutputBuilder.addProgress
(URI uri) Create new output (to stdout)build()
protected void
boolean
overrideOutputFiles
(boolean override) setAudioFilter
(String filter) Sets the audio filter flag.setComplexFilter
(String filter) Sets the complex filter flag.setInput
(FFmpegProbeResult result) setPass
(int pass) setPassDirectory
(String directory) setPassPrefix
(String prefix) setStartOffset
(long duration, TimeUnit units) setUserAgent
(String userAgent) setVerbosity
(FFmpegBuilder.Verbosity verbosity) setVideoFilter
(String filter) Sets the video filter flag.
-
Constructor Details
-
FFmpegBuilder
public FFmpegBuilder()
-
-
Method Details
-
overrideOutputFiles
-
getOverrideOutputFiles
-
setPass
-
setPassDirectory
-
setPassPrefix
-
setVerbosity
-
setUserAgent
-
readAtNativeFrameRate
-
addInput
-
addInput
-
clearInputs
-
setInput
-
setInput
-
setFormat
-
setStartOffset
-
addProgress
-
setComplexFilter
Sets the complex filter flag.- Parameters:
filter
-- Returns:
-
setAudioFilter
Sets the audio filter flag.- Parameters:
filter
-- Returns:
-
setVideoFilter
Sets the video filter flag.- Parameters:
filter
-- Returns:
-
addExtraArgs
Add additional ouput arguments (for flags which aren't currently supported).- Parameters:
values
- The extra arguments.- Returns:
- this
-
addOutput
Adds new output file.- Parameters:
filename
- output file path- Returns:
- A new
FFmpegOutputBuilder
-
addOutput
Adds new output file.- Parameters:
uri
- output file uri typically a stream- Returns:
- A new
FFmpegOutputBuilder
-
addOutput
Adds an existing FFmpegOutputBuilder. This is similar to calling the other addOuput methods but instead allows an existing FFmpegOutputBuilder to be used, and reused.List<String> args = new FFmpegBuilder() .addOutput(new FFmpegOutputBuilder() .setFilename("output.flv") .setVideoCodec("flv") ) .build();
- Parameters:
output
- FFmpegOutputBuilder to add- Returns:
- this
-
addStdoutOutput
Create new output (to stdout)- Returns:
- A new
FFmpegOutputBuilder
-
build
-