diff --git a/content/en/docs/usage/configuration-options.md b/content/en/docs/usage/configuration-options.md index 2b55ce78..19bc9ce8 100644 --- a/content/en/docs/usage/configuration-options.md +++ b/content/en/docs/usage/configuration-options.md @@ -132,18 +132,19 @@ make it all uppercase. Ex: `ND_LOGLEVEL=debug`. See below for all available opti | In config file | As an environment variable | Description | Default Value | |------------------------------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------| | AlbumPlayCountMode | `ND_ALBUMPLAYCOUNTMODE` | Change how album play count is computed. When set to `"normalized"`, album play count will be divided by the number of album tracks | `"absolute"` | +| ArtistArtPriority[\*][artistcoverart] | `ND_AUTOTRANSCODEDOWNLOAD` | Enable toggle switch in the webui to download a transcoded file. | `"artist.*, album/artist.*, external"` | +| AutoTranscodeDownload | `ND_ARTISTARTPRIORITY` | Configure the order to look for artist images. | `"artist.*, album/artist.*, external"` | | AuthRequestLimit[\*][limit-login-attempts] | `ND_AUTHREQUESTLIMIT` | How many login requests can be processed from a single IP during the `AuthWindowLength`. Set to `0` to disable the limit rater | `5` | | AuthWindowLength[\*][limit-login-attempts] | `ND_AUTHWINDOWLENGTH` | Window Length for the authentication rate limit | `"20s"` | | AutoImportPlaylists | `ND_AUTOIMPORTPLAYLISTS` | Enable/disable `.m3u` playlist auto-import | `true` | -| DefaultPlaylistPublicVisibility | `ND_DEFAULTPLAYLISTPUBLICVISIBILITY` | Set imported playlists as public by default | `false` | -| ArtistArtPriority[\*][artistcoverart] | `ND_ARTISTARTPRIORITY` | Configure the order to look for artist images. | `"artist.*, album/artist.*, external"` | +| Backup.Count | `ND_BACKUP_COUNT` | Number of backups to keep | `0` (disabled) | | Backup.Path | `ND_BACKUP_PATH` | Path to store backups. Set to `""` to disable backups. Click [here][backup] for details | `""` (disabled) | | Backup.Schedule | `ND_BACKUP_SCHEDULE` | Schedule for automatic backups. Use [Cron syntax](https://en.wikipedia.org/wiki/Cron#CRON_expression) | `""` (disabled) | -| Backup.Count | `ND_BACKUP_COUNT` | Number of backups to keep | `0` (disabled) | | CoverArtPriority[\*][albumcoverart] | `ND_COVERARTPRIORITY` | Configure the order to look for cover art images. Use special `embedded` value to get embedded images from the audio files | `cover.*, folder.*, front.*, embedded, external` | | CoverJpegQuality | `ND_COVERJPEGQUALITY` | Set JPEG quality percentage for resized cover art images | `75` | | DefaultDownsamplingFormat | `ND_DEFAULTDOWNSAMPLINGFORMAT` | Format to transcode to when client requests downsampling (specify maxBitrate without a format) | `"opus"` | | DefaultLanguage | `ND_DEFAULTLANGUAGE` | Sets the default language used by the UI when logging in from a new browser. This value must match one of the file names in the [resources/i18n][i18n]. Ex: for Chinese Simplified it has to be `zh-Hans` (case sensitive) | `"en"` | +| DefaultPlaylistPublicVisibility | `ND_DEFAULTPLAYLISTPUBLICVISIBILITY` | Set imported playlists as public by default | `false` | | DefaultTheme | `ND_DEFAULTTHEME` | Sets the default theme used by the UI when logging in from a new browser. This value must match one of the options in the UI | `"Dark"` | | EnableArtworkPrecache | `ND_ENABLEARTWORKPRECACHE` | Enable image pre-caching of new added music | `true` | | EnableCoverAnimation | `ND_ENABLECOVERANIMATION` | Controls whether the player in the UI will animate the album cover (rotation) | `true` | @@ -163,19 +164,19 @@ make it all uppercase. Ex: `ND_LOGLEVEL=debug`. See below for all available opti | HTTPSecurityHeaders.CustomFrameOptionsValue | `ND_HTTPSECURITYHEADERS_CUSTOMFRAMEOPTIONSVALUE` | Allows the `X-Frame-Options` header value to be set with a custom value. Ex: `"SAMEORIGIN"` | `"DENY"` | | IgnoredArticles | `ND_IGNOREDARTICLES` | List of ignored articles when sorting/indexing artists | `"The El La Los Las Le Les Os As O A"` | | ImageCacheSize | `ND_IMAGECACHESIZE` | Size of image (art work) cache. Set to `"0"` to disable cache | `"100MB"` | -| Jukebox.Enabled | `ND_JUKEBOX_ENABLED` | Enable Jukebox mode (play audio on server's hardware) Click [here][jukebox-mode] for details | `false` | | Jukebox.AdminOnly | `ND_JUKEBOX_ADMINONLY` | By default, Jukebox mode is only available to Admins. Set this option to `false` to allow any valid user to control it | `true` | -| Jukebox.Devices | _(cannot be set as an environment variable)_ | List of devices that can be used by the Jukebox. Click [here][jukebox-config] for details | _Empty_ (auto detect) | | Jukebox.Default | `ND_JUKEBOX_DEFAULT` | Device to use for Jukebox mode, if there are multiple Jukebox.Devices entries. Click [here][jukebox-config] for details | _Empty_ (auto detect) | -| LastFM.Enabled | `ND_LASTFM_ENABLED` | Set this to `false` to completely disable Last.fm integration | `true` | +| Jukebox.Devices | _(cannot be set as an environment variable)_ | List of devices that can be used by the Jukebox. Click [here][jukebox-config] for details | _Empty_ (auto detect) | +| Jukebox.Enabled | `ND_JUKEBOX_ENABLED` | Enable Jukebox mode (play audio on server's hardware) Click [here][jukebox-mode] for details | `false` | | LastFM.ApiKey[\*][lastfm-integration] | `ND_LASTFM_APIKEY` | Last.fm API Key | _Empty_ | -| LastFM.Secret[\*][lastfm-integration] | `ND_LASTFM_SECRET` | Last.fm API Secret | _Empty_ | +| LastFM.Enabled | `ND_LASTFM_ENABLED` | Set this to `false` to completely disable Last.fm integration | `true` | | LastFM.Language | `ND_LASTFM_LANGUAGE` | [Two letter-code for language][language-codes] to be used to retrieve biographies from Last.fm | `"en"` | +| LastFM.Secret[\*][lastfm-integration] | `ND_LASTFM_SECRET` | Last.fm API Secret | _Empty_ | | ListenBrainz.BaseURL | `ND_LISTENBRAINZ_BASEURL` | Set this to override the default ListenBrainz base URL (useful with self-hosted solutions like Maloja[\*][maloja] | `https://api.listenbrainz.org/1/` | | ListenBrainz.Enabled | `ND_LISTENBRAINZ_ENABLED` | Set this to `false` to completely disable ListenBrainz integration | `true` | | MaxSidebarPlaylists | `ND_MAXSIDEBARPLAYLISTS` | Set the maximum number of playlists shown in the UI's sidebar. Note that a very large number can cause UI performance issues. | `100` | -| MPVPath | `ND_MPVPATH` | Path to `mpv` executable. Used for [Jukebox mode][jukebox-mode] | _Empty_ (search in PATH) | | MPVCmdTemplate | `ND_MPVCMDTEMPLATE` | Cmd template used to construct the call of the `mpv` executable. Used for [Jukebox mode][jukebox-cmd] | `mpv --audio-device=%d --no-audio-display --pause %f --input-ipc-server=%s` | +| MPVPath | `ND_MPVPATH` | Path to `mpv` executable. Used for [Jukebox mode][jukebox-mode] | _Empty_ (search in PATH) | | PasswordEncryptionKey[\*][encrypt-passwords] | `ND_PASSWORDENCRYPTIONKEY` | Passphrase used to encrypt passwords in the DB. Click [here][encrypt-passwords] for details | - | | PID.Album | `ND_PID_ALBUM` | Set the tag(s) to use as the Album ID. Click [here][pids] for details | `musicbrainz_albumid\|albumartistid,album,albumversion,releasedate` | | PID.Track | `ND_PID_TRACK` | Set the tag(s) to use as the Track ID. Click [here][pids] for details | `musicbrainz_trackid\|albumid,discnumber,tracknumber,title` | @@ -186,11 +187,12 @@ make it all uppercase. Ex: `ND_LOGLEVEL=debug`. See below for all available opti | RecentlyAddedByModTime | `ND_RECENTLYADDEDBYMODTIME` | Uses music files' modification time when sorting by "Recently Added". Otherwise use import time | `false` | | ReverseProxyUserHeader[\*][reverse-proxy-auth] | `ND_REVERSEPROXYUSERHEADER` | HTTP header containing the user name from an authenticating proxy. Click [here][reverse-proxy-config] for details. | `"Remote-User"` | | ReverseProxyWhitelist[\*][reverse-proxy-auth] | `ND_REVERSEPROXYWHITELIST` | Comma separated list of IP CIDRs (or when listening on a UNIX socket the special value `@`) which are allowed to use reverse proxy authentication. Empty means "deny all". Click [here][reverse-proxy-config] for details. Note: This option is unnecessary for most reverse proxy setups, only for *authenticating* reverse proxies. | _Empty_ | +| Scanner.ArtistJoiner | `ND_SCANNER_ARTISTJOINER` | Character string used to join multiple artists in display. Change this if you prefer a different separator between artist names | `" • "` | | Scanner.Enabled | `ND_SCANNER_ENABLED` | Enable/disable the scanner. Set to `false` to disable automatic scanning of the music library. | `true` | +| Scanner.ScanOnStartup | `ND_SCANNER_SCANONSTARTUP` | Enable/disable scanning the music library on startup. Set to `false` to disable | `true` | | Scanner.Schedule | `ND_SCANNER_SCHEDULE` | Schedule for automatic scans. Use [Cron syntax][cronspec] | `0` (disabled) | +| Scanner.Extractor | `ND_SCANNER_EXTRACTOR` | Method of tag extractrion Options: `ffmpeg`,`taglib` | `taglib` | | Scanner.WatcherWait | `ND_SCANNER_WATCHERWAIT` | Time to wait after a file change is detected before starting a scan. Useful to avoid scanning incomplete files. Set it to `0` to disable the watcher | `"5s"` | -| Scanner.ScanOnStartup | `ND_SCANNER_SCANONSTARTUP` | Enable/disable scanning the music library on startup. Set to `false` to disable | `true` | -| Scanner.ArtistJoiner | `ND_SCANNER_ARTISTJOINER` | Character string used to join multiple artists in display. Change this if you prefer a different separator between artist names | `" • "` | | SearchFullString | `ND_SEARCHFULLSTRING` | Match query strings anywhere in searchable fields, not only in word boundaries. Useful for languages where words are not space separated | `false` | | SessionTimeout | `ND_SESSIONTIMEOUT` | How long Navidrome will wait before closing web ui idle sessions | `"24h"` | | ShareURL | `ND_SHAREURL` | Base URL for shared links. Useful when your server address is not a public (ex: when using Tailscale). See discussion [here][share-url] | _Empty_ (use server address) | @@ -209,6 +211,11 @@ make it all uppercase. Ex: `ND_LOGLEVEL=debug`. See below for all available opti | UIWelcomeMessage | `ND_UIWELCOMEMESSAGE` | Add a welcome message to the login screen | _Empty_ | | UnixSocketPerm | `ND_UNIXSOCKETPERM` | Set file permissions for Unix Socket File.[\*][unix-socket] | `"0660"` | +#### Advanced Tips + +Most options can be seen directly in the [conf/configuration.go](https://github.com/navidrome/navidrome/blob/master/conf/configuration.go) source. +But beware, even when setting them in your `navidrome.toml` they can be ignored. + #### Notes - Durations are specified as a number and a unit suffix, such as "24h", "30s" or "1h10m". Valid diff --git a/content/en/docs/usage/transcoding-configuration/index.md b/content/en/docs/usage/transcoding-configuration/index.md new file mode 100644 index 00000000..52a51fe9 --- /dev/null +++ b/content/en/docs/usage/transcoding-configuration/index.md @@ -0,0 +1,133 @@ +--- +title: Transcoding Configuration +linkTitle: transcoding-configuration +date: 2024-12-21 +description: > + Information on how to configure transcoding +--- + +> You can set the transcoding for each player from the web. Settings > Players has all the players listed. Choose the player you want to configure and change the transcoding settings. If you set it to mp3, my understanding is everything will be transcoded to mp3 for that player. +[Original Answer by arsaboo](https://github.com/navidrome/navidrome/discussions/2326) + + + + +- Transcoding can be required in some situations. For example: trying to play + a [WMA](https://en.wikipedia.org/wiki/Windows_Media_Audio) file in a webbrowser, will **only** work for natively + supported formats by the browser you are using. (so playing that with Mozilla Firefox on Linux, will not work. Mozilla + even has their [own guide](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Audio_codecs) about audio + codecs). +from [Configuration Options Notes](docs/usage/configuration-options/#notes) + +Example: Browsers do not support `.AIFF` + +## Configuring transcoding using the navidrome.toml +In the navidrome.toml you can change the [basic configuration](https://www.navidrome.org/docs/usage/configuration-options/#basic-configuration) Some options however need to be written to the database, which can be achieved using the webui + +### `EnableTranscodingConfig`[\*][transcoding] + +### `TranscodingCacheSize` +size of the transcoding folder, located in /transcoding + +## Transcoding Options in the Web UI + +## `AutoTranscodeDownload` +> if we are not provided a format, see if we have requested transcoding for this client +> This must be enabled via a config option. For the UI, we are always given an option. +> This will impact other clients which do not use the UI + +[Source](https://github.com/navidrome/navidrome/blob/master/server/subsonic/stream.go) + + +## Enable transcoding for a player +Trough the webui you can specify if one of your clients schould use transcoding: +- Navigate to the player overview + +{{< imgproc player_overview Fit "2000x2000" /> +- After you can select a player and configure the transcoding (`format`) and Downsampling (`maxBitRate`) options: + +{{< imgproc player_options Fit "2000x2000" />}} + +> If no format is specified and no transcoding associated to the player, but a bitrate is specified, +> and there is no transcoding set for the player, we use the default downsampling format. +> But only if the requested bitRate is lower than the original bitRate. +[Source](https://github.com/navidrome/navidrome/blob/master/core/media_streamer.go) + +## Transcoding Configuration +If you set `EnableTranscodingConfig` to `true` you can change the transcoding options from the webui +{{< imgproc transcoding_options Fit "2000x2000" />}} + +## Default Transcoding Settings +If you messed up the defaults can be found in the [consts/consts.go](https://github.com/navidrome/navidrome/blob/master/consts/consts.go) Source. +As of writing this they are: + +```text +Name: "mp3 audio" +TargetFormat: "mp3" +DefaultBitRate: 192 +Command: "ffmpeg -i %s -ss %t -map 0:a:0 -b:a %bk -v 0 -f mp3 -" + +Name: "opus audio" +TargetFormat: "opus" +DefaultBitRate: 128 +Command: "ffmpeg -i %s -ss %t -map 0:a:0 -b:a %bk -v 0 -c:a libopus -f opus -" + +Name: "aac audio" +TargetFormat: "aac" +DefaultBitRate: 256 +Command: "ffmpeg -i %s -ss %t -map 0:a:0 -b:a %bk -v 0 -c:a aac -f adts -" +``` + +## File Formats + +In order to help you decide wether you need transcoding, here are two lists of file extensions. +Navidrome uses a patched version of [lijinke666/react-music-player](https://github.com/lijinke666/react-music-player) from where the firt list stems. [Fork](https://github.com/navidrome/react-music-player) + +### Might be Supported +- JPG +- JPEG +- PNG +- GIF +- EOT +- OTF +- WEBP +- SVG +- TTF +- WOFF +- WOFF2 +- MP4 +- WEBM +- WAV +- MP3 +- M4A +- AAC +- OGA + +[Source](https://github.com/lijinke666/react-music-player/blob/master/jest.config.js) + +### Probably need transcoding + +- 3GP (Third Generation Partnership Project) +- 8SVX (IFF-8SVX) +- ACT (Adaptive Differential Pulse Code Modulation) +- ADTS (Audio Data Transport Stream) +- AIFF (Audio Interchange File Format) +- ATRAC (Adaptive Transform Acoustic Coding) +- AWB (Adaptive Multi-Rate Wideband) +- DSS (Digital Speech Standard) +- DVF (Digital Voice File) +- GSM (Global System for Mobile Communications) +- Monkey's Audio (APE) +- MSV (Memory Stick Voice) +- Shorten (SHN) +- TTA (True Audio) +- Vox (Dialogic ADPCM) +- WavPack (WV) +- Windows Media Audio Lossless (WMA Lossless) +- Windows Media Audio Lossy (WMA) + +_yes i asked a [llm](https://chatgpt.com/) for this list_ + +## Additional Resources + +https://caniuse.com/?search=audio%20format diff --git a/content/en/docs/usage/transcoding-configuration/player_options.png b/content/en/docs/usage/transcoding-configuration/player_options.png new file mode 100644 index 00000000..891bb649 Binary files /dev/null and b/content/en/docs/usage/transcoding-configuration/player_options.png differ diff --git a/content/en/docs/usage/transcoding-configuration/player_overview.png b/content/en/docs/usage/transcoding-configuration/player_overview.png new file mode 100644 index 00000000..e8f61c9c Binary files /dev/null and b/content/en/docs/usage/transcoding-configuration/player_overview.png differ diff --git a/content/en/docs/usage/transcoding-configuration/transcoding_options.png b/content/en/docs/usage/transcoding-configuration/transcoding_options.png new file mode 100644 index 00000000..86319676 Binary files /dev/null and b/content/en/docs/usage/transcoding-configuration/transcoding_options.png differ