diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations')
3 files changed, 19 insertions, 21 deletions
diff --git a/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs b/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs index 7be187396..fa4231612 100644 --- a/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs +++ b/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs @@ -4,9 +4,9 @@ namespace MediaBrowser.Server.Implementations.Drawing { public class PlayedIndicatorDrawer { - private const int IndicatorHeight = 50; - public const int IndicatorWidth = 50; - private const int FontSize = 50; + private const int IndicatorHeight = 40; + public const int IndicatorWidth = 40; + private const int FontSize = 40; private const int OffsetFromTopRightCorner = 10; public void DrawPlayedIndicator(Graphics graphics, Size imageSize) @@ -17,7 +17,7 @@ namespace MediaBrowser.Server.Implementations.Drawing { graphics.FillEllipse(backdroundBrush, x, OffsetFromTopRightCorner, IndicatorWidth, IndicatorHeight); - x = imageSize.Width - 55 - OffsetFromTopRightCorner; + x = imageSize.Width - 45 - OffsetFromTopRightCorner; using (var font = new Font("Webdings", FontSize, FontStyle.Regular, GraphicsUnit.Pixel)) { diff --git a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs index 11d812a43..695c6390a 100644 --- a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs +++ b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs @@ -1,16 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Drawing; namespace MediaBrowser.Server.Implementations.Drawing { public class UnplayedCountIndicator { - private const int IndicatorHeight = 50; - public const int IndicatorWidth = 50; + private const int IndicatorHeight = 41; + public const int IndicatorWidth = 41; private const int OffsetFromTopRightCorner = 10; public void DrawUnplayedCountIndicator(Graphics graphics, Size imageSize, int count) @@ -23,13 +18,13 @@ namespace MediaBrowser.Server.Implementations.Drawing var text = count.ToString(); - x = imageSize.Width - 50 - OffsetFromTopRightCorner; - var y = OffsetFromTopRightCorner + 7; - var fontSize = 30; + x = imageSize.Width - IndicatorWidth - OffsetFromTopRightCorner; + var y = OffsetFromTopRightCorner + 6; + var fontSize = 24; if (text.Length == 1) { - x += 11; + x += 10; } else if (text.Length == 2) { @@ -37,9 +32,9 @@ namespace MediaBrowser.Server.Implementations.Drawing } else if (text.Length == 3) { - //x += 1; - y += 3; - fontSize = 24; + x += 1; + y += 1; + fontSize = 20; } using (var font = new Font("Sans-Serif", fontSize, FontStyle.Regular, GraphicsUnit.Pixel)) diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs b/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs index 187dc19bf..990b695ae 100644 --- a/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs +++ b/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs @@ -863,8 +863,10 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder throw new ArgumentNullException("outputPath"); } + // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600. + // This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar var vf = "crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,scale=600:600/dar"; - // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600. This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar + if (threedFormat.HasValue) { switch (threedFormat.Value) @@ -888,8 +890,9 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder } } + // Use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back just in case. var args = useIFrame ? string.Format("-i {0} -threads 0 -v quiet -vframes 1 -vf \"thumbnail,{2}\" -f image2 \"{1}\"", inputPath, outputPath, vf) : - string.Format("-i {0} -threads 0 -v quiet -vframes 1 -vf \"{2}\" -f image2 \"{1}\"", inputPath, outputPath, vf); //use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back jic + string.Format("-i {0} -threads 0 -v quiet -vframes 1 -vf \"{2}\" -f image2 \"{1}\"", inputPath, outputPath, vf); var probeSize = GetProbeSizeArgument(type); |
