Skip to content

Commit

Permalink
fix: use bundled ffmpeg
Browse files Browse the repository at this point in the history
We should use the cmd line to specify ffmpeg path. This will make
it impossible to let user specify custom ffmpeg now. If that is
a supported use case, we need to implement it in the preference
panel.
  • Loading branch information
gnattu committed Mar 28, 2024
1 parent 6a69d6b commit 7ab8a72
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Jellyfin Server/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,21 @@ class AppDelegate: NSObject, NSApplicationDelegate {

private func startJellyfinTask() {
let jellyfinPath = Bundle.main.path(forAuxiliaryExecutable: "jellyfin")
let ffmpegPath = Bundle.main.path(forAuxiliaryExecutable: "ffmpeg")
let webUIPath = Bundle.main.resourceURL!.appendingPathComponent("jellyfin-web").path

guard let jellyfinPath = jellyfinPath else {
present(alert: "Jellyfin Server was unable to start underlying jellyfin task.")
return
}

guard let ffmpegPath = ffmpegPath else {
present(alert: "Jellyfin Server was unable to find bundled ffmpeg.")
return
}

jellyfinProcess.launchPath = jellyfinPath
jellyfinProcess.arguments = ["--webdir", webUIPath, "--cache", applicationSupportJellyfinFolder.path]
jellyfinProcess.arguments = ["--webdir", webUIPath, "--ffmpeg", ffmpegPath, "--datadir", applicationSupportJellyfinFolder.path]

do {
try jellyfinProcess.run()
Expand Down

0 comments on commit 7ab8a72

Please sign in to comment.