[PR #12463] [MERGED] Prevent server from starting if the ffmpeg path is invalid #13209

Closed
opened 2026-02-07 07:09:00 +03:00 by OVERLORD · 0 comments
Owner

📋 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: masterHead: bail-out-when-ffmeg-invalid


📝 Commits (5)

  • 8fc4f62 Prevent server from starting if the ffmpeg path is invalid
  • 4c9b06b Allow invalid ffmpeg on github actions
  • 2decba9 Use dedicated env var to skip ffmpeg check
  • e72e1af Better comment
  • b54317f Use 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=true to 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.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/12463 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 8/17/2024 **Status:** ✅ Merged **Merged:** 8/28/2024 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `master` ← **Head:** `bail-out-when-ffmeg-invalid` --- ### 📝 Commits (5) - [`8fc4f62`](https://github.com/jellyfin/jellyfin/commit/8fc4f62ecd268d5de5b4ed2a7c5ef1dbe4096064) Prevent server from starting if the ffmpeg path is invalid - [`4c9b06b`](https://github.com/jellyfin/jellyfin/commit/4c9b06b3382f098d4d84a461ace389648af8f203) Allow invalid ffmpeg on github actions - [`2decba9`](https://github.com/jellyfin/jellyfin/commit/2decba9e4ca06df180375388952cfbfbbafbad5b) Use dedicated env var to skip ffmpeg check - [`e72e1af`](https://github.com/jellyfin/jellyfin/commit/e72e1af75e76f1f8675e5121b62397815c3d7cbb) Better comment - [`b54317f`](https://github.com/jellyfin/jellyfin/commit/b54317f4ee4d5badc08719370773f9448a5d7438) Use Microsoft.Extensions.Configuration ### 📊 Changes **6 files changed** (+43 additions, -73 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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=true` to bypass this check. <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:09:00 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13209