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 cannot decode plays badly or not at all.
So the question for a client is: what do you put in that message, and how do you keep it honest? This post is about how Yonto Player answers it on Android TV, phones and tablets, and why the answer is a small, plain description of the device rather than a copy of any one server's format.
What the device says
The app keeps one description of the device, the same for every server type. It is a small data class. Here it is as a simplified sketch (the real one has a few more fields and enums for the names):
// Simplified sketch of the device description, not the real file. data class PlaybackDevice( val video: List<VideoDecoder>, // codec + the largest picture and bit depth it takes val audio: List<AudioCodec>, val maxAudioChannels: Int, val containers: List<MediaContainer>, val hdr: List<HdrFormat>, // what the SCREEN shows val subtitles: List<SubtitleFormat>, ) data class VideoDecoder( val codec: VideoCodec, // h264, hevc, vp9, av1 val maxWidth: Int, val maxHeight: Int, val maxBitDepth: Int, // 8 or 10 ) Three choices in it are worth explaining.
Video is a list of codecs, each with its own limits. "Plays HEVC" is not enough information. A box can decode HEVC at 1080p and not at 4K, or 8-bit and not 10-bit. So each codec carries the largest width and height it takes and its bit depth. On Android the app reads this from the device's hardware decoders through media3: for each codec it asks a fixed list of sizes, from 8K down to 720p, which is the largest the hardware takes at 30 frames per second, and it reads 10-bit support from the profiles the decoder lists. The list tries 4096 wide before 3840, so a decoder that plays a 4096-wide film is not made to convert it.
Hardware only. The list is what the platform player decodes in hardware, never what the software player could manage with effort. The app carries a second player for files the first cannot read, but a file that player could only struggle through is the file a server should convert. Leaving it out of the profile is what makes the server step in. One exception is stated in the code: H.264 at 1080p is listed even when no hardware decoder reports it, since Android devices play that.
HDR is about the screen, not the decoder. A decoder can read an HDR10 stream on a TV that shows it as washed-out SDR. The hdr list comes from what the display reports it can show, and it is read on every play, because a TV box's HDMI link can change between films. Empty means an SDR screen, which a server that has tone mapping available answers by tone-mapping. Dolby Vision is listed only when the device has a decoder for it and the screen reports Dolby Vision; without a decoder the player can only play a file that also carries an HDR10 layer, so the server must not send the others as they are.
Sound is different: the audio list is a fixed list, not a probe of the hardware. It includes DTS and TrueHD, because the app ships its own FFmpeg audio decoders on Android.
Who gets to see it
Not every plugin needs the device's decoders, so a source plugin must ask. Its manifest declares deviceProfile: true, and only then does the host pass getStream a second argument, { device }. That happens only when the app is about to play the stream. A download, or a download's size check, calls with the token alone and gets the file as stored. An older app that does not know the key drops it and behaves the same way, which is why it did not need a contract version. The plugin reference has the exact shape.
There is also a switch per source, Let the server convert videos, on by default. Turn it off and the app does not send the device, so the video plays as stored. Converting is the work of your own server, on its own settings.
If the server's decision fails, the plugin falls back to the file as stored.
One description, three vocabularies
One description becomes three different requests, because the servers describe a device differently. That translation lives in each server's plugin, which is the point of keeping the description neutral: the app's side stays the same while each plugin carries its server's rules. The plugins are in the open-source repo, so here is an excerpt of how the Jellyfin one turns a decoder's limits into conditions (gaps marked with ...):
// Excerpt from plugins/jellyfin/jellyfin-plugin.js CodecProfiles: video.map((v) => ({ Type: 'Video', Codec: v.codec, Conditions: [ { Condition: 'LessThanEqual', Property: 'Width', Value: String(v.maxWidth), IsRequired: false }, { Condition: 'LessThanEqual', Property: 'Height', Value: String(v.maxHeight), IsRequired: false }, { Condition: 'LessThanEqual', Property: 'VideoBitDepth', Value: String(v.maxBitDepth), IsRequired: false }, { Condition: 'EqualsAny', Property: 'VideoRangeType', Value: ranges.join('|'), IsRequired: false }, ], })), ... Each decoder becomes a codec profile: a video beyond the width, the height or the bit depth fails it, and so does a dynamic range the screen does not show. The server sees a failed condition and converts. Otherwise it direct-plays. The outline of how the three differ, simplified:
Sketch of the mapping, simplified: Jellyfin a DeviceProfile sent with the playback request: direct-play profile + HLS transcoding profile + codec conditions (width, height, bit depth, range type) Emby the same DeviceProfile shape, but the range is compared by its own range names, so Dolby Vision is let through per file by checking which base layer the file carries Plex no DeviceProfile: the device is described as extra profile directives on a generic platform: a transcode target, a direct-play profile and limitations on width, height, bit depth and colour transfer What each server is asked to convert to is deliberately plain. On Jellyfin it is H.264 in HLS; for a device that decodes HEVC, the HEVC is copied rather than encoded again. AAC, AC3 and E-AC-3 are the sound formats the server may convert to, and the plugin sends a very high bitrate ceiling so size alone does not trigger converting on a home network.
One thing to know
A converted video is a different stream from the stored file. The switch Let the server convert videos turns converting off per source, and the video formats page documents what a converted video carries.
What I would take from it
If you write a client for any media server, the useful idea is that the device description is the interface. Describe the device once, in neutral words, from what it actually decodes and shows. Keep each server's vocabulary, and the rules that go with it, in its own plugin. Be conservative about what you claim, because a claim the hardware cannot back is the one that plays badly. And keep the way back: the file as stored, a switch to ask for it, and a fallback when the answer fails.
Read more
- Video formats Yonto Player plays, including what a media server converts
- Plugin reference: what the device plays
- Developer docs
- The open-source plugins, including Jellyfin, Emby and Plex
Dolby, DTS, Jellyfin, Plex and Emby are trademarks of their owners, and Yonto Player is not affiliated with them.

