jellyfin / jellyfin
Jellyfin / jellyfin
Jellyfin: The Free Software Media System
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby’s 3.5.2 release and ported to the .NET platform to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team that wants to build something better and work together to achieve it.
Jellyfin:自由软件媒体系统 Jellyfin 是一个自由软件媒体系统,让您可以掌控自己的媒体管理与流媒体播放。它是专有软件 Emby 和 Plex 的替代品,旨在通过多种应用程序将媒体内容从专用服务器传输到终端用户设备。Jellyfin 源自 Emby 3.5.2 版本,并被移植到 .NET 平台以实现全面的跨平台支持。这里没有任何附加条件、高级许可证或功能限制,也没有隐藏议程:只有一个致力于构建更好产品并共同努力实现目标的团队。
We welcome anyone who is interested in joining us in our quest! For further details, please see our documentation page. To receive the latest updates, get help with Jellyfin, and join the community, please visit one of our communication channels. For more information about the project, please see our about page.
我们欢迎任何有兴趣加入我们行列的人!欲了解更多详情,请参阅我们的文档页面。如需获取最新更新、寻求 Jellyfin 帮助或加入社区,请访问我们的交流渠道。有关该项目的更多信息,请参阅我们的关于页面。
Want to get started? Check out our downloads page or our installation guide, then see our quick start guide. You can also build from source. Something not working right? Open an Issue on GitHub. Want to contribute? Check out our contributing choose-your-own-adventure to see where you can help, then see our contributing guide and our community standards. New idea or improvement? Check out our feature request hub. Don’t see Jellyfin in your language? Check out our Weblate instance to help translate Jellyfin and its subprojects.
想要开始使用?请查看我们的下载页面或安装指南,然后参阅我们的快速入门指南。您也可以从源代码构建。遇到问题?请在 GitHub 上提交 Issue。想要贡献代码?请查看我们的“贡献选择冒险”页面了解您可以提供帮助的地方,然后参阅我们的贡献指南和社区准则。有新想法或改进建议?请查看我们的功能请求中心。没有看到您的语言版本?请访问我们的 Weblate 实例,帮助翻译 Jellyfin 及其子项目。
Jellyfin Server
This repository contains the code for Jellyfin’s backend server. Note that this is only one of many projects under the Jellyfin GitHub organization on GitHub. If you want to contribute, you can start by checking out our documentation to see what to work on.
Jellyfin 服务器 本仓库包含 Jellyfin 后端服务器的代码。请注意,这只是 GitHub 上 Jellyfin 组织下的众多项目之一。如果您想做出贡献,可以先查看我们的文档,了解从何处入手。
Server Development
These instructions will help you get set up with a local development environment in order to contribute to this repository. Before you start, please be sure to completely read our guidelines on development contributions. Note that this project is supported on all major operating systems except FreeBSD, which is still incompatible.
服务器开发 这些说明将帮助您设置本地开发环境,以便为本仓库做出贡献。在开始之前,请务必完整阅读我们的开发贡献指南。请注意,本项目支持所有主流操作系统,但 FreeBSD 尚不兼容。
Prerequisites
Before the project can be built, you must first install the .NET 10 SDK on your system. Instructions to run this project from the command line are included here, but you will also need to install an IDE if you want to debug the server while it is running. Any IDE that supports .NET 6 development will work, but two options are recent versions of Visual Studio (at least 2022) and Visual Studio Code. ffmpeg will also need to be installed.
先决条件 在构建项目之前,您必须先在系统上安装 .NET 10 SDK。此处包含了从命令行运行该项目的说明,但如果您想在服务器运行时进行调试,还需要安装 IDE。任何支持 .NET 6 开发的 IDE 均可,推荐使用较新版本的 Visual Studio(至少 2022 版)或 Visual Studio Code。此外,还需要安装 ffmpeg。
Cloning the Repository
After dependencies have been installed you will need to clone a local copy of this repository. If you just want to run the server from source you can clone this repository directly, but if you are intending to contribute code changes to the project, you should set up your own fork of the repository. The following example shows how you can clone the repository directly over HTTPS.
git clone https://github.com/jellyfin/jellyfin.git
克隆仓库
安装依赖项后,您需要克隆一份本仓库的本地副本。如果您只是想从源代码运行服务器,可以直接克隆此仓库;但如果您打算为项目贡献代码更改,则应设置自己的仓库分支(Fork)。以下示例展示了如何通过 HTTPS 直接克隆仓库。
git clone https://github.com/jellyfin/jellyfin.git
Installing the Web Client
The server is configured to host the static files required for the web client in addition to serving the backend by default. Before you can run the server, you will need to get a copy of the web client since they are not included in this repository directly. Note that it is recommended for development to host the web client separately from the web server with some additional configuration, in which case you can skip this step. There are two options to get the files for the web client:
- Build them from source following the instructions on the jellyfin-web repository.
- Get the pre-built files from an existing installation of the server. For example, with a Windows server installation the client files are located at
C:\Program Files\Jellyfin\Server\jellyfin-web.
安装 Web 客户端 服务器默认配置为在提供后端服务的同时托管 Web 客户端所需的静态文件。在运行服务器之前,您需要获取一份 Web 客户端副本,因为它们并未直接包含在此仓库中。请注意,开发时建议将 Web 客户端与 Web 服务器分开托管并进行额外配置,这种情况下您可以跳过此步骤。获取 Web 客户端文件有两种方式:
- 按照 jellyfin-web 仓库中的说明从源代码构建。
- 从现有的服务器安装中获取预构建文件。例如,在 Windows 服务器安装中,客户端文件位于
C:\Program Files\Jellyfin\Server\jellyfin-web。
Running The Server
The following instructions will help you get the project up and running via the command line, or your preferred IDE.
运行服务器 以下说明将帮助您通过命令行或您偏好的 IDE 启动并运行项目。
Running With Visual Studio
To run the project with Visual Studio you can open the Solution (.sln) file and then press F5 to run the server.
使用 Visual Studio 运行 要使用 Visual Studio 运行项目,您可以打开解决方案 (.sln) 文件,然后按 F5 键运行服务器。
Running With Visual Studio Code
To run the project with Visual Studio Code you will first need to open the repository directory with Visual Studio Code using the Open Folder… option. Second, you need to install the recommended extensions for the workspace. Note that extension recommendations are classified as either “Workspace Recommendations” or “Other Recommendations”, but only the “Workspace Recommendations” are required. After the required extensions are installed, you can run the server by pressing F5.
使用 Visual Studio Code 运行 要使用 Visual Studio Code 运行项目,首先需要使用“打开文件夹…”选项打开仓库目录。其次,您需要安装工作区推荐的扩展。请注意,扩展推荐分为“工作区推荐”或“其他推荐”,但仅需安装“工作区推荐”即可。安装所需扩展后,按 F5 键即可运行服务器。
Running From the Command Line
To run the server from the command line you can use the dotnet run command. The example below shows how to do this if you have cloned the repository into a directory named jellyfin (the default directory name) and should work on all operating systems.
cd jellyfin # Move into the repository directory
dotnet run --project Jellyfin.Server --webdir /absolute/path/to/jellyfin-web/dist # Run the server startup project
从命令行运行
要从命令行运行服务器,可以使用 dotnet run 命令。以下示例展示了如果您已将仓库克隆到名为 jellyfin(默认目录名)的目录中该如何操作,此方法适用于所有操作系统。
cd jellyfin # 进入仓库目录
dotnet run --project Jellyfin.Server --webdir /absolute/path/to/jellyfin-web/dist # 运行服务器启动项目
A second option is to build the project and then run the resulting executable file directly. When running the executable directly you can easily add command line options. Add the --help flag to list details on all the supported command line options.
dotnet build # Build the project
cd Jellyfin.Server/bin/Debug/net10.0 # Change into the build output directory
Execute the build output. On Linux, Mac, etc. use ./jellyfin and on Windows use jellyfin.exe.
另一种选择是构建项目,然后直接运行生成的执行文件。直接运行可执行文件时,您可以轻松添加命令行选项。添加 --help 标志可列出所有支持的命令行选项详情。
dotnet build # 构建项目
cd Jellyfin.Server/bin/Debug/net10.0 # 进入构建输出目录
执行构建输出。在 Linux、Mac 等系统上使用 ./jellyfin,在 Windows 上使用 jellyfin.exe。
Accessing the Hosted Web Client
If the Server is configured to host the Web Client, and the Server is running, the Web Client can be accessed at http://localhost:8096 by default. API documentation can be viewed at http://localhost:8096/api-docs/swagger/index.html.
访问托管的 Web 客户端
如果服务器已配置为托管 Web 客户端且正在运行,则默认可以通过 http://localhost:8096 访问 Web 客户端。API 文档可在 http://localhost:8096/api-docs/swagger/index.html 查看。
Running from GitHub Codespaces
As Jellyfin will run on a container on a GitHub hosted server, JF needs to handle some things differently. NOTE: Depending on the selected configuration (if you just click ‘create codespace’ it will create a default configuration one) it might take 20-3…
从 GitHub Codespaces 运行 由于 Jellyfin 将在 GitHub 托管服务器的容器上运行,因此 JF 需要以不同的方式处理某些事项。注意:根据所选配置(如果您直接点击“创建 codespace”,它将创建一个默认配置的实例),可能需要 20-3…