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>
32 lines
862 B
Swift
32 lines
862 B
Swift
import Foundation
|
|
|
|
/// Profilo RTMP allineato a MediaMTX slate + YoutubeRelay (copy A/V).
|
|
/// Audio: AAC 48 kHz mono 128 kbps.
|
|
struct BroadcastConfig: Sendable {
|
|
let rtmpUrl: String
|
|
var width: Int = 1280
|
|
var height: Int = 720
|
|
var videoBitrate: Int = 2_500_000
|
|
var audioBitrate: Int = 128_000
|
|
var fps: Int = 30
|
|
var rotation: Int = 0
|
|
var portrait: Bool = false
|
|
var maxReconnectAttempts: Int = 10
|
|
var reconnectDelayMs: Int = 5_000
|
|
|
|
static let audioSampleRateHz: Float64 = 48_000
|
|
static let audioChannels: UInt32 = 1
|
|
}
|
|
|
|
enum BroadcastPhase: String, Sendable {
|
|
case idle, preview, connecting, live, paused, reconnecting, error
|
|
}
|
|
|
|
struct BroadcastMetrics: Sendable {
|
|
var phase: BroadcastPhase = .idle
|
|
var bitrateKbps: Int = 0
|
|
var fps: Int = 0
|
|
var connected: Bool = false
|
|
var lastError: String?
|
|
}
|