Skip to main content
Transcoding allows Jellyfin to convert media on-the-fly to formats compatible with client devices. Proper configuration ensures optimal quality, performance, and compatibility.

Encoding Configuration File

Transcoding settings are stored in encoding.xml:

FFmpeg Configuration

FFmpeg Path

Jellyfin requires FFmpeg for transcoding. Configure the path:
  • EncoderAppPath: Path set by user via UI
  • EncoderAppPathDisplay: Currently used path displayed on transcode page
Jellyfin automatically detects FFmpeg if installed in standard locations.

FFmpeg Probe Settings

Configure via environment variables:
These settings control how FFmpeg analyzes media files:
  • probesize: Amount of data to analyze (default: 1G)
  • analyzeduration: Duration to analyze (default: 200M)
Increase these values for files with complex or delayed streams.

Video Encoding

H.264 Encoding

Constant Rate Factor controls encoding quality:
  • Lower values = higher quality, larger files
  • Higher values = lower quality, smaller files
  • Range: 0-51 (default: 23)
  • Recommended: 18-28

H.265/HEVC Encoding

1

Enable HEVC

HEVC provides better compression but requires more processing:
2

CRF Configuration

HEVC typically uses higher CRF values than H.264:
  • Default: 28
  • Recommended: 24-32
  • CRF 28 (HEVC) ≈ CRF 23 (H.264) in quality
3

Hardware Support

Ensure client devices support HEVC decoding before enabling.

AV1 Encoding

AV1 provides excellent compression but is computationally intensive:
AV1 encoding requires significant CPU/GPU resources and is slower than H.264/HEVC.

Encoder Presets

Available presets (from fastest to slowest):
  • ultrafast - Fastest, lowest quality
  • superfast
  • veryfast - Good balance for real-time transcoding
  • faster
  • fast
  • medium - Default, balanced quality/speed
  • slow
  • slower
  • veryslow - Best quality, very slow
For real-time transcoding, use veryfast or faster. For offline encoding, use slow or slower.

Audio Encoding

Audio VBR

Variable Bit Rate for audio encoding provides better quality at lower bitrates.

Downmixing Configuration

Apply volume boost when downmixing surround to stereo:
  • Range: 0-10
  • Default: 2

Audio Codec Limitations

Jellyfin enforces channel limits for certain encoders:

Transcoding Behavior

Threading

  • -1: Auto (uses all available CPU cores)
  • 0: FFmpeg default
  • 1-N: Specific thread count
Setting to -1 allows FFmpeg to utilize all CPU resources for faster transcoding.

Throttling

Throttling is deprecated and disabled by default. Modern clients handle buffering automatically.

Segment Management

For HLS streaming, configure segment retention:
  • EnableSegmentDeletion: Auto-delete old segments
  • SegmentKeepSeconds: How long to keep segments (default: 720)

Muxing Queue

Buffer size for muxing operations (default: 2048).

Temporary Transcoding Path

Specify where temporary transcode files are stored:
1

Default Location

If not specified, uses system temp directory.
2

Fast Storage

Use SSD or RAM disk for better performance:
3

Disk Space

Ensure adequate space (4K transcoding can use 10-20 GB temporarily).
Using a RAM disk for transcoding significantly improves performance and reduces SSD wear.

Subtitle Configuration

Subtitle Extraction

Configure how subtitles are extracted from media:
  • EnableSubtitleExtraction: Allow extracting embedded subtitles
  • SubtitleExtractionTimeoutMinutes: Maximum time to spend extracting

Fallback Fonts

Specify fallback font for subtitle rendering.

Hardware Decoding

Codec Selection

Specify which codecs use hardware decoding:
  • h264 - H.264/AVC
  • hevc - H.265/HEVC
  • vc1 - VC-1
  • mpeg2video - MPEG-2
  • vp8 - VP8
  • vp9 - VP9
  • av1 - AV1

Advanced Decoding Options

Enable hardware decoding for 10-bit HEVC:

NVIDIA Enhanced Decoder

Enables enhanced NVDEC for Dolby Vision to SDR tone mapping.

System Native Decoder

Prefer OS-native hardware decoder (e.g., VideoToolbox on macOS).

Deinterlacing

Available deinterlacing algorithms:
  • yadif - Yet Another Deinterlacing Filter (recommended)
  • bwdif - Bob Weaver Deinterlacing Filter

Tone Mapping

Basic Tone Mapping

1

Enable Tone Mapping

Convert HDR content to SDR:
2

Algorithm Selection

Choose tone mapping algorithm:
Options:
  • bt2390 - ITU-R BT.2390 (recommended)
  • hable - Hable/Uncharted
  • mobius - Mobius
  • reinhard - Reinhard
3

Mode Configuration

Both default to auto for automatic detection.

Tone Mapping Parameters

  • TonemappingDesat: Desaturation strength (default: 0)
  • TonemappingPeak: Peak luminance in nits (default: 100)
  • TonemappingParam: Algorithm-specific parameter (default: 0)

Hardware-Specific Tone Mapping

Intel Video Post Processing tone mapping.

Intel Quick Sync Configuration

1

QSV Device

Specify QSV device (usually auto-detected):
2

Low Power Mode

Enable low power encoding (Xe+ architecture):

HLS Audio Seeking

Configure HLS audio seeking behavior:
  • DisableAccurateSeek - Faster seeking, less accurate (default)
  • EnableAccurateSeek - Slower seeking, more accurate

Keyframe Extraction

Enable on-demand keyframe extraction for trickplay thumbnails in specific formats.

Performance Optimization

Use Hardware Encoding

Enable hardware acceleration for 10-20x faster transcoding with lower CPU usage.

RAM Disk for Transcodes

Store temporary transcodes in RAM disk for faster I/O and reduced disk wear.

Optimize Thread Count

Set EncodingThreadCount to -1 to use all CPU cores efficiently.

Adjust CRF Values

Balance quality and performance by tuning CRF settings for your use case.

Troubleshooting

1

Transcoding Fails

Check:
  • FFmpeg is installed and path is correct
  • Sufficient disk space in transcode directory
  • Encoding settings are compatible with source media
2

Poor Quality Output

Adjust:
  • Lower CRF values for better quality
  • Use slower encoder preset
  • Increase bitrate limits
3

Slow Transcoding

Optimize:
  • Enable hardware encoding
  • Use faster encoder preset
  • Reduce thread count if CPU is overloaded
4

Audio Out of Sync

Verify:
  • Source file is not corrupted
  • Audio downmix settings are appropriate
  • HLS audio seek strategy is suitable

Next Steps

Hardware Acceleration

Set up GPU acceleration for optimal performance

Configuration

Review general server configuration options