public class CropParam
extends java.lang.Object
Constructor and Description |
---|
CropParam() |
Modifier and Type | Method and Description |
---|---|
int |
getCrf()
Gets the CRF value.
|
Rect |
getCropRect()
Gets the crop rectangle.
|
long |
getEndTime()
Gets the end time of cropping.
|
long |
getEndTime(java.util.concurrent.TimeUnit timeUnit)
Gets the end time of cropping.
|
int |
getFillColor()
Gets the fill color.
|
int |
getFrameRate()
Gets the frame rate.
|
int |
getGop()
Gets the GOP size.
|
java.lang.String |
getInputPath()
Gets the video file path.
|
MediaType |
getMediaType()
Gets the media type.
|
int |
getOutputHeight()
Gets the output height.
|
java.lang.String |
getOutputPath()
Gets the video output path.
|
int |
getOutputWidth()
Gets the output width.
|
VideoQuality |
getQuality()
Gets the video quality.
|
VideoDisplayMode |
getScaleMode()
Gets the video display mode.
|
long |
getStartTime()
Gets the start time of cropping.
|
long |
getStartTime(java.util.concurrent.TimeUnit timeUnit)
Gets the start time of cropping.
|
int |
getvideobitrate()
Gets the bitrate.
|
VideoCodecs |
getVideoCodec()
Gets the encoder.
|
java.lang.String |
getVideoPath()
Deprecated.
|
boolean |
isUseGPU()
Deprecated.
|
void |
setCrf(int crf)
Sets the CRF value.
|
void |
setCropRect(Rect cropRect)
Sets the crop rectangle.
|
void |
setEndTime(long endTime)
Sets the end time of cropping.
|
void |
setEndTime(long endTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the end time of cropping.
|
void |
setFillColor(int fillColor)
Sets the fill color.
|
void |
setFrameRate(int frameRate)
Sets the frame rate.
|
void |
setGop(int gop)
Sets the GOP size.
|
void |
setInputPath(java.lang.String inputPath)
Sets the video file path.
|
void |
setMediaType(MediaType mediaType)
Sets the media type.
|
void |
setOutputHeight(int outputHeight)
Sets the output height.
|
void |
setOutputPath(java.lang.String outputPath)
Sets the video output path.
|
void |
setOutputWidth(int outputWidth)
Sets the output width.
|
void |
setQuality(VideoQuality quality)
Sets the video quality.
|
void |
setScaleMode(VideoDisplayMode scaleMode)
Sets the video display mode.
|
void |
setStartTime(long startTime)
Sets the start time of cropping.
|
void |
setStartTime(long startTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the start time of cropping.
|
void |
setUseGPU(boolean useGPU)
Deprecated.
|
void |
setVideoBitrate(int bitrate)
Sets the bitrate.
|
void |
setVideoCodec(VideoCodecs videoCodec)
Sets the encoder.
|
void |
setVideoPath(java.lang.String inputPath)
Deprecated.
|
public VideoQuality getQuality()
public void setQuality(VideoQuality quality)
quality
- public void setVideoBitrate(int bitrate)
bitrate
- public int getvideobitrate()
public int getFrameRate()
public void setFrameRate(int frameRate)
frameRate
- public int getGop()
public void setGop(int gop)
gop
- Unit: frames. The time interval between key frames is calculated by dividing the GOP size by the frame rate.public VideoDisplayMode getScaleMode()
VideoDisplayMode.FILL
, setCropRect(Rect)
is invalid.VideoDisplayMode
public void setScaleMode(VideoDisplayMode scaleMode)
scaleMode
- public java.lang.String getVideoPath()
getInputPath()
.public java.lang.String getInputPath()
public void setVideoPath(java.lang.String inputPath)
setInputPath(String)
.inputPath
- public void setInputPath(java.lang.String inputPath)
inputPath
- public java.lang.String getOutputPath()
public void setOutputPath(java.lang.String outputPath)
outputPath
- public int getOutputWidth()
public void setOutputWidth(int outputWidth)
outputWidth
- public int getOutputHeight()
public void setOutputHeight(int outputHeight)
outputHeight
- public long getStartTime()
public long getStartTime(java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
public void setStartTime(long startTime)
startTime
- Unit: microseconds.public void setStartTime(long startTime, java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
startTime
- timeUnit
- Time Unitpublic long getEndTime()
public long getEndTime(java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
public void setEndTime(long endTime)
endTime
- Unit: microseconds.public void setEndTime(long endTime, java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
endTime
- timeUnit
- Time Unitpublic Rect getCropRect()
public void setCropRect(Rect cropRect)
cropRect
- The size of the crop rectangle must not be larger than the video resolution.public MediaType getMediaType()
MediaType.ANY_AUDIO_TYPE
indicates audio. MediaType.ANY_IMAGE_TYPE
indicates images. MediaType.ANY_VIDEO_TYPE
indicates video.public void setMediaType(MediaType mediaType)
mediaType
- MediaType.ANY_AUDIO_TYPE
indicates audio. MediaType.ANY_IMAGE_TYPE
indicates images. MediaType.ANY_VIDEO_TYPE
indicates video.public int getFillColor()
@Deprecated public boolean isUseGPU()
@Deprecated public void setUseGPU(boolean useGPU)
public void setFillColor(int fillColor)
mScaleMode
is set to VideoDisplayMode.FILL
.fillColor
- 8位,按照ARGB的格式public VideoCodecs getVideoCodec()
public void setVideoCodec(VideoCodecs videoCodec)
videoCodec
- @see VideoCodecspublic int getCrf()
public void setCrf(int crf)
crf
- The quality setting of ffmpeg video. The lower the CRF value, the higher the video quality and the larger the file size. Default value: 23