public interface AliyunIEditor
Modifier and Type | Method and Description |
---|---|
int |
addAnimationFilter(EffectFilter filter)
Deprecated.
v3.27.0废弃,请使用
addAnimationFilter(TrackEffectFilter) 代替 |
int |
addAnimationFilter(TrackEffectFilter filter)
添加动效滤镜,同一个时间区间内只能有一个动效滤镜,如果添加两个时间冲突了,则冲突的时间段,新添加的会覆盖之前添加的
|
int |
addFrameAnimation(ActionBase action)
对指定的流或者素材资源添加帧动画
|
int |
addImage(EffectPicture picture)
Deprecated.
v3.27.0废弃,请使用
getPasterManager() 的com.aliyun.svideosdk.editor.impl.AliyunPasterControllerImage 代替 |
int |
addRunningDisplayMode(VideoDisplayMode mode,
int streamId,
long startTimeMills,
long durationMills)
Deprecated.
|
int |
addTailWaterMark(java.lang.String imagePath,
float sizeX,
float sizeY,
float posX,
float posY,
long durationUs)
添加片尾
|
int |
addTailWaterMark(TrackEffectWaterMark trackEffectWaterMark,
long duration,
java.util.concurrent.TimeUnit timeUnit)
添加片尾
|
int |
applyAudioEffect(int id,
AudioEffectType type,
int weight)
增加音效
如果素材无音轨,该接口返回成功,但是没有效果
|
int |
applyBlurBackground(int streamId,
long startTimeMills,
long durationMills,
float blurRadius)
添加模糊背景
|
int |
applyDub(EffectBean effect)
Deprecated.
v3.27.0已废弃,请使用
applyDub(TrackAudioStream) 代替 |
int |
applyDub(TrackAudioStream effectStream)
使用配音效果
音乐作用时间可以选择,时间设置
|
int |
applyFilter(EffectBean effect)
Deprecated.
v3.27.0废弃,请使用
applyFilter(TrackEffectFilter) 代替 |
int |
applyFilter(TrackEffectFilter effectFilter)
使用滤镜效果
|
int |
applyLutFilter(LUTEffectBean effect)
v3.27.0 版本新增
|
int |
applyMusic(EffectBean effect)
Deprecated.
v3.27.0已废弃,请使用
applyMusic(TrackAudioStream) 代替 |
int |
applyMusic(TrackAudioStream effectStream)
使用music效果
音乐作用时间可以选择,时间设置
|
int |
applyMusicMixWeight(int id,
int weight)
Deprecated.
|
int |
applyMusicWeight(int id,
int weight)
单独设置某一路音频音量权重(包含素材流和主流)
|
int |
applyMV(EffectBean effect)
Deprecated.
v3.27.0废弃,请使用
applyMV(TrackEffectMV) 代替 |
int |
applyMV(TrackEffectMV effect)
使用mv效果
|
int |
applySourceChange()
执行流改变的操作,该操作会导致编辑的视频重新播放
|
int |
applyWaterMark(java.lang.String imgPath,
float sizeX,
float sizeY,
float posX,
float posY)
使用水印特效,如果需要使用文字水印,可以通过Bitmap工具把文字转成水印
|
int |
applyWaterMark(TrackEffectWaterMark trackEffectWaterMark)
使用水印特效,如果需要使用文字水印,可以通过Bitmap工具把文字转成水印
|
int |
audioEffect(int id,
AudioEffectType type,
int weight)
Deprecated.
v3.27.0废弃,请使用
applyAudioEffect(int, AudioEffectType, int) 代替 |
int |
cancelCompose()
取消合成
|
void |
clearAllAnimationFilter()
移除所有动效滤镜
|
int |
compose(AliyunVideoParam param,
java.lang.String outputPath,
AliyunIComposeCallBack callback)
合成
|
AliyunPasterManager |
createPasterManager()
Deprecated.
v3.27.0废弃,请使用
getPasterManager() 代替 |
AliyunRollCaptionComposer |
createRollCaptionComposer()
创建翻转字幕composer,负责编排一组字幕自动生成动画效果
v3.20.0 新增
|
int |
deleteBlurBackground(int streamId,
int id)
删除模糊背景
|
int |
deleteTimeEffect(int id)
删除时间特效
|
int |
denoise(int id,
boolean needDenoise)
Deprecated.
|
int |
denoise(int id,
int denoiseWeight)
降低指定音频流的噪声,0~100,0表示关闭降噪,100表示降噪能力最强
|
int |
draw(long time)
强制绘制指定时间点的帧,需要在pause状态下调用,如果当前状态不是pause,会强制调用pause
|
int |
draw(long time,
java.util.concurrent.TimeUnit timeUnit)
强制绘制指定时间点的帧,需要在pause状态下调用,如果当前状态不是pause,会强制调用pause
|
AliyunLogInfo |
getAliyunLogInfo()
获取打点数据
|
long |
getClipStartTime(int clipIndex) |
Bitmap |
getCurrentFrame()
获取当前帧图片数据,推荐在子线程中调用
v3.25.0 新增
|
long |
getCurrentPlayPosition()
获取当前播放位置(受时间特效影响的),注意,时间单位为微秒
推荐使用新接口
AliyunIPlayerController.getCurrentPlayPosition() ,不过注意:新接口的时间单位是毫秒 |
long |
getCurrentStreamPosition()
获取当前流的位置(不受时间特效影响的),注意,时间单位为微秒
推荐使用新接口
AliyunIPlayerController.getCurrentStreamPosition() ,不过注意:新接口的时间单位是毫秒 |
long |
getDuration()
获取播放时长,注意,时间单位为微秒
推荐使用新接口
AliyunIPlayerController.getDuration() ,不过注意:新接口的时间单位是毫秒 |
AliyunEditorProject |
getEditorProject()
v3.23.0 版本新增
|
int |
getFilterLastApplyId()
获取上次使用的滤镜特效的id,如果有设置的话。仅用于保存和恢复
|
int |
getMusicLastApplyId()
获取上次使用的音乐特效的id,如果有设置的话,仅用于保存和恢复
|
int |
getMVLastApplyId()
获取上次使用的mv特效的id,如果有设置的话,仅用于保存和恢复
|
Paint |
getPaintLastApply()
获取上次使用的涂鸦的画笔,如果有设置的话,仅用于保存和恢复
|
AliyunPasterManager |
getPasterManager()
获取贴图manager,负责贴图的添加渲染
|
AliyunPasterRender |
getPasterRender()
Deprecated.
v3.27.0废弃,请使用
getPasterManager() 代替 |
AliyunIPipManager |
getPipManager()
v3.25.0 新增
|
AliyunIPlayerController |
getPlayerController()
获取播放控制器
|
AliyunIProjectInfo |
getProjectInfo()
获取project中的资源信息
|
int |
getRotation()
获取视频旋转度
|
AliyunISourcePartManager |
getSourcePartManager()
获取编辑的流片段管理,可以实现对流片段的修改,删除,添加,获取操作
|
long |
getStreamDuration()
获取视频流时长,注意,时间单位为微秒
推荐使用新接口
AliyunIPlayerController.getStreamDuration() ,不过注意:新接口的时间单位是毫秒 |
TimeEffectType |
getTimeEffect()
获取时间特效
|
int |
getVideoHeight()
获取视频高度
|
int |
getVideoWidth()
获取视频宽度
|
int |
init(SurfaceView surfaceView,
Context context)
初始化
|
int |
init(SurfaceView surfaceView,
Context context,
int surfaceWidth,
int surfaceHeight)
初始化
|
int |
invert()
全部倒播(对于某些条件不符合的视频,可能需要调用转码流程来获取比较好的效果)
|
boolean |
isAudioSilence()
获取是否处于静音状态
|
boolean |
isPaused()
状态获取,是否暂停
|
boolean |
isPlaying()
Gets whether playback is in progress.
|
AliyunICanvasController |
obtainCanvasController(Context context,
int w,
int h)
获取涂鸦控制器
|
void |
onDestroy()
生命周期调用
|
int |
pause()
暂停播放
|
int |
play()
开始播放
|
int |
rate(float rate,
long startTimeMills,
long durationMills,
boolean needOriginDuration)
播放速率
|
void |
removeAnimationFilter(EffectFilter filter)
Deprecated.
v3.27.0废弃,请使用
removeAnimationFilter(TrackEffectFilter) 代替 |
void |
removeAnimationFilter(TrackEffectFilter filter)
移除动效滤镜
|
int |
removeAudioEffect(int id,
AudioEffectType type)
删除某个音效
|
int |
removeAudioFadeIn(int id)
v3.20 新增
|
int |
removeAudioFadeOut(int id)
v3.20 新增
|
int |
removeDub(EffectBean effect)
Deprecated.
v3.27.0已废弃,请使用
removeDub(TrackAudioStream) 代替 |
int |
removeDub(TrackAudioStream effectStream)
移除配音特效
|
int |
removeFilter()
移除滤镜效果
|
int |
removeFrameAnimation(ActionBase action)
删除指定的帧动画
|
void |
removeImage(EffectPicture picture)
Deprecated.
v3.27.0废弃,请使用
getPasterManager() 的com.aliyun.svideosdk.editor.impl.AliyunPasterControllerImage 代替 |
int |
removeMusic(EffectBean effect)
Deprecated.
v3.27.0已废弃,请使用
removeMusic(TrackAudioStream) 代替 |
int |
removeMusic(TrackAudioStream effectStream)
移除音乐特效
|
int |
removeRunningDisplayMode(int streamId,
int id)
Deprecated.
|
int |
repeat(int times,
long startTimeMills,
long durationMills,
boolean needOriginDuration)
重复播放(对于某些条件不符合的视频,可能需要调用转码流程来获取比较好的效果)
|
int |
replay()
重新开始播放
|
int |
resetEffect(EffectType effectType)
重置特效
|
int |
resetVideoAugmentation(int streamId,
VideoAugmentationType type)
v3.19.0 版本新增
|
int |
resume()
恢复播放
|
int |
saveEffectToLocal()
将所有特效持久化到本地文件
如果要使用AliyunICompose接口合成,必须通过该接口将特效配置持久化到本地文件中
|
int |
seek(long time)
seek到某个时间点
|
int |
seek(long time,
java.util.concurrent.TimeUnit timeUnit)
seek到某个时间点
|
void |
setAnimationRestoredListener(OnAnimationFilterRestored li)
Deprecated.
|
int |
setAudioFadeIn(int id,
ShapeType shapeType,
long duration)
v3.20 新增
|
int |
setAudioFadeOut(int id,
ShapeType shapeType,
long duration)
v3.20 新增
|
void |
setAudioSilence(boolean silence)
设置静音状态,该接口只对播放模式下有效,合成视频无法静音
|
int |
setDisplayMode(VideoDisplayMode mode)
设置视频展示模式
|
int |
setDisplayView(SurfaceView surfaceView)
更新显示的窗口,必须在
init(SurfaceView, Context) 成功之后调用 |
int |
setDisplayView(TextureView textureView)
更新显示的窗口,必须在
init(SurfaceView, Context) 成功之后调用,没有特殊需求不建议用TextureView |
int |
setFillBackgroundColor(int color)
设置填充颜色,只有在
setDisplayMode(VideoDisplayMode) 为VideoDisplayMode.FILL 时才有效 |
int |
setHorizontalFlip(int streamId,
boolean flip)
v3.31.0 版本新增
|
void |
setMonitorSurfaceChange(boolean monitor)
设置是否需要监听surface的变化,必须在
init(SurfaceView, Context) 之前设置,否则设置无效 |
void |
setOnAnimationRestoredListener(OnAnimationFilterRestoredListener li)
设置动效滤镜恢复的回调,用于开发者恢复对应的UI,如果是草稿箱情况下,要恢复UI,需要在
init(SurfaceView, Context)
之前设置该回调,因为init(SurfaceView, Context) 内部会执行动效滤镜恢复逻辑 |
void |
setOutputPath(java.lang.String path)
设置输出路径
|
int |
setTransition(int index,
TransitionBase transition)
设置视频过渡动画时间长度,接口说明:指定视频索引添加过渡时长,当索引为0时为第一段视频添加过渡时长,
此时过渡动画将从第一段的开头起算,只在第一段视频开头起作用,不会影响其他视频段。
当索引大于0且不大于视频总数时,该过渡时间作用于上一段视频的结束和本段视频的开始,
即上一段视频的结尾和本段视频的开头重叠在一起,重叠的时间长度为该过渡时长。
因为sdk音频混流的限制,过渡时间长度最大不能超过最小时长视频时间长度的一半。保证过渡时间内只有两个视频在播放状态
|
int |
setTransition(java.util.Map<java.lang.Integer,TransitionBase> transitions)
设置视频过渡动画时间长度,接口说明:指定视频索引添加过渡时长,当索引为0时为第一段视频添加过渡时长,
此时过渡动画将从第一段的开头起算,只在第一段视频开头起作用,不会影响其他视频段。
当索引大于0且不大于视频总数时,该过渡时间作用于上一段视频的结束和本段视频的开始,
即上一段视频的结尾和本段视频的开头重叠在一起,重叠的时间长度为该过渡时长。
因为sdk音频混流的限制,过渡时间长度最大不能超过最小时长视频时间长度的一半。保证过渡时间内只有两个视频在播放状态
|
int |
setVideoAugmentation(int streamId,
VideoAugmentationType type,
float value)
v3.19.0 版本新增
|
int |
setVolume(int volume)
设置音量
|
int |
stop()
停止播放
|
int |
updateAnimationFilter(EffectFilter filter)
Deprecated.
v3.27.0废弃,请使用
updateAnimationFilter(TrackEffectFilter) 代替 |
int |
updateAnimationFilter(TrackEffectFilter filter)
更新动效滤镜参数,同一个时间区间内只能有一个动效滤镜,如果添加两个时间冲突了,则冲突的时间段,新添加的会覆盖之前添加的
|
int |
updateCaption(AliyunCaption caption)
v3.27.0 版本新增
|
void |
updateCover(Source source)
v3.25.0 版本新增
|
int |
updateTransition(int clipIndex,
TransitionBase transitionBase)
更新自定义转场对象,接口说明:指定视频索引添加过渡时长,当索引为0时为第一段视频添加过渡时长,
此时过渡动画将从第一段的开头起算,只在第一段视频开头起作用,不会影响其他视频段。
当索引大于0且不大于视频总数时,该过渡时间作用于上一段视频的结束和本段视频的开始,
即上一段视频的结尾和本段视频的开头重叠在一起,重叠的时间长度为该过渡时长。
因为sdk音频混流的限制,过渡时间长度最大不能超过最小时长视频时间长度的一半。保证过渡时间内只有两个视频在播放状态
|
java.lang.String |
version()
获取版本号
|
void setMonitorSurfaceChange(boolean monitor)
init(SurfaceView, Context)
之前设置,否则设置无效monitor
- int init(SurfaceView surfaceView, Context context)
surfaceView
- AliyunErrorCode.ERROR_PROJECT_NULL
AliyunErrorCode.ERROR_LICENSE_FAILED
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_INIT_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_CREATE_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_RE_CREATE
AliyunEditorErrorCode.SVIDEO_EDITOR_SET_DISPLAY_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_MUXER_ERROR_CREAT_OUTPUT
AliyunEditorErrorCode.ALIVC_FRAMEWORK_MUXER_ERROR_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_MUXER_ERROR_INVALIDATE_PARAM
AliyunEditorErrorCode.ALIVC_FRAMEWORK_MUXER_ERROR_FIND_ENCODER
AliyunEditorErrorCode.ALIVC_FRAMEWORK_MUXER_ERROR_NEW_STREAM
AliyunEditorErrorCode.ALIVC_FRAMEWORK_VIDEO_ENCODER_CREATE_ENCODER_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_VIDEO_ENCODER_ERROR_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_ENCODER_ERROR_INPUT
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_ENCODER_WIDTHOUT_MATCH_ENCODER
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_ENCODER_ERROR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_EDITORLAYOUT_INVALID_SIZE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_RENDER_INIT_SPEAKER_FAILED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
导入编辑流程下,导入接口未设置输出分辨率,或者设置的分辨率不合法int init(SurfaceView surfaceView, Context context, int surfaceWidth, int surfaceHeight)
surfaceView
- context
- surfaceWidth
- surfaceHeight
- int setDisplayView(SurfaceView surfaceView)
init(SurfaceView, Context)
成功之后调用surfaceView
- AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
-没有初始化成功
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
-surfaceView 为空int setDisplayView(TextureView textureView)
init(SurfaceView, Context)
成功之后调用,没有特殊需求不建议用TextureViewtextureView
- AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
-没有初始化成功
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
-surfaceView 为空AliyunIPlayerController getPlayerController()
v3.27.0新增
AliyunIPlayerController
int play()
int replay()
int seek(long time)
time
- 时间,单位:微秒AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_IN_OFFSET
AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_SEEK_FAILED
int seek(long time, java.util.concurrent.TimeUnit timeUnit)
v3.27.0新增
time
- 时间点AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_IN_OFFSET
AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_SEEK_FAILED
int draw(long time)
time
- 时间,单位:微秒AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
int draw(long time, java.util.concurrent.TimeUnit timeUnit)
v3.27.0新增
time
- 时间AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
Bitmap getCurrentFrame()
int pause()
int resume()
int stop()
long getCurrentStreamPosition()
AliyunIPlayerController.getCurrentStreamPosition()
,不过注意:新接口的时间单位是毫秒long getCurrentPlayPosition()
AliyunIPlayerController.getCurrentPlayPosition()
,不过注意:新接口的时间单位是毫秒long getStreamDuration()
AliyunIPlayerController.getStreamDuration()
,不过注意:新接口的时间单位是毫秒long getDuration()
AliyunIPlayerController.getDuration()
,不过注意:新接口的时间单位是毫秒boolean isPlaying()
boolean isPaused()
int getVideoWidth()
int getVideoHeight()
int getRotation()
boolean isAudioSilence()
void setAudioSilence(boolean silence)
silence
- true 设置为静音状态 false 消除静音状态int setVolume(int volume)
volume
- 音量值为[0,100],为0则静音,100则音量最大,默认音量值是50AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_CTL_INPUT_ERROR
int setDisplayMode(VideoDisplayMode mode)
@Deprecated int addRunningDisplayMode(VideoDisplayMode mode, int streamId, long startTimeMills, long durationMills)
setDisplayMode(VideoDisplayMode)
设置的模式,
时间段外,依然采用setDisplayMode(VideoDisplayMode)
所设置的模式mode
- streamId
- 流ID,指定添加到哪个流上startTimeMills
- 传stream time 单位:毫秒durationMills
- 传stream duration 单位:毫秒@Deprecated int removeRunningDisplayMode(int streamId, int id)
streamId
- 流ID,指定移除某个流上的效果id
- 效果id,由 addRunningDisplayMode(VideoDisplayMode, int, long, long)
返回int setFillBackgroundColor(int color)
setDisplayMode(VideoDisplayMode)
为VideoDisplayMode.FILL
时才有效color
- 背景颜色值,8位int型,格式为ARGBAliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
setDisplayMode(VideoDisplayMode)
,
VideoDisplayMode
@Deprecated int applyFilter(EffectBean effect)
applyFilter(TrackEffectFilter)
代替effect
- 特效资源的路径及ID,设置为null表示移除滤镜AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
int applyFilter(TrackEffectFilter effectFilter)
v3.27.0新增
effect
- 特效资源的路径及ID,设置为null表示移除滤镜AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
int removeFilter()
v3.27.0新增
@Deprecated int applyMV(EffectBean effect)
applyMV(TrackEffectMV)
代替effect
- 特效资源的路径及ID,设置为null表示移除MV效果,接口调用完成之后,mv的音频流id可以通过EffectBean.getMvAudioId()
来获取AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunErrorCode.ERROR_LICENSE_FAILED
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
int applyMV(TrackEffectMV effect)
v3.27.0新增
effect
- 特效资源的路径及ID,设置为null表示移除MV效果,接口调用完成之后,mv的音频流id可以通过EffectBean.getMvAudioId()
来获取AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunErrorCode.ERROR_LICENSE_FAILED
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
int applyWaterMark(java.lang.String imgPath, float sizeX, float sizeY, float posX, float posY)
imgPath
- 水印图片路径sizeX
- sizeY
- posX
- posY
- AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED
int applyWaterMark(TrackEffectWaterMark trackEffectWaterMark)
v3.27.0新增
imgPath
- 水印实体类AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED
TrackEffectWaterMark
@Deprecated int addImage(EffectPicture picture)
getPasterManager()
的com.aliyun.svideosdk.editor.impl.AliyunPasterControllerImage
代替picture
- Bitmap及相关显示参数,x,y,w,h都是相对于显示范围的比例值AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunErrorCode.ERROR_TRES_PLAYER_UNPREPARED
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunErrorCode.ERROR_PARAM_IMAGE_FILE_PATH_INVALID
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.SVIDEO_EDITOR_VIEW_TYPE_NOT_SUPPORTED
@Deprecated void removeImage(EffectPicture picture)
getPasterManager()
的com.aliyun.svideosdk.editor.impl.AliyunPasterControllerImage
代替@Deprecated int addAnimationFilter(EffectFilter filter)
addAnimationFilter(TrackEffectFilter)
代替filter
- AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunErrorCode.ERROR_INVALID_ARGUMENTS
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
int addAnimationFilter(TrackEffectFilter filter)
v3.27.0新增
filter
- AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunErrorCode.ERROR_INVALID_ARGUMENTS
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
@Deprecated int updateAnimationFilter(EffectFilter filter)
updateAnimationFilter(TrackEffectFilter)
代替filter
- AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunErrorCode.ERROR_INVALID_ARGUMENTS
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
int updateAnimationFilter(TrackEffectFilter filter)
v3.27.0新增
filter
- AliyunErrorCode.ERROR_EFFECT_USE_FAILED
AliyunErrorCode.ERROR_INVALID_ARGUMENTS
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
int addFrameAnimation(ActionBase action)
action
- ActionBase
int removeFrameAnimation(ActionBase action)
action
- @Deprecated void removeAnimationFilter(EffectFilter filter)
removeAnimationFilter(TrackEffectFilter)
代替filter
- void removeAnimationFilter(TrackEffectFilter filter)
v3.27.0新增
filter
- void clearAllAnimationFilter()
@Deprecated int applyMusic(EffectBean effect)
applyMusic(TrackAudioStream)
代替effect
- 特效资源的路径及IDAliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
EffectBean
int applyMusic(TrackAudioStream effectStream)
v3.27.0新增,用于替代旧接口applyMusic(EffectBean)
,可使用EffectBean.toTrackAudioStream()
转化成TrackAudioStream
effectStream
- 特效资源的路径及IDAliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
TrackAudioStream
@Deprecated int applyDub(EffectBean effect)
applyDub(TrackAudioStream)
代替effect
- 特效资源的路径及IDAliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
EffectBean
int applyDub(TrackAudioStream effectStream)
v3.27.0新增,用于替代旧接口applyDub(EffectBean)
,可使用EffectBean.toTrackAudioStream()
转化成TrackAudioStream
effectStream
- 特效资源的路径及IDAliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
TrackAudioStream
@Deprecated int removeMusic(EffectBean effect)
removeMusic(TrackAudioStream)
代替effect
- AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
EffectBean
int removeMusic(TrackAudioStream effectStream)
v3.27.0新增,用于替代旧接口removeMusic(EffectBean)
,可使用EffectBean.toTrackAudioStream()
转化成TrackAudioStream
effectStream
- AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
EffectBean
@Deprecated int removeDub(EffectBean effect)
removeDub(TrackAudioStream)
代替effect
- AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
TrackAudioStream
int removeDub(TrackAudioStream effectStream)
v3.27.0新增,用于替代旧接口removeDub(EffectBean)
,可使用EffectBean.toTrackAudioStream()
转化成TrackAudioStream
effectStream
- AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
TrackAudioStream
int getFilterLastApplyId()
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
int getMVLastApplyId()
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
int getMusicLastApplyId()
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
Paint getPaintLastApply()
@Deprecated int applyMusicMixWeight(int id, int weight)
id
- 流id 可以通过EffectBean.getId()
获取weight
- 取值 【0, 100】,实际上内部的区间是[0,10]所以如果外部传入53或者59,效果是一样的,因为内部对应的都是5AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
int applyMusicWeight(int id, int weight)
id
- 流id 可以通过EffectBean.getId()
获取,如果是调整原音则可以通过getSourcePartManager()
,先获取
片段管理器com.aliyun.svideosdk.common.impl.AliyunClipConstructor
,然后通过com.aliyun.svideosdk.common.impl.AliyunClipConstructor#getAllClips()
获取到片段列表,遍历列表,通过AliyunClip.getId()
拿到主流每个片段的流ID,然后用这些流ID,分别设置每个片段的音量比重。weight
- 取值 【0,100】,实际上内部的区间是[0,10]所以如果外部传入53或者59,效果是一样的,因为内部对应的都是5AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
@Deprecated int denoise(int id, boolean needDenoise)
降低指定音频流的噪声(v3.19.0以后已废弃)
请用 #denoise(int,int)代替
id
- 音频流idneedDenoise
- 是否需要去噪,比如开了之后需要关闭,再调用一次,传入falseint denoise(int id, int denoiseWeight)
降低指定音频流的噪声,0~100,0表示关闭降噪,100表示降噪能力最强
v3.19.0 新增
id
- 音频流iddenoiseWeight
- 0表示关闭降噪,100表示降噪能力最强@Deprecated AliyunPasterManager createPasterManager()
getPasterManager()
代替AliyunPasterManager
AliyunPasterManager getPasterManager()
v3.27.0 新增
AliyunPasterManager
AliyunRollCaptionComposer createRollCaptionComposer()
AliyunRollCaptionComposer
@Deprecated AliyunPasterRender getPasterRender()
getPasterManager()
代替AliyunPasterRender
AliyunICanvasController obtainCanvasController(Context context, int w, int h)
context
- 建议传入applicationContextw
- 涂鸦画布的宽h
- 涂鸦画布的高AliyunICanvasController
void onDestroy()
int setTransition(java.util.Map<java.lang.Integer,TransitionBase> transitions)
transitions
- 转场特效的map表
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunErrorCode.ERROR_PARAM_TRANSITION_DURATION_INVALID
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_EDITORLAYOUT_INVALID_SIZE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_RENDER_INIT_SPEAKER_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_VIDEO_ENCODER_ERROR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR
int setTransition(int index, TransitionBase transition)
index
- 视频索引transition
- TransitionBase
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunErrorCode.ERROR_PARAM_TRANSITION_DURATION_INVALID
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_EDITORLAYOUT_INVALID_SIZE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_RENDER_INIT_SPEAKER_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_VIDEO_ENCODER_ERROR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR
int updateTransition(int clipIndex, TransitionBase transitionBase)
transitionCustom
- 自定义转场特效
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunErrorCode.ERROR_PARAM_TRANSITION_DURATION_INVALID
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_EDITORLAYOUT_INVALID_SIZE
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_RENDER_INIT_SPEAKER_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_VIDEO_ENCODER_ERROR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR
@Deprecated void setAnimationRestoredListener(OnAnimationFilterRestored li)
setOnAnimationRestoredListener(OnAnimationFilterRestoredListener)
代替init(SurfaceView, Context)
之前设置该回调,因为init(SurfaceView, Context)
内部会执行动效滤镜恢复逻辑li
- void setOnAnimationRestoredListener(OnAnimationFilterRestoredListener li)
init(SurfaceView, Context)
之前设置该回调,因为init(SurfaceView, Context)
内部会执行动效滤镜恢复逻辑
v3.27.0新增
li
- java.lang.String version()
AliyunLogInfo getAliyunLogInfo()
void setOutputPath(java.lang.String path)
path
- int rate(float rate, long startTimeMills, long durationMills, boolean needOriginDuration)
rate
- 倍速startTimeMills
- 开始时间 单位msdurationMills
- 时长 单位msneedOriginDuration
- 是否需要保持原视频长度
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_TIME_EFFECT_NOT_SUPPORT
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
int repeat(int times, long startTimeMills, long durationMills, boolean needOriginDuration)
times
- 重复次数startTimeMills
- 开始时间 单位msdurationMills
- 时长 单位msneedOriginDuration
- 是否需要保持原视频长度AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_TIME_EFFECT_NOT_SUPPORT
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
int invert()
AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_TIME_EFFECT_NOT_SUPPORT
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
int deleteTimeEffect(int id)
id
- 时间特效idAliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_PARAM
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_TIME_EFFECT_NOT_SUPPORT
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
int addTailWaterMark(java.lang.String imagePath, float sizeX, float sizeY, float posX, float posY, long durationUs)
imagePath
- 水印路径sizeX
- 相对宽sizeY
- 相对高posX
- 相对位置x轴posY
- 相对位置Y轴durationUs
- 时长 单位:usAliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
int addTailWaterMark(TrackEffectWaterMark trackEffectWaterMark, long duration, java.util.concurrent.TimeUnit timeUnit)
v3.27.0新增
trackWaterMark
- 水印实体类.duration
- 时长timeUnit
- 单位AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.SVIDEO_EDITOR_FILE_NOT_EXIST
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_INVALID_OPTION
TrackEffectWaterMark
int resetEffect(EffectType effectType)
effectType
- 重置的特效类型AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED
AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE
AliyunEditorErrorCode.SVIDEO_EDITOR_PREPARE_ERROR
AliyunEditorErrorCode.ALIVC_FRAMEWORK_RENDER_ERROR_SCENE_INVALID
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_FILE_STREAM_LIST_FAILED
AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_OPTION_LIST_FAILED
EffectType
long getClipStartTime(int clipIndex)
clipIndex
- 片段的索引AliyunISourcePartManager getSourcePartManager()
AliyunIProjectInfo getProjectInfo()
TimeEffectType getTimeEffect()
int applySourceChange()
int saveEffectToLocal()
int applyBlurBackground(int streamId, long startTimeMills, long durationMills, float blurRadius)
streamId
- 流IDstartTimeMills
- 开始时间 单位:毫秒durationMills
- 持续时间 单位:毫秒blurRadius
- 模糊半径[0,29]int deleteBlurBackground(int streamId, int id)
streamId
- 流IDid
- 资源idint compose(AliyunVideoParam param, java.lang.String outputPath, AliyunIComposeCallBack callback)
param
- 输出视频的相关参数outputPath
- 输出路径callback
- 合成回调int cancelCompose()
@Deprecated int audioEffect(int id, AudioEffectType type, int weight)
applyAudioEffect(int, AudioEffectType, int)
代替id
- 指定的音频流idtype
- 特效类型 com.aliyun.svideosdk.editor.AudioEffectType
weight
- 特效效果参数 [0,100]int applyAudioEffect(int id, AudioEffectType type, int weight)
v3.27.0新增,用于替换旧接口audioEffect(int, AudioEffectType, int)
id
- 指定的音频流idtype
- 特效类型 com.aliyun.svideosdk.editor.AudioEffectType
weight
- 特效效果参数 [0,100]int removeAudioEffect(int id, AudioEffectType type)
id
- 通过添加音效获取的资源idtype
- 特效类型 com.aliyun.svideosdk.editor.AudioEffectType
int setAudioFadeIn(int id, ShapeType shapeType, long duration)
v3.20 新增
设置音频淡入,从音频0秒开始
id
- 流IDshapeType
- 淡入的曲线形状 ShapeType
duration
- 淡入时长。0表示关闭int setAudioFadeOut(int id, ShapeType shapeType, long duration)
v3.20 新增
设置音频淡出, 从后面到音频结束
id
- 流IDshapeType
- 淡出的曲线形状 ShapeType
duration
- 淡出时长.0表示关闭int removeAudioFadeIn(int id)
v3.20 新增
移除音频淡入效果
id
- 流IDint removeAudioFadeOut(int id)
v3.20 新增
移除音频淡出效果
id
- 流IDint setVideoAugmentation(int streamId, VideoAugmentationType type, float value)
v3.19.0 版本新增
设置视频增强
streamId
- 目标流idtype
- 视频增强类型 VideoAugmentationType
value
- 参数值int resetVideoAugmentation(int streamId, VideoAugmentationType type)
v3.19.0 版本新增
重置视频增强参数
streamId
- 目标流idtype
- 视频增强类型 VideoAugmentationType
VideoAugmentationType
AliyunIPipManager getPipManager()
v3.25.0 新增
画中画管理类
AliyunEditorProject getEditorProject()
v3.23.0 版本新增
获取工程配置
void updateCover(Source source)
v3.25.0 版本新增
更新封面图片
source
- 草稿封面,如果为空则默认用第一帧图片int applyLutFilter(LUTEffectBean effect)
v3.27.0 版本新增
应用全局lut滤镜
effect
- lut滤镜资源,设置null表示移除int updateCaption(AliyunCaption caption)
v3.27.0 版本新增
更新字幕
caption
- 字幕int setHorizontalFlip(int streamId, boolean flip)
v3.31.0 版本新增
设置视频是否水平翻转
streamId
- 目标流idflip
- 是否翻转