mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
padded bitrate for hls
This commit is contained in:
parent
2e43a0746c
commit
da0c386853
1 changed files with 4 additions and 1 deletions
|
@ -140,8 +140,11 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
|
||||
builder.AppendLine("#EXTM3U");
|
||||
|
||||
// Pad a little to satisfy the apple hls validator
|
||||
var paddedBitrate = Convert.ToInt32(bitrate * 1.05);
|
||||
|
||||
// Main stream
|
||||
builder.AppendLine("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=" + bitrate.ToString(UsCulture));
|
||||
builder.AppendLine("#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=" + paddedBitrate.ToString(UsCulture));
|
||||
var playlistUrl = "hls/" + Path.GetFileName(firstPlaylist).Replace(".m3u8", "/stream.m3u8");
|
||||
builder.AppendLine(playlistUrl);
|
||||
|
||||
|
|
Loading…
Reference in a new issue