From 2753f828b163d258b9ab5ede7c864a89613a31c7 Mon Sep 17 00:00:00 2001 From: itning Date: Tue, 13 Feb 2024 12:36:47 +0800 Subject: [PATCH] feat: optimization --- .../java/top/itning/yunshunas/video/video/FFmpegUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nas-video/src/main/java/top/itning/yunshunas/video/video/FFmpegUtils.java b/nas-video/src/main/java/top/itning/yunshunas/video/video/FFmpegUtils.java index a389dabc..428c09b3 100644 --- a/nas-video/src/main/java/top/itning/yunshunas/video/video/FFmpegUtils.java +++ b/nas-video/src/main/java/top/itning/yunshunas/video/video/FFmpegUtils.java @@ -154,6 +154,8 @@ public static void converterVideo(String ffmpegPath, command.add(Optional.ofNullable(params.getStartNumber()).orElse(0).toString()); command.add("-f"); command.add("hls"); + command.add("-hls_segment_filename"); + command.add(Optional.ofNullable(params.getHlsSegmentFileName()).orElse("output_%03d.ts")); } command.add(outFileName); command.add("-progress"); @@ -184,6 +186,7 @@ public static class ConverterParams { private Integer startNumber; private Integer hlsTime; private Integer hlsListSize; + private String hlsSegmentFileName; private String videoBitRate; private String audioBitRate; private String minVideoBitRate;