Browse Source

fix song progress with 4:3 resolutions (#1961)

pull/1964/head
Jason Dove 7 months ago committed by GitHub
parent
commit
f0a5d89f73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs
  3. 2
      ErsatzTV/ErsatzTV.csproj
  4. BIN
      ErsatzTV/Resources/song_progress_overlay_43.png

1
CHANGELOG.md

@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add `Song Video Mode` to channel settings
- `Default` - existing behavior
- `With Progress` - show animated progress bar at bottom of generated video
- Thanks to @JeckDev for the idea and the artwork
- Add fallback album art image for songs that have no album art
- Add `Vaapi Display` option to FFmpeg Profile
- Possible values will be install-specific and sourced from `vainfo`

4
ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs

@ -261,7 +261,9 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< @@ -261,7 +261,9 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
// override watermark as song_progress_overlay.png
if (videoVersion is BackgroundImageMediaVersion { IsSongWithProgress: true })
{
string image = "song_progress_overlay.png";
double ratio = channel.FFmpegProfile.Resolution.Width / (double)channel.FFmpegProfile.Resolution.Height;
bool is43 = Math.Abs(ratio - 4.0 / 3.0) < 0.01;
string image = is43 ? "song_progress_overlay_43.png" : "song_progress_overlay.png";
disableWatermarks = false;
playoutItemWatermark = new ChannelWatermark

2
ErsatzTV/ErsatzTV.csproj

@ -76,6 +76,7 @@ @@ -76,6 +76,7 @@
<EmbeddedResource Include="Resources\song_background_2.png" />
<EmbeddedResource Include="Resources\song_background_3.png" />
<EmbeddedResource Include="Resources\song_progress_overlay.png" />
<EmbeddedResource Include="Resources\song_progress_overlay_43.png" />
<EmbeddedResource Include="Resources\ErsatzTV.png" />
<EmbeddedResource Include="Resources\ISO-639-2_utf-8.txt" />
<EmbeddedResource Include="Resources\Templates\_default.ass.sbntxt" />
@ -87,7 +88,6 @@ @@ -87,7 +88,6 @@
<EmbeddedResource Include="Resources\Templates\_musicVideo.sbntxt" />
<EmbeddedResource Include="Resources\Templates\_otherVideo.sbntxt" />
<EmbeddedResource Include="Resources\Templates\_song.sbntxt" />
<EmbeddedResource Include="Resources\song_progress_overlay_43.png" />
</ItemGroup>
<ItemGroup>

BIN
ErsatzTV/Resources/song_progress_overlay_43.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Loading…
Cancel
Save