fix(hls): clamp ffmpeg bitrate to the level we derive from outputHeight
Asking for 2160p quality on a 720p source kept the daemon's qcap.VideoBitrate at 25 Mbps even after outputHeight was clamped to the source. The level H264LevelForHeight picks for the 720p output is 3.1 / 4.0, which rejects any VBV >20 Mbps — libx264 then exited with "VBV bitrate (25000) > level limit" on every restart, ffmpeg auto-restarted 3 times, master.m3u8 never appeared, and the player got stuck at "Preparando sesión". Re-derive the (height, bitrate) cap from the EFFECTIVE outputHeight via the new capForHeight helper. Result: 720p source asked for 2160p → outputs 720p with the 3500 kbps bitrate the level actually accepts. ffmpeg runs cleanly, master.m3u8 appears, playback starts. The web also clamps effectiveQuality to source resolution before the session row is written, so the daemon mostly receives sane labels. This change keeps the daemon defensive against (a) older web clients that still ask for upscaled qualities, and (b) future quality="original" requests where qcap is empty and Transcode.VideoBitrate could overshoot the level too.
This commit is contained in:
parent
a5a92b111b
commit
9176e877eb
3 changed files with 35 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
|
||||
// Version is the CLI version. Overridden by goreleaser ldflags at release time.
|
||||
var Version = "0.9.2"
|
||||
var Version = "0.9.3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue