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
Modifier and TypeFieldDescriptionlong
long
Fields 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
ModifierConstructorDescriptionprotected
FFmpegOutputBuilder
(FFmpegBuilder parent, String filename) protected
FFmpegOutputBuilder
(FFmpegBuilder parent, URI uri) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAudioFlags
(com.google.common.collect.ImmutableList.Builder<String> args) protected void
addGlobalFlags
(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) protected void
addVideoFlags
(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 String
formatDecimalInteger
(double d) Returns a double formatted as a string.protected FFmpegOutputBuilder
getThis()
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:
buildOptions
in classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
- Returns:
- A new EncodingOptions capturing this Builder's state
-
build
- Overrides:
build
in classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
build
Builds the arguments- Overrides:
build
in 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:
addGlobalFlags
in classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
addVideoFlags
protected void addVideoFlags(FFmpegBuilder parent, com.google.common.collect.ImmutableList.Builder<String> args) - Overrides:
addVideoFlags
in classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
addAudioFlags
- Overrides:
addAudioFlags
in classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
getThis
- Specified by:
getThis
in classAbstractFFmpegStreamBuilder<FFmpegOutputBuilder>
-
setAudioSampleFormat(java.lang.String)
instead.