fix: download trailers as separate video+audio and merge with ffmpeg (v1.0.0.10)
All checks were successful
Publish Release / release (push) Successful in 26s

YouTube stopped serving muxed streams and YoutubeExplode 6.6.0 failed on
every video ("Video is not available"), so no trailer downloaded. Bump
YoutubeExplode to 6.6.2, download the best video-only + audio-only streams
and stream-copy them into one MP4 with ffmpeg. The separate files are
always deleted afterwards, merge or not.

Also delete the trailer folder when a download fails. Empty folders were
treated as "already downloaded" (never retried) and counted toward
MaxTotalTrailers, so over time they pushed out every real trailer. The
skip check now requires the trailer file itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin
2026-10-05 17:42:28 -04:00
parent e518b79c36
commit 5176582391
6 changed files with 146 additions and 31 deletions

View File

@@ -0,0 +1,12 @@
using System.IO;
namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services
{
internal static class FfmpegLocator
{
private const string JellyfinFfmpeg = "/usr/lib/jellyfin-ffmpeg/ffmpeg";
// Prefer Jellyfin's bundled ffmpeg; fall back to whatever is on PATH.
public static string Path => File.Exists(JellyfinFfmpeg) ? JellyfinFfmpeg : "ffmpeg";
}
}