Direct play and transcoding

Why your media server transcodes, and how to stop it

Container, codec, audio, subtitles or bandwidth: the five things that make a media server re-encode a film, and what keeps direct play instead.

Close-up of a computer cooling fan spinning inside a case, lit in amber

A media server transcodes when the device in front of it can’t play what’s on the disk. The alternative is direct play, where the file leaves the server exactly as it is and the player does all the work. There are five things that get in the way of that, and four of them can be fixed without spending any money.

The five reasons a server re-encodes your film

Trigger What the server is fixing Usually avoidable
Container The client cannot demux MKV, or the stream layout confuses it Yes, with a native client
Video codec No HEVC, AV1 or 10-bit decoder on the device Sometimes, hardware decides
Audio codec TrueHD, DTS-HD or an object track the endpoint cannot render Yes, pick a compatible track
Subtitles A bitmap track has to be painted into the picture Yes, recognise it into text
Bandwidth The source bitrate is above what the link will carry Only by lowering quality

The first row has nothing to do with hardware. A browser accepts fragmented MP4 and a short list of codecs, so most of what’s on a typical shelf gets re-encoded before it reaches a tab. That’s the cost of watching in a browser, and it’s the reason the native clients exist. On the desktop, on Android, on Apple hardware and in the television apps, an MKV with HEVC video and a lossless audio track plays as it sits on disk.

Hardware acceleration is not one checkbox

When a transcode can’t be avoided, what matters is which chip does it. Quven finds the accelerator and uses it: NVENC and CUDA on NVIDIA cards, Quick Sync on Intel, VideoToolbox on Apple hardware, VAAPI on Linux desktops and servers, and the V4L2 interfaces on the small ARM boards where those are the only encoders available.

Those aren’t interchangeable, and “hardware transcoding” on a product sheet may mean just one of them. A Raspberry Pi has a V4L2 encoder and nothing you could call VAAPI. An Intel N100 has Quick Sync and will hold several streams at once while drawing very little power. A container that can’t see the render device drops back to software without saying so, and the only sign is a processor running flat out.

Is a session being encoded in software on a machine that has an encoder? Then something in the plumbing isn’t reaching the device, and the fix will be in the container flags or the driver. Start there.

Hardware transcoding is part of the free tier. It always has been, and we have no plans to start charging for it.

HDR is where “it played” and “it looked right” part company

Tone mapping is the step most comparisons skip, and it’s the one you should look at first. An HDR10 or Dolby Vision master shown on an SDR screen without it looks washed out and grey. Clamped naively, it loses the highlights instead. Quven maps with a Hable curve, which keeps the detail in the bright parts, and a native client that can take the HDR signal gets it untouched.

Subtitles are the trigger nobody predicts

Text subtitles travel alongside the video and cost nothing. Bitmap tracks are different: PGS on a Blu-ray, VobSub on a DVD and DVB captures are all pictures, and painting a picture onto the frame means re-encoding every frame it touches. Choosing one of those subtitles turns a film that was playing directly into a transcode.

There is a better way out than turning subtitles off. The server can read a bitmap track into ordinary text, once, and store it beside the media, which is a harder problem than it sounds. After that the track can be searched, restyled or translated, and the film goes back to playing untouched. Recognition costs a few minutes of your own hardware, and there’s no charge for it.

What actually keeps direct play

Use a native client wherever the screen allows one; the browser path is a fallback. If a film’s only audio track is lossless, keep a compatible one beside it, because audio on its own will force a full session on some devices. Read bitmap subtitles into text once, so they aren’t burned in every night. And when you’re away from home, remember that your upload speed is the ceiling: a 4K remux at 60 Mbps won’t go through a 10 Mbps uplink, whatever codec you pick.

Frequently asked questions

What is the difference between direct play and direct stream?

Direct play sends the file untouched. Direct stream repackages it into a different container and leaves the video and audio alone, which should cost almost nothing. A transcode decodes and re-encodes the picture, and that’s the expensive one.

Does transcoding lose quality?

Yes. It’s a lossy re-encode of something that was already lossy. At a generous bitrate you’ll struggle to see the loss on most material, but film grain, dark scenes and fast motion give it away first.

How many streams can a home server transcode at once?

With a modern Intel or NVIDIA encoder, several 1080p sessions at once is comfortable. 4K with tone mapping is far heavier. On the CPU alone, one stream can take every core you have, which is why the accelerator matters more than the processor.

Do I need a graphics card for a media server?

Not if your clients play files directly, which is what the native apps are for. A card or an integrated encoder will start to pay off once several people are watching at the same time on devices you don’t control.

Community

Comments

0 comments

Shown publicly with your comment.

Guest submissions record limited network and device details for abuse prevention. See the Privacy Policy.

No comments yet. Start the conversation.

Confirm action

Bring your library home.

Free for home use and yours to run on your own hardware. Install it in minutes.