倍速 参数调整

This commit is contained in:
shikong 2024-01-16 09:44:10 +08:00
parent d8a13256c7
commit 5d0dd68f22

View File

@ -34,7 +34,7 @@ public class FfmpegSupportService {
public Executor pushDownload2Rtp(String input, String output, long time, TimeUnit unit, ExecuteResultHandler resultHandler){
FfmpegConfig.Rtp rtp = ffmpegConfig.getRtp();
FfmpegConfig.Debug debug = ffmpegConfig.getDebug();
String downloadSpeed = StringUtils.joinWith(" ","-filter:v", MessageFormat.format("\"setpts={0}*PTS\"",rtp.getDownloadSpeed()));
String downloadSpeed = StringUtils.joinWith(" ","-filter:v", MessageFormat.format("\"setpts=1/{0}*PTS\"",rtp.getDownloadSpeed()));
String inputParam = debug.getDownload()? rtp.getDownload() : StringUtils.joinWith(" ", rtp.getDownload(), input, downloadSpeed);
log.info("视频下载参数 {}", inputParam);