Package net.bramp.ffmpeg.builder
Class AbstractFFmpegOutputBuilder<T extends AbstractFFmpegOutputBuilder<T>>
java.lang.Object
net.bramp.ffmpeg.builder.AbstractFFmpegStreamBuilder<T>
net.bramp.ffmpeg.builder.AbstractFFmpegOutputBuilder<T>
- Direct Known Subclasses:
FFmpegHlsOutputBuilder,FFmpegOutputBuilder
public abstract class AbstractFFmpegOutputBuilder<T extends AbstractFFmpegOutputBuilder<T>>
extends AbstractFFmpegStreamBuilder<T>
Builds a representation of a single output/encoding setting
-
Field Summary
FieldsModifier and TypeFieldDescriptionlongDeprecated.Deprecated.UsegetVideoBitStreamFilter()insteadDeprecated.UsegetAudioFilter()insteadDeprecated.UsegetAudioQuality()insteadDeprecated.UsegetAudioSampleFormat()insteadprotected IntegerSpecifies the number of b-frames ffmpeg is allowed to use.protected StringDeprecated.UsegetConstantRateFactor()insteadlongDeprecated.UsegetVideoBitRate()insteadDeprecated.UsegetVideoBitStreamFilter()insteadDeprecated.UsegetVideoFilter()insteadDeprecated.UsegetVideoPreset()insteadDeprecated.UsegetVideoQuality()insteadFields inherited from class net.bramp.ffmpeg.builder.AbstractFFmpegStreamBuilder
audio_channels, audio_codec, audio_enabled, audio_preset, audio_sample_rate, DEVNULL, duration, extra_args, filename, format, meta_tags, pass_padding_bitrate, preset, presetFilename, startOffset, strict, subtitle_enabled, subtitle_preset, targetSize, throwWarnings, uri, video_codec, video_copyinkf, video_enabled, video_frame_rate, video_frames, video_height, video_movflags, video_pixel_format, video_size, video_width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFFmpegOutputBuilder(FFmpegBuilder parent, String filename) protectedAbstractFFmpegOutputBuilder(FFmpegBuilder parent, URI uri) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAudioFlags(com.google.common.collect.ImmutableList.Builder<String> args) protected voidaddGlobalFlags(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) protected voidaddSourceTarget(int pass, com.google.common.collect.ImmutableList.Builder<String> args) protected voidaddVideoFlags(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) build(int pass) build(FFmpegBuilder parent, int pass) Builds the argumentsReturns a representation of this Builder that can be safely serialised.protected static StringformatDecimalInteger(double d) Returns a double formatted as a string.longprotected TgetThis()longfinal TsetAudioBitDepth(String bit_depth) Deprecated.usesetAudioSampleFormat(java.lang.String)instead.setAudioBitRate(long bit_rate) Sets the Audio bit ratesetAudioBitStreamFilter(String filter) setAudioFilter(String filter) Sets Audio FiltersetAudioQuality(double quality) setAudioSampleFormat(String sample_format) Sets the audio sample format.setBFrames(int bFrames) Sets the number of b-frames ffmpeg is allowed to use.setComplexFilter(String filter) setConstantRateFactor(double factor) setVideoBitRate(long bit_rate) setVideoBitStreamFilter(String filter) setVideoFilter(String filter) Sets Video FiltersetVideoPreset(String preset) Sets a video preset to use.setVideoQuality(double quality) Methods inherited from class net.bramp.ffmpeg.builder.AbstractFFmpegStreamBuilder
addExtraArgs, addFormatArgs, addMetaTag, addMetaTag, disableAudio, disableSubtitle, disableVideo, done, getFilename, getUri, isValidSize, setAudioChannels, setAudioCodec, setAudioPreset, setAudioSampleRate, setDuration, setFilename, setFormat, setFrames, setPassPaddingBitrate, setPreset, setPresetFilename, setStartOffset, setStrict, setSubtitleCodec, setSubtitlePreset, setTargetSize, setUri, setVideoCodec, setVideoCopyInkf, setVideoFrameRate, setVideoFrameRate, setVideoFrameRate, setVideoHeight, setVideoMovFlags, setVideoPixelFormat, setVideoResolution, setVideoResolution, setVideoWidth, useOptions, useOptions, useOptions, useOptions
-
Field Details
-
constantRateFactor
Deprecated.UsegetConstantRateFactor()instead -
audio_sample_format
Deprecated.UsegetAudioSampleFormat()instead -
audio_bit_rate
Deprecated.UsegetAudioBitRate()instead -
audio_quality
Deprecated.UsegetAudioQuality()instead -
audio_bit_stream_filter
Deprecated.UsegetVideoBitStreamFilter()instead -
audio_filter
Deprecated.UsegetAudioFilter()instead -
video_bit_rate
Deprecated.UsegetVideoBitRate()instead -
video_quality
Deprecated.UsegetVideoQuality()instead -
video_preset
Deprecated.UsegetVideoPreset()instead -
video_filter
Deprecated.UsegetVideoFilter()instead -
video_bit_stream_filter
Deprecated.UsegetVideoBitStreamFilter()instead -
bFrames
Specifies the number of b-frames ffmpeg is allowed to use. 0 will disable b-frames, null will let ffmpeg decide. -
complexFilter
-
-
Constructor Details
-
AbstractFFmpegOutputBuilder
public AbstractFFmpegOutputBuilder() -
AbstractFFmpegOutputBuilder
-
AbstractFFmpegOutputBuilder
-
-
Method Details
-
setConstantRateFactor
-
setVideoBitRate
-
setVideoQuality
-
setVideoBitStreamFilter
-
setVideoPreset
Sets a video preset to use.Uses `-vpre`.
- Parameters:
preset- the preset- Returns:
- this
-
setBFrames
Sets the number of b-frames ffmpeg is allowed to use. 0 means: Do not use b-frames at all- Parameters:
bFrames- number of b-frames- Returns:
- this
-
setVideoFilter
Sets Video FilterTODO Build a fluent Filter builder
- Parameters:
filter- The video filter.- Returns:
- this
-
setAudioBitDepth
@Deprecated @InlineMe(replacement="this.setAudioSampleFormat(bit_depth)") public final T setAudioBitDepth(String bit_depth) Deprecated.usesetAudioSampleFormat(java.lang.String)instead.Sets the audio bit depth.- Parameters:
bit_depth- The sample format, one of the net.bramp.ffmpeg.FFmpeg#AUDIO_DEPTH_* constants.- Returns:
- this
- See Also:
-
setAudioSampleFormat
Sets the audio sample format.- Parameters:
sample_format- The sample format, one of the net.bramp.ffmpeg.FFmpeg#AUDIO_FORMAT_* constants.- Returns:
- this
- See Also:
-
setAudioBitRate
Sets the Audio bit rate- Parameters:
bit_rate- Audio bitrate in bits per second.- Returns:
- this
-
setAudioQuality
-
setAudioBitStreamFilter
-
setComplexFilter
-
setAudioFilter
Sets Audio FilterTODO Build a fluent Filter builder
- Parameters:
filter- The audio filter.- Returns:
- this
-
buildOptions
Returns a representation of this Builder that can be safely serialised.NOTE: This method is horribly out of date, and its use should be rethought.
- Specified by:
buildOptionsin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>- Returns:
- A new EncodingOptions capturing this Builder's state
-
build
- Overrides:
buildin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>
-
build
Builds the arguments- Overrides:
buildin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>- Parameters:
parent- The parent FFmpegBuilderpass- The particular pass. For one-pass this value will be zero, for multi-pass, it will be 1 for the first pass, 2 for the second, and so on.- Returns:
- The arguments
-
formatDecimalInteger
Returns a double formatted as a string. If the double is an integer, then trailing zeros are striped.- Parameters:
d- the double to format.- Returns:
- The formatted double.
-
addGlobalFlags
protected void addGlobalFlags(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) - Overrides:
addGlobalFlagsin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>
-
addVideoFlags
protected void addVideoFlags(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) - Overrides:
addVideoFlagsin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>
-
addAudioFlags
- Overrides:
addAudioFlagsin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>
-
addSourceTarget
protected void addSourceTarget(int pass, com.google.common.collect.ImmutableList.Builder<String> args) - Specified by:
addSourceTargetin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>
-
getThis
- Specified by:
getThisin classAbstractFFmpegStreamBuilder<T extends AbstractFFmpegOutputBuilder<T>>
-
getConstantRateFactor
-
getAudioSampleFormat
-
getAudioBitRate
-
getAudioQuality
-
getAudioBitStreamFilter
-
getAudioFilter
-
getVideoBitRate
-
getVideoQuality
-
getVideoPreset
-
getVideoFilter
-
getVideoBitStreamFilter
-
getComplexFilter
-
getAudioBitRate()instead