Explain how to install subtitles in Docker (#1136)
Some checks failed
build / Build (push) Has been cancelled
lint / Lint TypeScript/JavaScript (push) Has been cancelled
lint / Lint Markdown (push) Has been cancelled
test / Test URLs (test:blog-urls) (push) Has been cancelled
test / Test URLs (test:docs-urls) (push) Has been cancelled
test / Test URLs (test:web-urls) (push) Has been cancelled
build / Deploy to GitHub Pages (push) Has been cancelled
build / Deploy to Cloudflare Pages (push) Has been cancelled

This commit is contained in:
p0358 2024-10-22 15:13:10 +02:00 committed by GitHub
parent cd816aef1f
commit 21e9387e31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 2 deletions

View File

@ -113,7 +113,7 @@ Jellyfin uses fonts to render text in many places.
### Server Side System Fonts
The system fonts installed on the server are used for burning in subtitles and rendering cover images. How to install them depends on the operating system.
The system fonts installed on the server are used for burning in subtitles and rendering cover images. How to install them depends on the operating system or if a container is being used.
### Client Side System Fonts
@ -121,7 +121,9 @@ The system fonts installed on the client devices are used to display the text in
### Fallback Fonts
The `Fallback Fonts` option is currently used by the web client to render subtitles only. This can be set to a folder containing fonts for this purpose. These fonts are limited to a total size of 20MB. Lightweight formats optimized for web like woff2 are recommended. A tool to convert normal TrueType (`.ttf`) and OpenType (`.otf`) fonts to woff2 can be found [in their repo](https://github.com/google/woff2).
The `Fallback Fonts` installed on the server are loaded up by the web client to render ASS subtitles. They will be used if no other existing fonts (such as MKV attachments or client-side fonts) can be used to render certain glyphs, such as CJK characters, instead of displaying an empty "tofu" block.
This setting can be set to a folder on the server containing fonts for this purpose. These fonts are limited to a total size of 20 MB, since all of them will be always preloaded in the browser, regardless of whether they'll be needed or not. Lightweight formats optimized for web like woff2 are recommended. A tool to convert normal TrueType (`.ttf`) and OpenType (`.otf`) fonts to woff2 can be found [in their repo](https://github.com/google/woff2).
### Downloading Fonts

View File

@ -83,6 +83,18 @@ Multiple media libraries can be bind mounted if needed:
...etc
```
Custom [server-side system fonts](/docs/general/administration/configuration/#server-side-system-fonts) directory can be optionally bind mounted in order to use these fonts during transcoding with subtitle burn-in:
```sh
--mount type=bind,source=/path/to/fonts,target=/usr/local/share/fonts/custom,readonly
```
A directory of [fallback fonts](/docs/general/administration/configuration/#fallback-fonts) can be mounted as well. In this case, you will have to set the directory of fallback fonts to `/fallback_fonts` in Jellyfin server settings panel:
```sh
--mount type=bind,source=/path/to/fallback/fonts,target=/fallback_fonts,readonly
```
### Using Docker Compose
Create a `docker-compose.yml` file with the following contents. Add in the UID and GID that you would like to run jellyfin as in the user line below, or remove the user line to use the default (root).
@ -104,6 +116,11 @@ services:
source: /path/to/media2
target: /media2
read_only: true
# Optional - extra fonts to be used during transcoding with subtitle burn-in
- type: bind
source: /path/to/fonts
target: /usr/local/share/fonts/custom
read_only: true
restart: 'unless-stopped'
# Optional - alternative address used for autodiscovery
environment: