diff --git a/Jellyfin.Plugin.CinemaTrailers4Jellyfins/Services/FakeMovieService.cs b/Jellyfin.Plugin.CinemaTrailers4Jellyfins/Services/FakeMovieService.cs index ec070ef..cc265b2 100644 --- a/Jellyfin.Plugin.CinemaTrailers4Jellyfins/Services/FakeMovieService.cs +++ b/Jellyfin.Plugin.CinemaTrailers4Jellyfins/Services/FakeMovieService.cs @@ -97,13 +97,19 @@ namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services "-shortest", "-c:v libx264 -tune stillimage -pix_fmt yuv420p", "-c:a aac -b:a 64k", + "-f mp4", $"\"{tempPath}\""); + // Prefer Jellyfin's bundled ffmpeg; fall back to whatever is on PATH. + var ffmpegPath = File.Exists("/usr/lib/jellyfin-ffmpeg/ffmpeg") + ? "/usr/lib/jellyfin-ffmpeg/ffmpeg" + : "ffmpeg"; + using var process = new Process { StartInfo = new ProcessStartInfo { - FileName = "ffmpeg", + FileName = ffmpegPath, Arguments = args, RedirectStandardOutput = true, RedirectStandardError = true, @@ -135,7 +141,7 @@ namespace Jellyfin.Plugin.CinemaTrailers4Jellyfins.Services } catch (Exception ex) { - _logger.LogError(ex, "|CinemaTrailers4Jellyfins| Failed to generate the master fake-movie file. Is ffmpeg installed and on PATH?"); + _logger.LogError(ex, "|CinemaTrailers4Jellyfins| Failed to generate the master fake-movie file."); return false; } finally