Skip to content

Commit

Permalink
Add missing audioCodec to music transcode
Browse files Browse the repository at this point in the history
(cherry picked from commit 0f97f5a)
  • Loading branch information
nielsvanvelzen committed Nov 1, 2024
1 parent 0a4413e commit 255215e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class AudioMediaStreamResolver(
) : JellyfinStreamResolver(api, profile) {
companion object {
private val REMUX_CONTAINERS = arrayOf("mp3", "ogg", "mkv")
private const val REMUX_SEGMENT_CONTAINER = "mp3"
private const val TRANSCODE_SEGMENT_CONTAINER = "mp4"
private const val TRANSCODE_CODEC = "aac"
}

private fun MediaInfo.getDirectPlayStream() = BasicMediaStream(
Expand Down Expand Up @@ -101,7 +102,8 @@ class AudioMediaStreamResolver(
mediaSourceId = requireNotNull(mediaInfo.mediaSource.id),
playSessionId = mediaInfo.playSessionId,
tag = mediaInfo.mediaSource.eTag,
segmentContainer = REMUX_SEGMENT_CONTAINER,
segmentContainer = TRANSCODE_SEGMENT_CONTAINER,
audioCodec = TRANSCODE_CODEC,
).appendAccessToken()
)
}
Expand Down

0 comments on commit 255215e

Please sign in to comment.