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
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExtraArgs(String... values) Add additional ouput arguments (for flags which aren't currently supported).addHlsOutput(String filename) Adds new HLS(Http Live Streaming) output file.addInput(FFmpegProbeResult result) <T extends AbstractFFmpegInputBuilder<T>>
FFmpegBuilderaddInput(T input) 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 voidprotected <T extends AbstractFFmpegInputBuilder<T>>
TdoAddInput(T input) booleanoverrideOutputFiles(boolean override) Deprecated.setAudioFilter(String filter) Sets the audio filter flag.setComplexFilter(String filter) Deprecated.Deprecated.Specify this option on an input stream usingAbstractFFmpegStreamBuilder.setFormat(String)setInput(FFmpegProbeResult result) <T extends AbstractFFmpegInputBuilder<T>>
FFmpegBuildersetInput(T input) setPass(int pass) setPassDirectory(String directory) setPassPrefix(String prefix) setStartOffset(long duration, TimeUnit units) Deprecated.Specify this option on an input or output stream usingAbstractFFmpegStreamBuilder.setStartOffset(long, TimeUnit)setThreads(int threads) setUserAgent(String userAgent) Sets vbr quality when decoding mp3 output.setVerbosity(FFmpegBuilder.Verbosity verbosity) setVideoFilter(String filter) Sets the video filter flag.
-
Field Details
-
strict
-
-
Constructor Details
-
FFmpegBuilder
public FFmpegBuilder()
-
-
Method Details
-
setStrict
-
overrideOutputFiles
-
getOverrideOutputFiles
-
setPass
-
setPassDirectory
-
setPassPrefix
-
setVerbosity
-
setUserAgent
-
readAtNativeFrameRate
Deprecated.Makes ffmpeg read the first input at the native frame read- Returns:
- this
-
addInput
-
addInput
-
addInput
-
doAddInput
-
clearInputs
-
setInput
-
setInput
-
setInput
-
setThreads
-
setFormat
Deprecated.Specify this option on an input stream usingAbstractFFmpegStreamBuilder.setFormat(String)Sets the format for the first input stream- Parameters:
format- , the format of this input stream, not null- Returns:
- this
-
setStartOffset
Deprecated.Specify this option on an input or output stream usingAbstractFFmpegStreamBuilder.setStartOffset(long, TimeUnit)Sets the start offset for the first input stream- Parameters:
duration- the amount of the offset, measured in terms of the unitunits- the unit that the duration is measured in, not null- Returns:
- this
-
addProgress
-
setComplexFilter
Deprecated.Sets the complex filter flag.- Parameters:
filter- the complex filter string- Returns:
- this
-
setAudioFilter
Sets the audio filter flag.- Parameters:
filter- the audio filter string- Returns:
- this
-
setVideoFilter
Sets the video filter flag.- Parameters:
filter- the video filter string- Returns:
- this
-
setVBR
Sets vbr quality when decoding mp3 output.- Parameters:
quality- the quality between 0 and 9. Where 0 is best.- Returns:
- FFmpegBuilder
-
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
-
addHlsOutput
Adds new HLS(Http Live Streaming) output file.
List<String> args = new FFmpegBuilder() .addHlsOutput("output.m3u8") .done().build();- Parameters:
filename- output file path- Returns:
- A new
FFmpegHlsOutputBuilder
-
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
-
AbstractFFmpegInputBuilder.readAtNativeFrameRate()instead