Alleggerisce il relay YouTube e rilascia Android 2.0.8.

ffmpeg fa solo remux copy A/V; le app fissano AAC 48 kHz mono; sync deploy non cancella più garage.prod.toml.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 19:25:40 +02:00
co-authored by Cursor
parent 9bc89fceba
commit 7b3256c8a0
14 changed files with 96 additions and 35 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ android {
applicationId = "com.matchlivetv.match_live_tv"
minSdk = 24
targetSdk = 36
versionCode = 28
versionName = "2.0.7-native"
versionCode = 29
versionName = "2.0.8-native"
val apiBaseUrl = project.findProperty("API_BASE_URL") as String?
?: "https://www.matchlivetv.it"
@@ -1,5 +1,9 @@
package com.matchlivetv.match_live_tv.streaming
/**
* Profilo RTMP allineato a MediaMTX slate + relay YouTube (copy audio/video).
* Audio: AAC 48 kHz mono 128 kbps — stesso contratto di `infra/scripts/generate_slate.sh`.
*/
data class BroadcastConfig(
val rtmpUrl: String,
val width: Int = 1280,
@@ -11,7 +15,13 @@ data class BroadcastConfig(
val portrait: Boolean = false,
val maxReconnectAttempts: Int = 10,
val reconnectDelayMs: Long = 5_000L,
)
) {
companion object {
const val AUDIO_SAMPLE_RATE_HZ = 48_000
/** false = mono in RootEncoder `prepareAudio(sampleRate, isStereo, bitrate)`. */
const val AUDIO_STEREO = false
}
}
enum class BroadcastPhase {
IDLE,
@@ -316,7 +316,11 @@ class LiveBroadcastEngine(
rotation = cfg.rotation,
profile = MediaCodecInfo.CodecProfileLevel.AVCProfileBaseline,
level = h264Level,
) && stream.prepareAudio(48_000, false, cfg.audioBitrate)
) && stream.prepareAudio(
BroadcastConfig.AUDIO_SAMPLE_RATE_HZ,
BroadcastConfig.AUDIO_STEREO,
cfg.audioBitrate,
)
}.getOrElse {
Log.w(TAG, "preparePipeline: ${it.message}")
false