Blog · Part 2, Jellyfin in depth
Direct play vs transcoding: codecs, containers, and Apple devices
Why one file plays instantly and another makes the server work hard. Containers, video and audio codecs, subtitles, and what Apple devices handle natively.
When you press play, Jellyfin compares the file with what the device says it can handle, and picks one of three paths:
- Direct play. The device takes the file exactly as it is. The server just reads it from disk. This is what you want.
- Remux (Jellyfin calls it Direct Stream). The audio and video are fine, but the package isn’t. Jellyfin repackages them on the fly. Cheap, barely uses the processor.
- Transcode. The video or audio itself has to be converted. Expensive, even with the hardware help from Day 10, and slightly lower quality.
Knowing which parts of a file trigger which path lets you store a library that direct-plays almost everywhere.
The four parts of a video file
The container
The file format that holds everything together: MKV, MP4, MOV. It’s the box, not the contents. MKV is the most flexible and the most common for home libraries. MP4 is the most widely supported by devices.
The video codec
How the picture is compressed:
- H.264 (AVC). Plays on everything made in the last fifteen years. Bigger files.
- HEVC (H.265). About half the size of H.264 at the same quality. Standard for 4K and HDR. Supported by Apple devices, most recent TVs, and recent Android.
- AV1. Even more efficient, newer, and only decoded in hardware by recent devices. Becoming common, but still the format most likely to need a transcode today.
- Older codecs (MPEG-2 from DVDs, VC-1, MPEG-4 Part 2) tend to transcode on modern devices.
The audio codec
- AAC: universal.
- AC-3 (Dolby Digital) and E-AC-3 (Dolby Digital Plus): very widely supported, including Apple devices and most soundbars.
- DTS, DTS-HD MA, TrueHD (and Atmos within TrueHD): disc formats. Many players can’t decode them, which forces an audio transcode even when the video is perfectly fine.
- FLAC, Opus: support varies.
Subtitles
The quiet cause of many transcodes:
- Text subtitles (SRT, WebVTT, ASS/SSA) are just text. Players draw them on top of the video.
- Image subtitles (PGS from Blu-ray, VobSub from DVD) are pictures of text. If the player can’t draw them, the server has to burn them into the video, which means a full video transcode, even of a file that would otherwise direct-play.
Why a file transcodes: the usual suspects
In rough order of how often they’re the cause:
- Image subtitles turned on in a player that can’t render them.
- DTS or TrueHD audio on a device without the decoder.
- A bitrate higher than the connection allows, usually when watching away from home. Jellyfin lowers the quality to fit.
- HEVC or AV1 video on an older device or browser.
- An MKV container on a player that only accepts MP4. Usually this only causes a remux, which is cheap.
To find out why a given stream transcoded, open Dashboard while it plays, click the info icon on the active stream, and read the Transcoding reason line.
Apple devices
Apple’s built-in video player handles:
- Containers: MP4 and MOV. Not MKV.
- Video: H.264 and HEVC, including HDR10 and Dolby Vision on recent devices.
- Audio: AAC, AC-3, E-AC-3 (including Atmos in E-AC-3), ALAC, FLAC.
- Subtitles: its own text formats.
So a typical MKV with DTS audio and PGS subtitles needs work in an app that only uses Apple’s player: a remux for the container, an audio transcode for DTS, and a full video transcode to burn in the subtitles.
That’s the gap Medusa was built to close. It plays everything Apple’s player handles through Apple’s player, with Picture in Picture and AirPlay, and sends everything else, including MKV, DTS, TrueHD and image subtitles, to a second engine built in. The file plays as it is, with no transcode on the server. The Will it play? tool on the home page shows which engine handles a given combination.
Other clients take other approaches: the Jellyfin web player relies on what the browser supports, and many Android TV boxes decode almost everything in hardware.
What to store, if you have a choice
If you’re ripping your own discs or choosing between versions of a public-domain film, these direct-play on nearly everything:
| Part | Best choice |
|---|---|
| Container | MKV (or MP4 for maximum compatibility) |
| Video | HEVC for 4K and HDR, H.264 or HEVC for 1080p |
| Audio | Keep the original track, and if it’s DTS or TrueHD, add a second AC-3 or E-AC-3 track |
| Subtitles | SRT files alongside the video, or text subtitles inside the MKV |
Tools like MakeMKV (to rip discs you own) and HandBrake (to convert) both run on Mac, Windows and Linux. HandBrake’s presets make HEVC files with an AAC or AC-3 track in a few clicks.
Settings worth checking
Dashboard → Playback → Transcoding:
- Throttle transcodes: on. Jellyfin pauses converting once it’s well ahead of where you are, saving power.
- Delete segments: on. Cleans up temporary files as you watch.
- Transcoding thread count: leave on Auto.
Dashboard → Playback → Streaming:
- Internet streaming bitrate limit: a server-wide cap for remote streams, matching your upload speed (Day 2).
Check it worked
Play a few different files on your most-used device, open the Dashboard while each plays, and look at the play method. If one keeps transcoding, the Transcoding reason tells you which of the four parts to look at. Turning off image subtitles, or picking a different audio track in the player, often changes it to Direct Play on the spot.
Tomorrow: subtitles and audio tracks, and getting the right ones by default for everyone.
Use these tools with media you own or are authorized to use, and with public-domain works. Medusa does not host, provide, or stream any media of its own.