Best Handbrake & FFmpeg Settings for Jellyfin 2026: Encode for Zero Transcoding on Every Device

Best Handbrake & FFmpeg Settings for Jellyfin 2026: Encode for Zero Transcoding on Every Device

Best Handbrake and FFmpeg Settings for Jellyfin in 2026: Encode for Direct Play on Every Device

You have a library of media files in random formats. Some are ancient XviD AVI files. Some are 80 GB Blu-ray remuxes. Some are H.264, some H.265, some have DTS audio that half your clients cannot play. The result: constant transcoding, buffering, and frustrated users.

The fix is encoding your files once, correctly, so every Jellyfin client Direct Plays them without your server lifting a finger. This guide gives you the exact settings.


The Goal: Zero Transcoding

A properly encoded file should:

  • Direct Play on 95%+ of devices (phones, TVs, browsers, streaming sticks)
  • Look indistinguishable from the source at normal viewing distance
  • Use reasonable storage (not 80 GB per movie, not 1 GB either)
  • Include compatible audio so no device triggers an audio transcode
  • Use text subtitles so no device triggers a burn-in transcode

Quick Reference: Copy-Paste Settings

For 1080p Content (Most Libraries)

SettingHandbrakeFFmpeg equivalent
Video codecH.265 (x265)libx265
QualityRF 20-crf 20
PresetMedium-preset medium
ProfileMain 10-profile:v main10
Audio 1AAC Stereo 160 kbps-c:a aac -b:a 160k
Audio 2EAC3 5.1 640 kbps (if source is surround)-c:a:1 eac3 -b:a:1 640k
ContainerMKV.mkv
SubtitlesPassthrough (text only)-c:s copy (SRT/ASS only)

For 4K HDR Content

SettingHandbrakeFFmpeg equivalent
Video codecH.265 (x265) 10-bitlibx265 -pix_fmt yuv420p10le
QualityRF 18-crf 18
PresetSlow-preset slow
HDRPassthrough (HDR10 metadata)See HDR section below
Audio 1EAC3 Atmos 768 kbps-c:a eac3 -b:a 768k
Audio 2AAC Stereo 160 kbps-c:a:1 aac -b:a:1 160k
ContainerMKV.mkv

Understanding CRF (Constant Rate Factor)

CRF controls quality. Lower number = higher quality = larger file.

CRFQualityTypical 1080p movie sizeUse case
16-17Near-transparent8-15 GBArchival, reference quality
18-20Excellent4-8 GBRecommended for most libraries
21-23Very good2-5 GBStorage-constrained setups
24-26Good1-3 GBMobile/remote streaming
27+Noticeable lossUnder 1.5 GBNot recommended

The sweet spot for Jellyfin is CRF 18-20 for 1080p and CRF 16-18 for 4K. At these values, the encode is visually indistinguishable from the source on a normal TV at normal viewing distance.


Handbrake: Step-by-Step Configuration

Video Tab

  1. Video Encoder: H.265 (x265)
  2. Framerate: Same as source, Variable
  3. Quality: Constant Quality, RF 20 (1080p) or RF 18 (4K)
  4. Encoder Preset: Medium (balance of speed and compression)
    • Slow gives ~10% better compression but takes 2-3x longer
    • Fast saves time but files are 15-20% larger
  5. Encoder Profile: Main 10 (required for HDR, recommended for all)
  6. Encoder Level: Auto

Audio Tab

This is where most people make mistakes. You need two audio tracks for maximum compatibility:

Track 1 (surround, for home theater):

  • Codec: E-AC3 (EAC3)
  • Mixdown: 5.1 Surround (or passthrough if source is already EAC3)
  • Bitrate: 640 kbps

Track 2 (stereo fallback, for phones and browsers):

  • Codec: AAC (avcodec)
  • Mixdown: Stereo
  • Bitrate: 160 kbps

Why two tracks? EAC3 5.1 gives surround sound on TVs and receivers. AAC stereo ensures phones, tablets, and browsers never trigger an audio transcode. Every device picks the track it can handle.

Subtitles Tab

  • Add all SRT/ASS subtitle tracks from the source
  • Do NOT add PGS or VobSub (image-based subtitles force a full video transcode)
  • If you need PGS subtitles, convert them to SRT first using SubtitleEdit or PGS2SRT

Container

  • MKV is recommended. It supports all codecs, multiple audio tracks, and multiple subtitle tracks.
  • MP4 works but has limitations with some subtitle formats and codec combinations.

FFmpeg: Command-Line Recipes

1080p H.265 Encode with Dual Audio

ffmpeg -i input.mkv \
  -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s? \
  -c:v libx265 -crf 20 -preset medium -profile:v main10 \
  -c:a:0 eac3 -b:a:0 640k -ac:a:0 6 \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy \
  -metadata:s:a:0 title="Surround 5.1" \
  -metadata:s:a:1 title="Stereo" \
  output.mkv

4K HDR10 Encode (Preserving HDR Metadata)

ffmpeg -i input.mkv \
  -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s? \
  -c:v libx265 -crf 18 -preset slow \
  -profile:v main10 -pix_fmt yuv420p10le \
  -x265-params "hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smt2084:colormatrix=bt2020nc:max-cll=1000,400" \
  -c:a:0 eac3 -b:a:0 768k \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy \
  output.mkv

Quick H.264 Encode (Maximum Compatibility)

For files that must play on absolutely everything, including old smart TVs and budget devices:

ffmpeg -i input.mkv \
  -c:v libx264 -crf 22 -preset medium -profile:v high -level 4.1 \
  -c:a aac -b:a 192k -ac 2 \
  -c:s copy \
  -movflags +faststart \
  output.mp4

Batch Encode an Entire Folder

for f in *.mkv; do
  ffmpeg -i "$f" \
    -c:v libx265 -crf 20 -preset medium -profile:v main10 \
    -c:a:0 eac3 -b:a:0 640k \
    -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
    -c:s copy \
    "encoded/${f}"
done

H.264 vs H.265 vs AV1: Which Codec to Use

CodecFile size (1080p)Client supportEncode speedRecommendation
H.2646-12 GBUniversal (100%)FastLegacy devices, maximum compatibility
H.2653-7 GBVery wide (95%+)MediumRecommended default for 2026
AV12-5 GBGrowing (70-80%)Very slowFuture-proof, bandwidth-constrained

H.265 is the right choice for most Jellyfin libraries in 2026. It offers the best balance of compression, quality, and client support. H.264 is the fallback for maximum compatibility. AV1 is worth considering only if all your clients support it.


Preserving HDR: What You Need to Know

HDR10

HDR10 metadata is preserved automatically by both Handbrake and FFmpeg when encoding with 10-bit H.265. No special configuration needed beyond using Main 10 profile.

Dolby Vision

Dolby Vision is significantly harder to preserve during encoding. A standard Handbrake or FFmpeg encode strips Dolby Vision metadata entirely.

To preserve DV, you need specialized tools:

  1. Extract the DV layer with dovi_tool
  2. Encode the base layer with x265
  3. Re-inject the DV metadata with dovi_tool and mp4muxer

For most users: if the file has Dolby Vision, keep the remux. Only encode DV content if you are comfortable with the specialized workflow.

HDR10+

HDR10+ dynamic metadata can be preserved with recent versions of x265 and FFmpeg. Add --dhdr10-info to your x265 parameters with the extracted metadata JSON.


GPU-Accelerated Encoding

Software encoding (x265) produces the best quality per bit. But if you have thousands of files to process, GPU encoding is 5-10x faster.

NVIDIA NVENC (FFmpeg)

ffmpeg -i input.mkv \
  -c:v hevc_nvenc -preset p5 -rc constqp -qp 24 \
  -c:a eac3 -b:a 640k \
  output.mkv

Intel QSV (FFmpeg)

ffmpeg -i input.mkv \
  -c:v hevc_qsv -preset medium -global_quality 22 \
  -c:a eac3 -b:a 640k \
  output.mkv

Quality note: GPU encoders produce slightly larger files at the same visual quality compared to software x265. Expect 20-30% larger files at equivalent quality. The trade-off is speed.


Automating Encodes with Tdarr

For large libraries, manual encoding is impractical. Tdarr automates the process:

  1. Point Tdarr at your media folders
  2. Configure a plugin: "If not H.265, transcode to H.265 CRF 20 with EAC3 + AAC audio"
  3. Tdarr processes files in the background
  4. Jellyfin library refreshes automatically

See our dedicated Tdarr guide for the full setup.

JellyWatchTry JellyWatch — Your Jellyfin companion, everywhere.

File Size Expectations After Encoding

SourceH.265 CRF 20H.265 CRF 18Storage saved
1080p Blu-ray remux (25 GB)4-7 GB6-10 GB60-80%
4K Blu-ray remux (60 GB)12-20 GB18-30 GB50-70%
1080p H.264 encode (8 GB)3-5 GB4-7 GB35-55%
DVD rip (4 GB)1-2 GB1.5-3 GB50-65%

Common Encoding Mistakes

MistakeWhy it is badFix
Only AAC stereo audioSurround sound lostAdd EAC3 5.1 as primary track
Including PGS subtitlesForces burn-in transcodeConvert to SRT or exclude
CRF too high (26+)Visible quality lossUse CRF 18-22
Using MP4 with ASS subsASS not supported in MP4Use MKV container
No 10-bit for HDRHDR metadata lostAlways use Main 10 profile
Encoding at "Ultrafast"Huge files, poor compressionUse Medium or Slow preset

FAQ

What is the best CRF for Jellyfin? CRF 20 for 1080p, CRF 18 for 4K. These produce excellent quality with reasonable file sizes.

Should I use H.264 or H.265? H.265 for most libraries. It produces files 40-50% smaller than H.264 at the same quality. Use H.264 only if you have very old clients.

Does Handbrake preserve HDR? Yes, HDR10 is preserved when using H.265 10-bit. Dolby Vision is not preserved by standard Handbrake encodes.

How long does encoding take? A 2-hour 1080p movie at CRF 20 Medium preset takes roughly 1-3 hours on a modern CPU. 4K takes 3-8 hours. GPU encoding is 5-10x faster.

Can I encode directly on my Jellyfin server? Yes, but schedule encodes during off-peak hours. Encoding uses significant CPU/GPU resources that compete with active streams.

Is there a quality difference between Handbrake and FFmpeg? No. Both use the same underlying encoders (x265, x264). The output is identical with the same settings.

Should I keep the original files after encoding? Keep originals for at least a month after encoding. Verify the encodes look correct before deleting sources.


Encoded your library? Verify every stream is Direct Playing. Download JellyWatch on Google Play - see the exact playback method for every active session and confirm your encodes work perfectly on every device.

On Emby? Download EmbyWatch on Google Play - the same encoding verification for Emby servers.


GPU Encoding Recipes: NVENC, QSV, and AMF (Complete)

GPU encoding is 5-10x faster than software x265. Here are production-ready recipes for each GPU vendor, optimized for Jellyfin Direct Play.

NVIDIA NVENC (RTX 2000/3000/4000/5000 Series)

NVIDIA GPUs offer the best hardware encoding quality in 2026, especially the RTX 4000+ series with AV1 support.

H.265 NVENC - Best Quality (Recommended)
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mkv \
  -c:v hevc_nvenc -preset p6 -tune hq -rc constqp -qp 22 \
  -b:v 0 -profile:v main10 -tier high \
  -spatial-aq 1 -temporal-aq 1 -aq-strength 8 \
  -c:a:0 eac3 -b:a:0 640k -ac:a:0 6 \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s? \
  -metadata:s:a:0 title="Surround 5.1" \
  -metadata:s:a:1 title="Stereo" \
  output.mkv

Key parameters explained:

  • -preset p6: High quality preset (p1=fastest, p7=slowest/best)
  • -tune hq: Optimizes for visual quality over speed
  • -rc constqp -qp 22: Constant quality mode (similar to CRF)
  • -spatial-aq 1 -temporal-aq 1: Adaptive quantization for better detail preservation
  • -aq-strength 8: How aggressively AQ redistributes bits (1-15)
AV1 NVENC (RTX 4000+ only)
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mkv \
  -c:v av1_nvenc -preset p5 -tune hq -rc constqp -qp 28 \
  -profile:v main -tier main \
  -c:a:0 eac3 -b:a:0 640k \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy \
  output.mkv

AV1 NVENC produces files 20-30% smaller than HEVC NVENC at the same quality. Use QP 26-30 for AV1.

NVENC Quality Comparison (QP values)
QPVisual QualityTypical 1080p SizeEquivalent Software CRF
18-20Excellent (archival)6-10 GB~CRF 16-17
21-23Very good (recommended)4-7 GB~CRF 18-20
24-26Good3-5 GB~CRF 21-23
27-30Acceptable2-4 GB~CRF 24-26

Intel Quick Sync Video (QSV) - N100, 12th-14th Gen Core

Intel QSV is available on any Intel CPU with integrated graphics. The N100 and 12th+ gen Core CPUs offer excellent quality.

H.265 QSV - Best Quality
ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mkv \
  -c:v hevc_qsv -preset veryslow -global_quality 23 \
  -profile:v main10 -look_ahead 1 -look_ahead_depth 40 \
  -extbrc 1 -adaptive_i 1 -adaptive_b 1 \
  -c:a:0 eac3 -b:a:0 640k -ac:a:0 6 \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy -map 0:v:0 -map 0:a:0 -map 0:a:0 -map 0:s? \
  output.mkv

Key parameters:

  • -global_quality 23: Quality level (lower = better, 20-25 recommended)
  • -look_ahead 1 -look_ahead_depth 40: Enables lookahead for better bitrate distribution
  • -extbrc 1: Extended bitrate control for improved quality
  • -adaptive_i 1 -adaptive_b 1: Adaptive I/B frame placement
AV1 QSV (Intel Arc / 14th Gen+)
ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mkv \
  -c:v av1_qsv -preset veryslow -global_quality 28 \
  -look_ahead 1 -look_ahead_depth 40 \
  -c:a:0 eac3 -b:a:0 640k \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy \
  output.mkv

AMD AMF (RX 6000/7000/9000 Series)

AMD hardware encoding has improved significantly but still trails NVIDIA and Intel in quality-per-bit.

H.265 AMF
ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi \
  -vaapi_device /dev/dri/renderD128 -i input.mkv \
  -c:v hevc_amf -quality quality -rc cqp -qp_i 22 -qp_p 24 \
  -profile:v main10 \
  -c:a:0 eac3 -b:a:0 640k \
  -c:a:1 aac -b:a:1 160k -ac:a:1 2 \
  -c:s copy \
  output.mkv

AMD AMF produces files ~15-20% larger than NVENC at equivalent visual quality. Acceptable for batch processing where speed matters more than compression.


GPU Encoding Quality Ranking (2026)

RankEncoderQuality/BitSpeedBest For
1Software x265BestSlowestFinal archive, small libraries
2NVENC (RTX 4000+)Very goodFastLarge libraries, daily use
3Intel QSV (12th gen+)GoodFastBudget builds, N100 servers
4AMD AMF (RX 7000+)AcceptableFastAMD-only systems

Batch Automation with Tdarr: Set It and Forget It

Manually encoding hundreds of files is impractical. Tdarr is a distributed transcoding automation tool that processes your entire library in the background.

What Tdarr Does

  1. Scans your media folders continuously
  2. Identifies files that do not match your target codec/settings
  3. Transcodes them automatically using your GPU or CPU
  4. Replaces the original file (or saves alongside)
  5. Integrates with Jellyfin to refresh the library after each file

Tdarr Docker Compose

services:
  tdarr:
    image: ghcr.io/haveagitgat/tdarr:latest
    container_name: tdarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - serverIP=0.0.0.0
      - serverPort=8266
      - webUIPort=8265
      - internalNode=true
      - inContainer=true
      - ffmpegVersion=7
      - nodeName=InternalNode
    volumes:
      - ./tdarr/server:/app/server
      - ./tdarr/configs:/app/configs
      - ./tdarr/logs:/app/logs
      - /mnt/media:/media
      - /tmp/tdarr:/temp
    ports:
      - 8265:8265
      - 8266:8266
    devices:
      - /dev/dri:/dev/dri          # Intel QSV
    # For NVIDIA, add:
    # runtime: nvidia
    # environment:
    #   - NVIDIA_VISIBLE_DEVICES=all
    restart: unless-stopped

Recommended Tdarr Plugin Stack

Configure these plugins in order (Tdarr processes them sequentially):

Plugin 1: Skip if already H.265

  • Plugin: Tdarr_Plugin_MC93_Migz1FFMPEG_CPU
  • Condition: Skip if video codec is already hevc

Plugin 2: Transcode video to H.265

  • Plugin: Tdarr_Plugin_MC93_Migz2CleanTitle (clean metadata first)
  • Then: Tdarr_Plugin_Engine_NVENC_Tiered_H265 (NVIDIA) or Tdarr_Plugin_Engine_QSV_Tiered_H265 (Intel)
  • Settings: CRF/QP 22, Medium preset, Main10 profile

Plugin 3: Normalize audio to EAC3 + AAC

  • Plugin: Tdarr_Plugin_MC93_Migz4CleanSubs (remove image subs)
  • Then: Tdarr_Plugin_bsh1_Boosh_Audio_Converter
  • Settings: First track EAC3 5.1 640k, second track AAC Stereo 160k

Plugin 4: Remove image-based subtitles

  • Plugin: Tdarr_Plugin_MC93_Migz5ConvertSubs
  • Settings: Remove PGS and VobSub, keep SRT and ASS only

Tdarr + Jellyfin Integration

After Tdarr finishes processing a file, trigger a Jellyfin library refresh:

  1. In Tdarr: Settings → Post-processing → Webhook
  2. URL: http://jellyfin:8096/Library/Refresh?api_key=YOUR_API_KEY
  3. Method: POST

Or use the Tdarr Jellyfin plugin that triggers a targeted scan of the specific file.

Tdarr Performance Tips

  • Set GPU limits: Allow only 1-2 simultaneous GPU transcodes to leave headroom for Jellyfin playback
  • Schedule processing: Use Tdarr schedules to only process during off-peak hours (2 AM - 8 AM)
  • Use /tmp as temp folder: Transcoding writes heavily to disk. Use an SSD or tmpfs for the temp folder
  • Priority order: Process most-watched content first (sort by file size or folder)
  • Health checks: Enable Tdarr health checks to detect corrupted files before processing

Expected Processing Speed

Hardware1080p H.265 encode speedTime per 2h movie
Software x265 (8-core CPU)25-40 fps2-3 hours
NVIDIA RTX 3060 (NVENC)150-250 fps20-30 minutes
NVIDIA RTX 4070 (NVENC)200-350 fps15-25 minutes
Intel N100 (QSV)80-120 fps40-60 minutes
Intel i5-12400 (QSV)120-180 fps25-40 minutes
Intel Arc A380 (QSV)150-250 fps20-30 minutes

With an RTX 4070, you can process 50-70 movies per day automatically.

Tdarr vs Manual FFmpeg: When to Use Each

ScenarioUse TdarrUse Manual FFmpeg
Library of 500+ filesYesNo (too tedious)
One-off encode of a specific fileNoYes
Ongoing library maintenanceYesNo
Custom HDR/DV workflowNo (too complex for plugins)Yes
Testing encode settingsNoYes (iterate quickly)

Processing your library with Tdarr? Monitor the impact on your server. Download JellyWatch on Google Play - track CPU/GPU usage during batch encodes, verify Direct Play status for processed files, and get alerts if Tdarr impacts active streams.

On Emby? Download EmbyWatch on Google Play - the same monitoring for Emby servers during batch processing.

Comments 2

connorblake·

The dual audio track advice (EAC3 5.1 + AAC stereo) eliminated every single audio transcode on my server. Fire TV gets EAC3, phones get AAC, nobody triggers a transcode. Genius.

Ava M.·

Used these exact FFmpeg settings in my Tdarr workflow. Processed 800 movies over two weeks. Storage went from 12 TB to 5.2 TB and everything still Direct Plays on every device.

Leave a comment

Never displayed publicly.
0 / 2000 · Supports limited Markdown: **bold**, *italic*, `code`, [link](url), lists, > quote.