* optionally include progress bar in generated song video * update progress bar size/location * move everything up 10% when song progress is enabled * add watermark border to song progress bar * always show accurate progress bar * lower progress bar to 90% alpha * update changelog
32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using ErsatzTV.Core.Interfaces.FFmpeg;
|
|
using ErsatzTV.FFmpeg.Format;
|
|
|
|
namespace ErsatzTV.Core.Domain;
|
|
|
|
public class BackgroundImageMediaVersion : MediaVersion
|
|
{
|
|
public static BackgroundImageMediaVersion ForPath(string path, IDisplaySize resolution, bool isSongWithProgress = false) =>
|
|
new()
|
|
{
|
|
Chapters = [],
|
|
// image has been pre-generated with correct size
|
|
Height = resolution.Height,
|
|
Width = resolution.Width,
|
|
SampleAspectRatio = "1:1",
|
|
Streams =
|
|
[
|
|
new MediaStream
|
|
{
|
|
MediaStreamKind = MediaStreamKind.Video,
|
|
Index = 0,
|
|
Codec = VideoFormat.GeneratedImage,
|
|
PixelFormat = new PixelFormatUnknown().Name // the resulting pixel format is unknown
|
|
}
|
|
],
|
|
MediaFiles = [new MediaFile { Path = path }],
|
|
IsSongWithProgress = isSongWithProgress
|
|
};
|
|
|
|
public bool IsSongWithProgress { get; private set; }
|
|
}
|