mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #12463] [MERGED] Prevent server from starting if the ffmpeg path is invalid #13209
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/12463
Author: @gnattu
Created: 8/17/2024
Status: ✅ Merged
Merged: 8/28/2024
Merged by: @crobibero
Base:
master← Head:bail-out-when-ffmeg-invalid📝 Commits (5)
8fc4f62Prevent server from starting if the ffmpeg path is invalid4c9b06bAllow invalid ffmpeg on github actions2decba9Use dedicated env var to skip ffmpeg checke72e1afBetter commentb54317fUse Microsoft.Extensions.Configuration📊 Changes
6 files changed (+43 additions, -73 deletions)
View changed files
📝
Emby.Server.Implementations/ApplicationHost.cs(+6 -1)📝
Emby.Server.Implementations/ConfigurationOptions.cs(+2 -1)📝
MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs(+13 -0)📝
MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs(+2 -8)📝
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs(+18 -63)📝
tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs(+2 -0)📄 Description
We've received numerous reports from users that Jellyfin is failing to play certain files, and it turns out that many of these issues are due to invalid FFmpeg configurations, such as incorrect installation, stale configuration values, or an unsupported FFmpeg version. The server currently still starts in this situation, leading users to mistakenly believe it's a server bug rather than a configuration error.
This PR makes the server be prevented from starting and print a helper text to help the user fix the installation if the FFmpeg path is not found, not supported, or not executable.
This also removed the internal logic to update the config file's ffmpeg path as we are no longer using that.
For debug purposes that want to run jellyfin without ffmpeg, set the env var
JELLYFIN_FFMPEG__NOVALIDATION=trueto bypass this check.Changes
Issues
Some of the reports that turns out to be a config/installation issue. These might not be all of them:
#11543
#11577
#11696
#12042
#12411
#12458
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.