Package ws.schild.jave.encode
Class VideoAttributes
java.lang.Object
ws.schild.jave.encode.VideoAttributes
- All Implemented Interfaces:
Serializable
Attributes controlling the video encoding process.
- Author:
- Carlo Pelliccia
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis value can be set in the codec field to perform a direct stream copy, without re-encoding of the audio stream. -
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.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
-
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:
-
-
Constructor Details
-
VideoAttributes
public VideoAttributes()
-
-
Method Details
-
getCodec
Returns the codec name for the encoding process.- Returns:
- The codec name for the encoding process.
-
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
Returns the the forced tag/fourcc value for the video stream.- Returns:
- The the forced tag/fourcc value for the video stream.
-
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
Returns the bitrate value for the encoding process.- Returns:
- The bitrate value for the encoding process.
-
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
Returns the frame rate value for the encoding process.- Returns:
- The frame rate value for the encoding process.
-
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
Returns the video size for the encoding process.- Returns:
- The video size for the encoding process.
-
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
- Returns:
- the quality
-
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
-
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
Get the quality for constant quality mode.- Returns:
- the crf
-
setPreset
set the quality fromPresetEnum- Parameters:
preset-- Returns:
- this instance
-
getPreset
Get the preset.- Returns:
- the preset
-