Allow for unlimited bitrate

This commit is contained in:
Jimi 2023-01-25 06:44:26 -07:00
parent 0403b75f77
commit a1348f7b1a
3 changed files with 67 additions and 31 deletions

View File

@ -1049,5 +1049,13 @@
<source>If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.</source>
<translation>If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.</translation>
</message>
<message>
<source>Turn off bitrate limiting</source>
<translation>Turn off bitrate limiting</translation>
</message>
<message>
<source>This will ignore Roku's official max bitrate specifications and attempt to stream without enforcing a max bitrate.</source>
<translation>This will ignore Roku's official max bitrate specifications and attempt to stream without enforcing a max bitrate.</translation>
</message>
</context>
</TS>

View File

@ -63,6 +63,13 @@
"settingName": "playback.subs.onlytext",
"type": "bool",
"default": "false"
},
{
"title": "Turn off bitrate limiting",
"description": "This will ignore Roku's official max bitrate specifications and attempt to stream without enforcing a max bitrate.",
"settingName": "playback.bitrate.unlimited",
"type": "bool",
"default": "false"
}
]
},
@ -129,11 +136,11 @@
"default": "false"
},
{
"title":"Disable Community Rating for Episodes",
"title": "Disable Community Rating for Episodes",
"description": "If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.",
"settingName": "ui.tvshows.disableCommunityRating",
"type":"bool",
"default":"false"
"type": "bool",
"default": "false"
}
]
},

View File

@ -171,13 +171,7 @@ function getDeviceProfile() as object
"Value": "41",
"IsRequired": false
},
' Roku only supports h264 up to 10Mpbs
{
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "10000000",
IsRequired: true
}
GetBitRateLimit("H264")
]
}
],
@ -211,13 +205,7 @@ function getDeviceProfile() as object
"Value": av1VideoRangeTypes,
"IsRequired": false
},
' Roku only supports AVI up to 40Mpbs
{
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "40000000",
IsRequired: true
}
GetBitRateLimit("AV1")
]
})
end if
@ -244,13 +232,7 @@ function getDeviceProfile() as object
"Value": (120 * 5.1).ToStr(),
"IsRequired": false
},
' Roku only supports h265 up to 40Mpbs
{
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "40000000",
IsRequired: true
}
GetBitRateLimit("H265")
]
})
end if
@ -265,13 +247,7 @@ function getDeviceProfile() as object
"Value": vp9VideoRangeTypes,
"IsRequired": false
},
' Roku only supports VP9 up to 40Mpbs
{
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "40000000",
IsRequired: true
}
GetBitRateLimit("VP9")
]
})
end if
@ -382,3 +358,48 @@ function GetDirectPlayProfiles() as object
]
end function
function GetBitRateLimit(codec as string)
' Some repeated values (e.g. same "40mbps" for several codecs)
' but this makes it easy to update in the future if the bitrates start to deviate.
if get_user_setting("playback.bitrate.unlimited") = "true"
return {}
else
if codec = "H264"
' Roku only supports h264 up to 10Mpbs
return {
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "10000000",
IsRequired: true
}
else if codec = "AV1"
' Roku only supports AV1 up to 40Mpbs
return {
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "40000000",
IsRequired: true
}
else if codec = "H265"
' Roku only supports h265 up to 40Mpbs
return {
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "40000000",
IsRequired: true
}
else if codec = "VP9"
' Roku only supports VP9 up to 40Mpbs
return {
"Condition": "LessThanEqual",
"Property": "VideoBitrate",
"Value": "40000000",
IsRequired: true
}
end if
end if
return {}
end function