diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs index 3c8ad55fe4..e266ea21b8 100644 --- a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs @@ -109,7 +109,7 @@ namespace Emby.Server.Implementations.FFMpeg } if (!string.IsNullOrWhiteSpace(customffProbePath)) { - info.EncoderPath = customffProbePath; + info.ProbePath = customffProbePath; } return info; diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 8d01e4021f..c300fcce3e 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -22,6 +22,7 @@ using System.Threading.Tasks; using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.Net; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Diagnostics; namespace MediaBrowser.Api.Playback @@ -100,11 +101,7 @@ namespace MediaBrowser.Api.Playback /// /// Gets the command line arguments. /// - /// The output path. - /// The state. - /// if set to true [is encoding]. - /// System.String. - protected abstract string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding); + protected abstract string GetCommandLineArguments(string outputPath, EncodingOptions encodingOptions, StreamState state, bool isEncoding); /// /// Gets the type of the transcoding job. @@ -125,11 +122,11 @@ namespace MediaBrowser.Api.Playback /// /// Gets the output file path. /// - private string GetOutputFilePath(StreamState state, string outputFileExtension) + private string GetOutputFilePath(StreamState state, EncodingOptions encodingOptions, string outputFileExtension) { var folder = ServerConfigurationManager.ApplicationPaths.TranscodingTempPath; - var data = GetCommandLineArguments("dummy\\dummy", state, false); + var data = GetCommandLineArguments("dummy\\dummy", encodingOptions, state, false); data += "-" + (state.Request.DeviceId ?? string.Empty); data += "-" + (state.Request.PlaySessionId ?? string.Empty); @@ -217,8 +214,10 @@ namespace MediaBrowser.Api.Playback } } + var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); + var transcodingId = Guid.NewGuid().ToString("N"); - var commandLineArgs = GetCommandLineArguments(outputPath, state, true); + var commandLineArgs = GetCommandLineArguments(outputPath, encodingOptions, state, true); var process = ApiEntryPoint.Instance.ProcessFactory.Create(new ProcessOptions { @@ -826,7 +825,10 @@ namespace MediaBrowser.Api.Playback var ext = string.IsNullOrWhiteSpace(state.OutputContainer) ? GetOutputFileExtension(state) : ("." + state.OutputContainer); - state.OutputFilePath = GetOutputFilePath(state, ext); + + var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); + + state.OutputFilePath = GetOutputFilePath(state, encodingOptions, ext); return state; } diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 63d2cd9ebe..83157c7031 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -14,6 +14,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Net; +using MediaBrowser.Model.Configuration; namespace MediaBrowser.Api.Playback.Hls { @@ -25,15 +26,12 @@ namespace MediaBrowser.Api.Playback.Hls /// /// Gets the audio arguments. /// - /// The state. - /// System.String. - protected abstract string GetAudioArguments(StreamState state); + protected abstract string GetAudioArguments(StreamState state, EncodingOptions encodingOptions); + /// /// Gets the video arguments. /// - /// The state. - /// System.String. - protected abstract string GetVideoArguments(StreamState state); + protected abstract string GetVideoArguments(StreamState state, EncodingOptions encodingOptions); /// /// Gets the segment file extension. @@ -242,10 +240,8 @@ namespace MediaBrowser.Api.Playback.Hls } } - protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding) + protected override string GetCommandLineArguments(string outputPath, EncodingOptions encodingOptions, StreamState state, bool isEncoding) { - var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); - var itsOffsetMs = 0; var itsOffset = itsOffsetMs == 0 ? string.Empty : string.Format("-itsoffset {0} ", TimeSpan.FromMilliseconds(itsOffsetMs).TotalSeconds.ToString(UsCulture)); @@ -285,8 +281,8 @@ namespace MediaBrowser.Api.Playback.Hls EncodingHelper.GetInputArgument(state, encodingOptions), threads, EncodingHelper.GetMapArgs(state), - GetVideoArguments(state), - GetAudioArguments(state), + GetVideoArguments(state, encodingOptions), + GetAudioArguments(state, encodingOptions), state.SegmentLength.ToString(UsCulture), startNumberParam, outputPath, @@ -306,8 +302,8 @@ namespace MediaBrowser.Api.Playback.Hls EncodingHelper.GetInputArgument(state, encodingOptions), threads, EncodingHelper.GetMapArgs(state), - GetVideoArguments(state), - GetAudioArguments(state), + GetVideoArguments(state, encodingOptions), + GetAudioArguments(state, encodingOptions), state.SegmentLength.ToString(UsCulture), startNumberParam, state.HlsListSize.ToString(UsCulture), diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 2fc8fccbee..6744fbd92c 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -18,6 +18,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Services; using MimeTypes = MediaBrowser.Model.Net.MimeTypes; @@ -777,7 +778,7 @@ namespace MediaBrowser.Api.Playback.Hls return ResultFactory.GetResult(playlistText, MimeTypes.GetMimeType("playlist.m3u8"), new Dictionary()); } - protected override string GetAudioArguments(StreamState state) + protected override string GetAudioArguments(StreamState state, EncodingOptions encodingOptions) { var audioCodec = EncodingHelper.GetAudioEncoder(state); @@ -813,7 +814,7 @@ namespace MediaBrowser.Api.Playback.Hls if (string.Equals(audioCodec, "copy", StringComparison.OrdinalIgnoreCase)) { - var videoCodec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions()); + var videoCodec = EncodingHelper.GetVideoEncoder(state, encodingOptions); if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase) && state.EnableBreakOnNonKeyFrames(videoCodec)) { @@ -844,19 +845,19 @@ namespace MediaBrowser.Api.Playback.Hls args += " -ar " + state.OutputAudioSampleRate.Value.ToString(UsCulture); } - args += " " + EncodingHelper.GetAudioFilterParam(state, ApiEntryPoint.Instance.GetEncodingOptions(), true); + args += " " + EncodingHelper.GetAudioFilterParam(state, encodingOptions, true); return args; } - protected override string GetVideoArguments(StreamState state) + protected override string GetVideoArguments(StreamState state, EncodingOptions encodingOptions) { if (!state.IsOutputVideo) { return string.Empty; } - var codec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions()); + var codec = EncodingHelper.GetVideoEncoder(state, encodingOptions); var args = "-codec:v:0 " + codec; @@ -882,8 +883,6 @@ namespace MediaBrowser.Api.Playback.Hls var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode; - var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); - args += " " + EncodingHelper.GetVideoQualityParam(state, codec, encodingOptions, GetDefaultH264Preset()) + keyFrameArg; //args += " -mixed-refs 0 -refs 3 -x264opts b_pyramid=0:weightb=0:weightp=0"; @@ -918,9 +917,8 @@ namespace MediaBrowser.Api.Playback.Hls return args; } - protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding) + protected override string GetCommandLineArguments(string outputPath, EncodingOptions encodingOptions, StreamState state, bool isEncoding) { - var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); var threads = EncodingHelper.GetNumberOfThreads(state, encodingOptions, false); var inputModifier = EncodingHelper.GetInputModifier(state, encodingOptions); @@ -947,7 +945,7 @@ namespace MediaBrowser.Api.Playback.Hls segmentFormat = "mpegts"; } - var videoCodec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions()); + var videoCodec = EncodingHelper.GetVideoEncoder(state, encodingOptions); var breakOnNonKeyFrames = state.EnableBreakOnNonKeyFrames(videoCodec); var breakOnNonKeyFramesArg = breakOnNonKeyFrames ? " -break_non_keyframes 1" : ""; @@ -957,8 +955,8 @@ namespace MediaBrowser.Api.Playback.Hls EncodingHelper.GetInputArgument(state, encodingOptions), threads, mapArgs, - GetVideoArguments(state), - GetAudioArguments(state), + GetVideoArguments(state, encodingOptions), + GetAudioArguments(state, encodingOptions), state.SegmentLength.ToString(UsCulture), startNumberParam, outputPath, diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs index 227b55b1bc..9b3c8a08f1 100644 --- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs @@ -7,6 +7,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; using System; using MediaBrowser.Controller.Net; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Services; @@ -31,9 +32,7 @@ namespace MediaBrowser.Api.Playback.Hls /// /// Gets the audio arguments. /// - /// The state. - /// System.String. - protected override string GetAudioArguments(StreamState state) + protected override string GetAudioArguments(StreamState state, EncodingOptions encodingOptions) { var codec = EncodingHelper.GetAudioEncoder(state); @@ -63,7 +62,7 @@ namespace MediaBrowser.Api.Playback.Hls args += " -ar " + state.OutputAudioSampleRate.Value.ToString(UsCulture); } - args += " " + EncodingHelper.GetAudioFilterParam(state, ApiEntryPoint.Instance.GetEncodingOptions(), true); + args += " " + EncodingHelper.GetAudioFilterParam(state, encodingOptions, true); return args; } @@ -71,16 +70,14 @@ namespace MediaBrowser.Api.Playback.Hls /// /// Gets the video arguments. /// - /// The state. - /// System.String. - protected override string GetVideoArguments(StreamState state) + protected override string GetVideoArguments(StreamState state, EncodingOptions encodingOptions) { if (!state.IsOutputVideo) { return string.Empty; } - var codec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions()); + var codec = EncodingHelper.GetVideoEncoder(state, encodingOptions); var args = "-codec:v:0 " + codec; @@ -106,7 +103,6 @@ namespace MediaBrowser.Api.Playback.Hls var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode; - var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); args += " " + EncodingHelper.GetVideoQualityParam(state, codec, encodingOptions, GetDefaultH264Preset()) + keyFrameArg; // Add resolution params, if specified diff --git a/MediaBrowser.Api/Playback/Progressive/AudioService.cs b/MediaBrowser.Api/Playback/Progressive/AudioService.cs index af8670eb15..44e096dd7f 100644 --- a/MediaBrowser.Api/Playback/Progressive/AudioService.cs +++ b/MediaBrowser.Api/Playback/Progressive/AudioService.cs @@ -10,6 +10,7 @@ using MediaBrowser.Model.Serialization; using System.Collections.Generic; using System.Threading.Tasks; using MediaBrowser.Controller.Net; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.IO; using MediaBrowser.Model.Services; using MediaBrowser.Model.System; @@ -58,10 +59,8 @@ namespace MediaBrowser.Api.Playback.Progressive return ProcessRequest(request, true); } - protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding) + protected override string GetCommandLineArguments(string outputPath, EncodingOptions encodingOptions, StreamState state, bool isEncoding) { - var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); - return EncodingHelper.GetProgressiveAudioFullCommandLine(state, encodingOptions, outputPath); } } diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index 5e21f6a841..a41b4cbf54 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -8,6 +8,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; using System.Threading.Tasks; using MediaBrowser.Controller.Net; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Services; using MediaBrowser.Model.System; @@ -91,10 +92,8 @@ namespace MediaBrowser.Api.Playback.Progressive return ProcessRequest(request, true); } - protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding) + protected override string GetCommandLineArguments(string outputPath, EncodingOptions encodingOptions, StreamState state, bool isEncoding) { - var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); - return EncodingHelper.GetProgressiveVideoFullCommandLine(state, encodingOptions, outputPath, GetDefaultH264Preset()); } } diff --git a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj index 3e69e9f128..196bdd0961 100644 --- a/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj +++ b/MediaBrowser.Server.Mac/Emby.Server.Mac.csproj @@ -116,10 +116,10 @@ ..\packages\SkiaSharp.1.58.0\lib\net45\SkiaSharp.dll - ..\packages\SQLitePCLRaw.core.1.1.6\lib\net45\SQLitePCLRaw.core.dll + ..\packages\SQLitePCLRaw.core.1.1.7\lib\net45\SQLitePCLRaw.core.dll - ..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.6\lib\net45\SQLitePCLRaw.provider.sqlite3.dll + ..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.7\lib\net45\SQLitePCLRaw.provider.sqlite3.dll ..\ThirdParty\emby\Emby.Server.Connect.dll @@ -411,6 +411,9 @@ Resources\dashboard-ui\mypreferencesmenu.html + + Resources\dashboard-ui\mypreferencessubtitles.html + Resources\dashboard-ui\myprofile.html @@ -918,6 +921,12 @@ Resources\dashboard-ui\bower_components\emby-webcomponents\emby-radio\emby-radio.js + + Resources\dashboard-ui\bower_components\emby-webcomponents\emby-scrollbuttons\emby-scrollbuttons.css + + + Resources\dashboard-ui\bower_components\emby-webcomponents\emby-scrollbuttons\emby-scrollbuttons.js + Resources\dashboard-ui\bower_components\emby-webcomponents\emby-scroller\emby-scroller.js @@ -1476,6 +1485,15 @@ Resources\dashboard-ui\bower_components\emby-webcomponents\subtitleeditor\subtitleeditor.template.html + + Resources\dashboard-ui\bower_components\emby-webcomponents\subtitlesettings\subtitleappearancehelper.js + + + Resources\dashboard-ui\bower_components\emby-webcomponents\subtitlesettings\subtitlesettings.js + + + Resources\dashboard-ui\bower_components\emby-webcomponents\subtitlesettings\subtitlesettings.template.html + Resources\dashboard-ui\bower_components\emby-webcomponents\sync\emby-downloadbutton.js @@ -1488,15 +1506,18 @@ Resources\dashboard-ui\bower_components\emby-webcomponents\sync\syncjoblist.js - - Resources\dashboard-ui\bower_components\emby-webcomponents\sync\synctoggle.js - Resources\dashboard-ui\bower_components\emby-webcomponents\toast\toast.css Resources\dashboard-ui\bower_components\emby-webcomponents\toast\toast.js + + Resources\dashboard-ui\bower_components\emby-webcomponents\upnextdialog\upnextdialog.css + + + Resources\dashboard-ui\bower_components\emby-webcomponents\upnextdialog\upnextdialog.js + Resources\dashboard-ui\bower_components\emby-webcomponents\userdatabuttons\emby-playstatebutton.js @@ -1788,9 +1809,6 @@ Resources\dashboard-ui\css\librarybrowser.css - - Resources\dashboard-ui\css\librarymenu.css - Resources\dashboard-ui\css\livetv.css @@ -2082,84 +2100,6 @@ Resources\dashboard-ui\devices\ios\ios.css - - Resources\dashboard-ui\fonts\roboto\-l14jk06m6puhb-5mxqqnrjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\0ec6fl06luxeywpbsjvxcbjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\2tsd397wlxj96qwhynikxpeszw2xoq-xsnqo47m55da.woff2 - - - Resources\dashboard-ui\fonts\roboto\97uahxiqzroncbacei3awxjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\azmswpodyevhtrvuabjwvbtbgvql8ndjpwnre27mub0.woff2 - - - Resources\dashboard-ui\fonts\roboto\cwb0xya8bzo0ksthx0utua.woff2 - - - Resources\dashboard-ui\fonts\roboto\d-6iyplofoccackzxwxsoftxra8tvwticgirnjhmvjw.woff2 - - - Resources\dashboard-ui\fonts\roboto\e7mevayvogmqfwwl61pkhbtbgvql8ndjpwnre27mub0.woff2 - - - Resources\dashboard-ui\fonts\roboto\fcx7wwv8ozt71a3e1xoajveszw2xoq-xsnqo47m55da.woff2 - - - Resources\dashboard-ui\fonts\roboto\fl4y0qdoxyythegmxx8kcrjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\frnv30oaydlfrth2vnzzdhtbgvql8ndjpwnre27mub0.woff2 - - - Resources\dashboard-ui\fonts\roboto\gwvjdern2amz39wrsoz7fxtbgvql8ndjpwnre27mub0.woff2 - - - Resources\dashboard-ui\fonts\roboto\hgo13k-tfspn0qi1sfdufvtxra8tvwticgirnjhmvjw.woff2 - - - Resources\dashboard-ui\fonts\roboto\i3s1wsgsg9ycurv6puktorjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\nydwbdd4giq26g5xybhsfbjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\ooefwznlrtefzlymlvv1ubjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\pru33qjshpzsmg3z6vywnrjtnkitppoi_ivcxxdnrsc.woff2 - - - Resources\dashboard-ui\fonts\roboto\robotobold.woff - - - Resources\dashboard-ui\fonts\roboto\robotolight.woff - - - Resources\dashboard-ui\fonts\roboto\robotomedium.woff - - - Resources\dashboard-ui\fonts\roboto\robotoregular.woff - - - Resources\dashboard-ui\fonts\roboto\robotothin.woff - - - Resources\dashboard-ui\fonts\roboto\rxzjdnzeo3r5zsexge8uuvtxra8tvwticgirnjhmvjw.woff2 - - - Resources\dashboard-ui\fonts\roboto\style.css - - - Resources\dashboard-ui\fonts\roboto\ty9dfvlaziwdqq2dhoyjphtbgvql8ndjpwnre27mub0.woff2 - - - Resources\dashboard-ui\fonts\roboto\vvxugkzxbhtx_s_vctlpghtbgvql8ndjpwnre27mub0.woff2 - Resources\dashboard-ui\legacy\buttonenabled.js @@ -2358,6 +2298,9 @@ Resources\dashboard-ui\scripts\mypreferenceslanguages.js + + Resources\dashboard-ui\scripts\mypreferencessubtitles.js + Resources\dashboard-ui\scripts\myprofile.js @@ -2658,9 +2601,6 @@ Resources\dashboard-ui\themes\holiday\theme.js - - Resources\dashboard-ui\thirdparty\paper-button-style.css - Resources\dashboard-ui\thirdparty\jquerymobile-1.4.5\jqm.listview.css