Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Telling a media server what this device can decode

A media server can do a lot of work for a weak client. If a TV box has no decoder for a file, Jellyfin, Plex and Emby can convert it while you watch: a different codec, a smaller picture, HDR tone-mapped down for a screen that cannot show it. But the server only does that when the client tells it what it can play. A client that says nothing gets the file as it is stored, and whatever the device…

A media server can help a weak client by converting files it cannot directly decode. For this to work, the client must tell the server what types of media it can play. If the client does not give any information, the server will serve the file as it is stored, which may not be playable on the client.

The Yonto Player for Android TV, phones, and tablets handles this by creating a description of the device that details what it can decode. This description is a simple data class that includes information about supported video codecs and the maximum resolution and bit depth they can handle. It also includes audio codec information, container formats, HDR formats supported by the screen, and subtitle formats.

The device description lists each codec the device can handle along with the largest width, height, and bit depth it can process. The app checks this against the hardware decoders available on the device, focusing on the maximum resolution it can handle at 30 frames per second. This avoids unnecessary conversion efforts.

HDR information comes from the display, which can change depending on the HDMI link. If no HDR or Dolby Vision decoder is available, the server must not send these formats. Audio is handled differently, with the app providing its own FFmpeg audio decoders for formats like DTS and TrueHD.

The server and the app communicate to determine if the client can play the file as is or if conversion is required. This communication is specific to each server, with plugins in the open-source repo translating the neutral device description into server-specific formats. For example, Jellyfin creates a direct-play profile along with transcoding profiles that handle various conditions like width, height, bit depth, and dynamic range.

Emby, on the other hand, uses the same device profile but interprets dynamic range conditions differently.

This process allows the Yonto Player to adapt the media it plays to the capabilities of the client, ensuring smooth playback while minimizing the need for the server to perform conversions.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

I built a self-hosted WebRTC SFU with host-safety gates for scale tests

I’ve spent too long guessing why my browser demo wasn’t streaming. The useful answer came from actually running the publisher and viewer.

  • Self-hosted WebRTC SFU built with host-safety gates for scalability
  • Hami Media server requests short-lived, role-scoped tokens from loopback
  • Server demonstrates successful audio and video communication between tabs

I ran every example in a popular library's README. 11 of 25 worked.

Documentation rots quietly. Nobody gets a failing CI run when a README example stops matching the code. The first person to notice is a new user who copies the example, gets an error, and wonders what…

  • 11 out of 25 examples in xmltodict's README worked
  • 14 examples failed due to missing module imports
  • Audit revealed 15 discrepancies between documentation and code

More from Saturday, 28 November 2026 →