Package ws.schild.jave
Class VideoAttributes
- java.lang.Object
-
- ws.schild.jave.VideoAttributes
-
- All Implemented Interfaces:
java.io.Serializable
public class VideoAttributes extends java.lang.Object implements java.io.SerializableAttributes controlling the video encoding process.- Author:
- Carlo Pelliccia
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVideoAttributes.X264_PROFILE
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDIRECT_STREAM_COPYThis value can be setted in the codec field to perform a direct stream copy, without re-encoding of the audio stream.
-
Constructor Summary
Constructors Constructor Description VideoAttributes()
-
Method Summary
Modifier and Type Method Description voidaddFilter(VideoFilter videoFilter)java.lang.IntegergetQuality()java.util.ArrayList<VideoFilter>getVideoFilters()VideoAttributes.X264_PROFILEgetX264Profile()booleanisFaststart()voidsetBitRate(java.lang.Integer bitRate)Sets the bitrate value for the encoding process.voidsetCodec(java.lang.String codec)Sets the codec name for the encoding process.voidsetFaststart(boolean faststart)voidsetFrameRate(java.lang.Integer frameRate)Sets the frame rate value for the encoding process.voidsetQuality(java.lang.Integer quality)The video quality value for the encoding process.voidsetSize(VideoSize size)Sets the video size for the encoding process.voidsetTag(java.lang.String tag)Sets the forced tag/fourcc value for the video stream.voidsetX264Profile(VideoAttributes.X264_PROFILE x264Profile)java.lang.StringtoString()
-
-
-
Field Detail
-
DIRECT_STREAM_COPY
public static final java.lang.String DIRECT_STREAM_COPY
This value can be setted in the codec field to perform a direct stream copy, without re-encoding of the audio stream.- See Also:
- Constant Field Values
-
-
Method Detail
-
getX264Profile
public VideoAttributes.X264_PROFILE getX264Profile()
- Returns:
- the x264Profile
-
setX264Profile
public void setX264Profile(VideoAttributes.X264_PROFILE x264Profile)
- Parameters:
x264Profile- the x264Profile to set
-
setCodec
public void setCodec(java.lang.String codec)
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 byEncoder.getVideoEncoders(). A special value can be picked fromDIRECT_STREAM_COPY.- Parameters:
codec- The codec name for the encoding process.
-
setTag
public void setTag(java.lang.String tag)
Sets the forced tag/fourcc value for the video stream.- Parameters:
tag- The the forced tag/fourcc value for the video stream.
-
setBitRate
public void setBitRate(java.lang.Integer bitRate)
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.
-
setFrameRate
public void setFrameRate(java.lang.Integer frameRate)
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.
-
setSize
public void setSize(VideoSize size)
Sets the video size for the encoding process. If null or not specified the source video size will not be modified.- Parameters:
size- he video size for the encoding process.
-
isFaststart
public boolean isFaststart()
- Returns:
- the faststart
-
addFilter
public void addFilter(VideoFilter videoFilter)
-
getVideoFilters
public java.util.ArrayList<VideoFilter> getVideoFilters()
-
setFaststart
public void setFaststart(boolean faststart)
- Parameters:
faststart- the faststart to set
-
getQuality
public java.lang.Integer getQuality()
- Returns:
- the quality
-
setQuality
public void setQuality(java.lang.Integer quality)
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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-