1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #4170 from DomiStyle/segment-deletion

Add encoder settings for ffmpeg's segment deletion
This commit is contained in:
Bill Thornton 2023-07-14 11:35:55 -04:00 committed by GitHub
commit d8c25b4594
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 0 deletions

View file

@ -335,6 +335,24 @@
<div class="fieldDescription checkboxFieldDescription">${AllowFfmpegThrottlingHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="chkEnableSegmentDeletion" />
<span>${AllowSegmentDeletion}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${AllowSegmentDeletionHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtThrottleDelaySeconds" pattern="[0-9]*" min="10" max="3600" step="1" label="${LabelThrottleDelaySeconds}" />
<div class="fieldDescription">${LabelThrottleDelaySecondsHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtSegmentKeepSeconds" pattern="[0-9]*" min="15" max="3600" step="1" label="${LabelSegmentKeepSeconds}" />
<div class="fieldDescription">${LabelSegmentKeepSecondsHelp}</div>
</div>
<div>
<button is="emby-button" type="submit" class="raised button-submit block">
<span>${Save}</span>

View file

@ -46,6 +46,9 @@ function loadPage(page, config, systemInfo) {
page.querySelector('#chkDoubleRateDeinterlacing').checked = config.DeinterlaceDoubleRate;
page.querySelector('#chkEnableSubtitleExtraction').checked = config.EnableSubtitleExtraction || false;
page.querySelector('#chkEnableThrottling').checked = config.EnableThrottling || false;
page.querySelector('#chkEnableSegmentDeletion').checked = config.EnableSegmentDeletion || false;
page.querySelector('#txtThrottleDelaySeconds').value = config.ThrottleDelaySeconds || '';
page.querySelector('#txtSegmentKeepSeconds').value = config.SegmentKeepSeconds || '';
page.querySelector('#selectVideoDecoder').dispatchEvent(new CustomEvent('change', {
bubbles: true
}));
@ -104,6 +107,9 @@ function onSubmit() {
config.DeinterlaceDoubleRate = form.querySelector('#chkDoubleRateDeinterlacing').checked;
config.EnableSubtitleExtraction = form.querySelector('#chkEnableSubtitleExtraction').checked;
config.EnableThrottling = form.querySelector('#chkEnableThrottling').checked;
config.EnableSegmentDeletion = form.querySelector('#chkEnableSegmentDeletion').checked;
config.ThrottleDelaySeconds = parseInt(form.querySelector('#txtThrottleDelaySeconds').value || '0', 10);
config.SegmentKeepSeconds = parseInt(form.querySelector('#txtSegmentKeepSeconds').value || '0', 10);
config.HardwareDecodingCodecs = Array.prototype.map.call(Array.prototype.filter.call(form.querySelectorAll('.chkDecodeCodec'), function (c) {
return c.checked;
}), function (c) {

View file

@ -436,6 +436,7 @@ export class HtmlVideoPlayer {
const includeCorsCredentials = await getIncludeCorsCredentials();
const hls = new Hls({
startPosition: options.playerStartPositionTicks / 10000000,
manifestLoadingTimeOut: 20000,
maxBufferLength: maxBufferLength,
xhrSetup(xhr) {

View file

@ -25,6 +25,12 @@
"AllowCollectionManagement": "Allow this user to manage collections",
"AllowFfmpegThrottling": "Throttle Transcodes",
"AllowFfmpegThrottlingHelp": "When a transcode or remux gets far enough ahead from the current playback position, pause the process so it will consume less resources. This is most useful when watching without seeking often. Turn this off if you experience playback issues.",
"AllowSegmentDeletion": "Delete segments",
"AllowSegmentDeletionHelp": "Delete old segments after they have been sent to the client. This prevents having to store the entire transcoded file on disk. Will only work with throttling enabled. Turn this off if you experience playback issues.",
"LabelThrottleDelaySeconds": "Throttle after",
"LabelThrottleDelaySecondsHelp": "Time in seconds after which the transcoder will be throttled. Must be large enough for the client to maintain a healthy buffer. Only works if throttling is enabled.",
"LabelSegmentKeepSeconds": "Time to keep segments",
"LabelSegmentKeepSecondsHelp": "Time in seconds for which segments should be kept before they are overwritten. Must be greater than \"Throttle after\". Only works if segment deletion is enabled.",
"AllowHWTranscodingHelp": "Allow the tuner to transcode streams on the fly. This may help reduce transcoding required by the server.",
"AllowMediaConversion": "Allow media conversion",
"AllowMediaConversionHelp": "Grant or deny access to the convert media feature.",