Package net.bramp.ffmpeg.builder
Class FFmpegOutputBuilder
java.lang.Object
net.bramp.ffmpeg.builder.AbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
net.bramp.ffmpeg.builder.FFmpegOutputBuilder
Builds a representation of a single output/encoding setting
-
Field Summary
FieldsModifier and TypeFieldDescriptionlonglongFields inherited from class net.bramp.ffmpeg.builder.AbstractFFmpegStreamBuilder
audio_channels, audio_codec, audio_enabled, audio_preset, audio_sample_rate, 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
ConstructorsModifierConstructorDescriptionprotectedFFmpegOutputBuilder(FFmpegBuilder parent, String filename) protectedFFmpegOutputBuilder(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 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.protected FFmpegOutputBuildergetThis()setAudioBitDepth(String bit_depth) Deprecated.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.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, 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
-
audio_sample_format
-
audio_bit_rate
-
audio_quality
-
audio_bit_stream_filter
-
audio_filter
-
video_bit_rate
-
video_quality
-
video_preset
-
video_filter
-
video_bit_stream_filter
-
-
Constructor Details
-
FFmpegOutputBuilder
public FFmpegOutputBuilder() -
FFmpegOutputBuilder
-
FFmpegOutputBuilder
-
-
Method Details
-
setConstantRateFactor
-
setVideoBitRate
-
setVideoQuality
-
setVideoBitStreamFilter
-
setVideoPreset
Sets a video preset to use.Uses `-vpre`.
- Parameters:
preset- the preset- Returns:
- this
-
setVideoFilter
Sets Video FilterTODO Build a fluent Filter builder
- Parameters:
filter- The video filter.- Returns:
- this
-
setAudioBitDepth
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
-
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<FFmpegOutputBuilder>- Returns:
- A new EncodingOptions capturing this Builder's state
-
build
- Overrides:
buildin classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
build
Builds the arguments- Overrides:
buildin classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>- 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<FFmpegOutputBuilder>
-
addVideoFlags
protected void addVideoFlags(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) - Overrides:
addVideoFlagsin classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
addAudioFlags
- Overrides:
addAudioFlagsin classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
getThis
- Specified by:
getThisin classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
setAudioSampleFormat(java.lang.String)instead.