1 Commits
5 ... 6

Author SHA1 Message Date
Hermes Agent 05a4aa775a feat: видео-кодек h264_nvenc (GPU) вместо libvpx-vp9 (CPU), кодек в конфиг
Build Media Mirror Worker / Build and publish (release) Successful in 1m35s
- AppProperties.videoCodec (дефолт h264_nvenc), application.yaml
- тесты: libx264 (без GPU), JobExecutorTest/JobPollerTest
- аудио libvorbis/ogg и mkv-контейнер не тронуты
2026-08-11 00:34:01 +03:00
5 changed files with 5 additions and 2 deletions
@@ -14,6 +14,7 @@ data class AppProperties(
val ffprobePath: String = "ffprobe", val ffprobePath: String = "ffprobe",
val localFileStorage: Path = Path.of("/tmp/media-mirror-worker"), val localFileStorage: Path = Path.of("/tmp/media-mirror-worker"),
val ffmpegThreadCount: Int? = null, val ffmpegThreadCount: Int? = null,
val videoCodec: String = "h264_nvenc",
) { ) {
data class Jellyfin( data class Jellyfin(
val url: String = "", val url: String = "",
@@ -100,7 +100,7 @@ class JobExecutor(
output = videoFile, output = videoFile,
width = newWidth, width = newWidth,
height = newHeight, height = newHeight,
videoCodec = VIDEO_CODEC, videoCodec = props.videoCodec,
removeAudio = true, removeAudio = true,
removeSubtitles = true, removeSubtitles = true,
removeMetadata = true, removeMetadata = true,
@@ -154,7 +154,6 @@ class JobExecutor(
} }
companion object { companion object {
private const val VIDEO_CODEC = "libvpx-vp9"
private const val MAX_HEIGHT = 480 private const val MAX_HEIGHT = 480
private const val VIDEO_CONTAINER = "mkv" private const val VIDEO_CONTAINER = "mkv"
private const val AUDIO_CODEC = "libvorbis" private const val AUDIO_CODEC = "libvorbis"
+1
View File
@@ -24,6 +24,7 @@ app:
ffmpegPath: ffmpeg ffmpegPath: ffmpeg
ffprobePath: ffprobe ffprobePath: ffprobe
localFileStorage: /tmp/media-mirror-worker localFileStorage: /tmp/media-mirror-worker
videoCodec: h264_nvenc
server: server:
port: 8081 port: 8081
@@ -54,6 +54,7 @@ class JobPollerTest : AbstractMinioTest() {
registry.add("app.s3.prefix") { "mirror" } registry.add("app.s3.prefix") { "mirror" }
registry.add("app.ffmpegPath") { "/usr/bin/ffmpeg" } registry.add("app.ffmpegPath") { "/usr/bin/ffmpeg" }
registry.add("app.ffprobePath") { "/usr/bin/ffprobe" } registry.add("app.ffprobePath") { "/usr/bin/ffprobe" }
registry.add("app.videoCodec") { "libx264" }
registry.add("app.localFileStorage") { registry.add("app.localFileStorage") {
Files.createTempDirectory("mmw-worker-test").toString() Files.createTempDirectory("mmw-worker-test").toString()
} }
@@ -23,6 +23,7 @@ class JobExecutorTest : AbstractMinioTest() {
ffmpegPath = "/usr/bin/ffmpeg", ffmpegPath = "/usr/bin/ffmpeg",
ffprobePath = "/usr/bin/ffprobe", ffprobePath = "/usr/bin/ffprobe",
localFileStorage = tempDir, localFileStorage = tempDir,
videoCodec = "libx264",
) )
private fun executor(): JobExecutor { private fun executor(): JobExecutor {