diff --git a/entity/ffmpeg.py b/entity/ffmpeg.py index d296647..678573b 100644 --- a/entity/ffmpeg.py +++ b/entity/ffmpeg.py @@ -220,6 +220,15 @@ class FfmpegTask(object): # filter_args.append(f"{_end_out_str}{_start_out_str}overlay=eof_action=pass{video_output_str}") filter_args.append(f"{_start_out_str}{_mid_out_str}{_end_out_str}concat=n=3:v=1:a=0,setpts=N/{self.frame_rate}/TB{video_output_str}") effect_index += 1 + elif effect.startswith("ospeed:"): + param = effect.split(":", 2)[1] + if param == '': + param = "1" + if param != "1": + # 视频变速 + effect_index += 1 + filter_args.append(f"{video_output_str}setpts={param}*PTS[v_eff{effect_index}]") + video_output_str = f"[v_eff{effect_index}]" elif effect.startswith("zoom:"): ... ...