feat: видео-кодек h264_nvenc (GPU) вместо libvpx-vp9 (CPU), кодек в конфиг
Build Media Mirror Worker / Build and publish (release) Successful in 1m35s
Build Media Mirror Worker / Build and publish (release) Successful in 1m35s
- AppProperties.videoCodec (дефолт h264_nvenc), application.yaml - тесты: libx264 (без GPU), JobExecutorTest/JobPollerTest - аудио libvorbis/ogg и mkv-контейнер не тронуты
This commit is contained in:
@@ -14,6 +14,7 @@ data class AppProperties(
|
||||
val ffprobePath: String = "ffprobe",
|
||||
val localFileStorage: Path = Path.of("/tmp/media-mirror-worker"),
|
||||
val ffmpegThreadCount: Int? = null,
|
||||
val videoCodec: String = "h264_nvenc",
|
||||
) {
|
||||
data class Jellyfin(
|
||||
val url: String = "",
|
||||
|
||||
@@ -100,7 +100,7 @@ class JobExecutor(
|
||||
output = videoFile,
|
||||
width = newWidth,
|
||||
height = newHeight,
|
||||
videoCodec = VIDEO_CODEC,
|
||||
videoCodec = props.videoCodec,
|
||||
removeAudio = true,
|
||||
removeSubtitles = true,
|
||||
removeMetadata = true,
|
||||
@@ -154,7 +154,6 @@ class JobExecutor(
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val VIDEO_CODEC = "libvpx-vp9"
|
||||
private const val MAX_HEIGHT = 480
|
||||
private const val VIDEO_CONTAINER = "mkv"
|
||||
private const val AUDIO_CODEC = "libvorbis"
|
||||
|
||||
@@ -24,6 +24,7 @@ app:
|
||||
ffmpegPath: ffmpeg
|
||||
ffprobePath: ffprobe
|
||||
localFileStorage: /tmp/media-mirror-worker
|
||||
videoCodec: h264_nvenc
|
||||
|
||||
server:
|
||||
port: 8081
|
||||
|
||||
@@ -54,6 +54,7 @@ class JobPollerTest : AbstractMinioTest() {
|
||||
registry.add("app.s3.prefix") { "mirror" }
|
||||
registry.add("app.ffmpegPath") { "/usr/bin/ffmpeg" }
|
||||
registry.add("app.ffprobePath") { "/usr/bin/ffprobe" }
|
||||
registry.add("app.videoCodec") { "libx264" }
|
||||
registry.add("app.localFileStorage") {
|
||||
Files.createTempDirectory("mmw-worker-test").toString()
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ class JobExecutorTest : AbstractMinioTest() {
|
||||
ffmpegPath = "/usr/bin/ffmpeg",
|
||||
ffprobePath = "/usr/bin/ffprobe",
|
||||
localFileStorage = tempDir,
|
||||
videoCodec = "libx264",
|
||||
)
|
||||
|
||||
private fun executor(): JobExecutor {
|
||||
|
||||
Reference in New Issue
Block a user