Class VideoAttributes
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IntegerThe bitrate value for the encoding process.private StringThe codec name for the encoding process.private FilterGraphprivate IntegerSet the quality for constant quality mode.static final StringThis value can be set in the codec field to perform a direct stream copy, without re-encoding of the audio stream.private booleanEncode the video with faststart mode, default OFFprivate IntegerThe frame rate value for the encoding process.private Stringprivate StringThis option itemizes a range of choices from ultrafast (best speed) to placebo (best quality).private IntegerThe audio quality value for the encoding process.private static final longprivate VideoSizeThe video size for the encoding process.private StringThe the forced tag/fourcc value for the video stream.private TuneEnumprivate final ArrayList<VideoFilter> private VsyncMethodprivate X264_PROFILE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilter(VideoFilter videoFilter) Returns the bitrate value for the encoding process.getCodec()Returns the codec name for the encoding process.getCrf()Get the quality for constant quality mode.Returns the frame rate value for the encoding process.Get the preset.getSize()Returns the video size for the encoding process.getTag()Returns the the forced tag/fourcc value for the video stream.getTune()getVsync()booleansetBitRate(Integer bitRate) Sets the bitrate value for the encoding process.Sets the codec name for the encoding process.setComplexFiltergraph(FilterGraph complexFiltergraph) Set the quality for constant quality mode.setFaststart(boolean faststart) setFrameRate(Integer frameRate) Sets the frame rate value for the encoding process.setPixelFormat(String pixelFormat) set the quality fromPresetEnumsetQuality(Integer quality) The video quality value for the encoding process.Sets the video size for the encoding process.Sets the forced tag/fourcc value for the video stream.setVsync(VsyncMethod vsync) setX264Profile(X264_PROFILE x264Profile) toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
DIRECT_STREAM_COPY
This value can be set in the codec field to perform a direct stream copy, without re-encoding of the audio stream.- See Also:
-
codec
The codec name for the encoding process. If null or not specified the encoder will perform a direct stream copy. -
tag
The the forced tag/fourcc value for the video stream. -
bitRate
The bitrate value for the encoding process. If null or not specified a default value will be picked. -
frameRate
The frame rate value for the encoding process. If null or not specified a default value will be picked. -
size
The video size for the encoding process. If null or not specified the source video size will not be modified. -
quality
The audio quality value for the encoding process. If null or not specified the ffmpeg default will be used -
pixelFormat
-
vsync
-
complexFiltergraph
-
videoFilters
-
faststart
private boolean faststartEncode the video with faststart mode, default OFFThe mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 file has all the metadata about all packets stored in one location (written at the end of the file, it can be moved to the start for better playback by adding faststart to the movflags, or using the qt-faststart tool). A fragmented file consists of a number of fragments, where packets and metadata about these packets are stored together. Writing a fragmented file has the advantage that the file is decodable even if the writing is interrupted (while a normal MOV/MP4 is undecodable if it is not properly finished), and it requires less memory when writing very long files (since writing normal MOV/MP4 files stores info about every single packet in memory until the file is closed). The downside is that it is less compatible with other applications.
-
tune
-
x264Profile
-
crf
Set the quality for constant quality mode. The lower the value, the better the quality and the larger the file size. Reference Range:[0, 51] -
preset
This option itemizes a range of choices from ultrafast (best speed) to placebo (best quality).PresetEnum
-
-
Constructor Details
-
VideoAttributes
public VideoAttributes()
-
-
Method Details
-
getCodec
-
setCodec
Sets the codec name for the encoding process. If null or not specified the encoder will perform a direct stream copy.Be sure the supplied codec name is in the list returned by
Encoder.getVideoEncoders().A special value can be picked from
DIRECT_STREAM_COPY.- Parameters:
codec- The codec name for the encoding process.- Returns:
- this instance
-
getTag
-
setTag
Sets the forced tag/fourcc value for the video stream.- Parameters:
tag- The the forced tag/fourcc value for the video stream.- Returns:
- this instance
-
getBitRate
-
setBitRate
Sets the bitrate value for the encoding process. If null or not specified a default value will be picked.- Parameters:
bitRate- The bitrate value for the encoding process.- Returns:
- this instance
-
getFrameRate
-
setFrameRate
Sets the frame rate value for the encoding process. If null or not specified a default value will be picked.- Parameters:
frameRate- The frame rate value for the encoding process.- Returns:
- this instance
-
getSize
-
setSize
Sets the video size for the encoding process. If null or not specified the source video size will not be modified.- Parameters:
size- The video size for the encoding process.- Returns:
- this instance
-
isFaststart
public boolean isFaststart()- Returns:
- the faststart
-
getComplexFiltergraph
-
setComplexFiltergraph
-
addFilter
-
getVideoFilters
-
setFaststart
- Parameters:
faststart- the faststart to set- Returns:
- this instance
-
getQuality
-
setQuality
The video quality value for the encoding process. If null or not specified the ffmpeg default will be used- Parameters:
quality- the quality to set- Returns:
- this instance
-
getPixelFormat
-
setPixelFormat
-
getVsync
-
setVsync
-
toString
-
getTune
-
setTune
- Parameters:
tune- the TuneEnum to set- Returns:
- this instance
-
getX264Profile
- Returns:
- the x264Profile
-
setX264Profile
- Parameters:
x264Profile- the x264Profile to set- Returns:
- this instance
-
setCrf
Set the quality for constant quality mode.- Parameters:
crf- the crf to set- Returns:
- this instance
-
getCrf
-
setPreset
set the quality fromPresetEnum- Parameters:
preset-- Returns:
- this instance
-
getPreset
-