Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05a4aa775a |
@@ -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"
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user