/*** Set the start time of the special effect filter* @param type Special effect filter type* @param startTime Start time of special effect filter in ms*/public void startEffect(int type, long startTime);/*** Set the end time of the special effect filter* @param type Special effect filter type* @param endTime End time of special effect filter in ms*/public void stopEffect(int type, long endTime);
TXVideoEditConstants constant:public static final int TXEffectType_SOUL_OUT = 0; // Soul outpublic static final int TXEffectType_SPLIT_SCREEN = 1; // Screen splitpublic static final int TXEffectType_DARK_DRAEM = 2; // Dark dreampublic static final int TXEffectType_ROCK_LIGHT = 3; // Dynamic light-wavepublic static final int TXEffectType_WIN_SHADDOW = 4; // Window blindspublic static final int TXEffectType_GHOST_SHADDOW = 5; // Ghost shadowpublic static final int TXEffectType_PHANTOM_SHADDOW = 6; // Phantompublic static final int TXEffectType_GHOST = 7; // Ghostpublic static final int TXEffectType_LIGHTNING = 8; // Lighteningpublic static final int TXEffectType_MIRROR = 9; // Mirrorpublic static final int TXEffectType_ILLUSION = 10; // Illusion
public void deleteLastEffect();
public void deleteAllEffect();
// Use the first special effect filter between the first and second secondsmTXVideoEditer.startEffect(TXVideoEditConstants.TXEffectType_SOUL_OUT, 1000);mTXVideoEditer.stopEffect(TXVideoEditConstants.TXEffectType_SOUL_OUT, 2000);// Use the second special effect filter between the third and fourth secondsmTXVideoEditer.startEffect(TXVideoEditConstants.TXEffectType_SPLIT_SCREEN, 3000);mTXVideoEditer.stopEffect(TXVideoEditConstants.TXEffectType_SPLIT_SCREEN, 4000);// Delete the special effect filter set between the third and fourth secondsmTXVideoEditer.deleteLastEffect();
public void setSpeedList(List speedList);// The `TXSpeed` parameters are as follows:public final static class TXSpeed {public int speedLevel; // Speed change levelpublic long startTime; // Start timepublic long endTime; // End time}// Currently, multiple speed change levels are supported, which are defined in the `TXVideoEditConstants` constant:public static final int SPEED_LEVEL_SLOWEST = 0; // Ultra-slow 0.25x of the source video's speedpublic static final int SPEED_LEVEL_SLOW = 1; // Slow 0.5x of the source video's speedpublic static final int SPEED_LEVEL_NORMAL = 2; // Normal 1x of the source video's speedpublic static final int SPEED_LEVEL_FAST = 3; // Fast 1.5x of the source video's speedpublic static final int SPEED_LEVEL_FASTEST = 4; // Ultra-fast 2x of the source video's
List<TXVideoEditConstants.TXSpeed> list = new ArrayList<>();TXVideoEditConstants.TXSpeed speed1 = new TXVideoEditConstants.TXSpeed();speed1.startTime = 0;speed1.endTime = 1000;speed1.speedLevel = TXVideoEditConstants.SPEED_LEVEL_SLOW; // Slowlist.add(speed1);TXVideoEditConstants.TXSpeed speed2 = new TXVideoEditConstants.TXSpeed();speed2.startTime = 1000;speed2.endTime = 2000;speed2.speedLevel = TXVideoEditConstants.SPEED_LEVEL_SLOWEST; // Ultra-slowlist.add(speed2);TXVideoEditConstants.TXSpeed speed3 = new TXVideoEditConstants.TXSpeed();speed3.startTime = 2000;speed3.endTime = 3000;speed3.speedLevel = TXVideoEditConstants.SPEED_LEVEL_SLOW; // Slowlist.add(speed3);mTXVideoEditer.setSpeedList(list);
setReverse(true)/setReverse(false) to start/stop reverse playback.mTXVideoEditer.setReverse(true);
setRepeatPlay(null) to cancel the video segment loop set previously.public void setRepeatPlay(List repeatList);// The `TXRepeat` parameters are as follows:public final static class TXRepeat {public long startTime; // Loop start time in mspublic long endTime; // Loop end time in mspublic int repeatTimes; // Number of repeats}
long currentPts = mVideoProgressController.getCurrentTimeMs();List repeatList = new ArrayList<>();TXVideoEditConstants.TXRepeat repeat = new TXVideoEditConstants.TXRepeat();repeat.startTime = currentPts;repeat.endTime = currentPts + DEAULT_DURATION_MS;repeat.repeatTimes = 3; // Currently, a video segment can be repeated only for thrice.repeatList.add(repeat); // Currently, only one video segment can be looped.mTXVideoEditer.setRepeatPlay(repeatList);
Feedback