feat: per-track loudness normalization and server audio info
- measure downloads with ffmpeg's EBU R128 filter and store gain/LUFS - backfill the existing library one file at a time - expose gain on songs and a /info endpoint for source quality - chart knobs LOUDNESS_ENABLED and LOUDNESS_TARGET_LUFS
This commit is contained in:
1 parent
6763a83b03
commit
91312faa1c
15 files changed
+387
-9
No files matched your search
@@ -44,6 +44,15 @@ data class DeviceDto(
|
||||
val current: Boolean,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ServerInfoDto(
|
||||
val defaultSource: String,
|
||||
/** 0 = 128 kbps MP3, 1 = 320 kbps MP3 for Deezer downloads. */
|
||||
val deezerQuality: Int,
|
||||
val loudnessEnabled: Boolean,
|
||||
val loudnessTargetLufs: Double,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SongDto(
|
||||
val id: String,
|
||||
@@ -57,6 +66,10 @@ data class SongDto(
|
||||
val size: Long,
|
||||
val suffix: String,
|
||||
val thumbnail: String? = null,
|
||||
/** Measured integrated loudness; null when the server has not analyzed it yet. */
|
||||
val loudnessLufs: Double? = null,
|
||||
/** Gain in dB the client applies to reach the server's target loudness. */
|
||||
val gainDb: Double? = null,
|
||||
)
|
||||
|
||||
fun SongRecord.toDto(): SongDto = SongDto(
|
||||
@@ -71,6 +84,8 @@ fun SongRecord.toDto(): SongDto = SongDto(
|
||||
size = size,
|
||||
suffix = suffix,
|
||||
thumbnail = thumbnail,
|
||||
loudnessLufs = loudnessLufs,
|
||||
gainDb = gainDb,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
||||
Reference in new issue
Block a user