Skip to content

Playback and Codecs

RadicalMuffinMan edited this page Nov 12, 2026 · 13 revisions

Playback and Codecs

Moonfin picks the best playback engine for each platform on its own, so most people never need to change anything here. This page explains which engine each platform uses and what plays without transcoding.

In plain words

  • Direct play means the file goes to your device exactly as it is. Best quality, no work for the server.
  • Transcoding means the server converts the file on the fly because your device can't play some part of it. It needs a strong server, can look softer, and stutters when the server can't keep up.
  • Moonfin direct plays whenever it can. It tells the server everything your device can decode, so a transcode only happens when something really can't be played as is.
  • If playback looks worse than you expect, or the server gets loud when you press play, start with Common Problems. The rest of this page is the detail behind those fixes.

Backend by platform

Platform Backend Notes
Android phones and tablets Native Media3 / ExoPlayer (default), media_kit (libmpv) available Change it under Settings > Playback > Player > Playback Engine
Android TV / Google TV / Fire TV Native Media3 / ExoPlayer Dolby Vision Profile 7 direct play, audio passthrough
Windows, Linux, Web media_kit (libmpv) Broad codec coverage without platform-specific frameworks
iOS, Apple TV (tvOS), macOS AetherEngine (native Apple engine) Dolby Vision Profile 7 conversion, TrueHD direct play on iOS
Advanced: backend details
  • The Android backend does hardware codec probing and HDR detection, so what direct plays follows what your device can actually decode. media_kit (libmpv) stays selectable there as the legacy option.
  • On macOS, media_kit remains only for trailers and theme music. Main playback is AetherEngine.
  • AetherEngine converts Dolby Vision Profile 7 dual layer to Profile 8.1 in real time via libdovi, so dual layer content keeps Dolby Vision. FEL files keep most of their enhancement layer, which is folded into the Dolby Vision curve. TrueHD direct plays on iOS, and HEVC transcodes work on Apple platforms.
  • On iPhone, iPad and Apple TV, Settings > Playback > Player > Video player picks Standard, the player with Moonfin's own controls, or Native Apple style, the system player. Native is the default on Apple TV.
  • Direct Play HEVC (Software Decode) under Settings > Playback > Quality & Decoding lets the Apple TV HD play HEVC up to 1080p from the original file. It's off by default, since heavy files may stutter in software.
  • Direct Play 4K AV1 (Software Decode), in the same place, lets the 2nd and 3rd generation Apple TV 4K play AV1 above 1080p from the original file. It's off by default. Apple TVs that decode AV1 in hardware play it up to 4K on their own.
  • Smooth 24 fps on a 60 Hz TV, also there on Apple TV, plays 24 fps video 0.1% slower so it fits a 60 Hz TV without dropped frames, when Match Frame Rate is off and the audio isn't passed through to a receiver. When a video can't play evenly at the TV's refresh rate, Apple TV also shows a one-time tip to turn on Match Frame Rate in the Apple TV's own settings.

Refresh rate switching on Android TV

Refresh Rate Switching under Settings > Playback > Quality & Decoding switches the display mode to match the frame rate of what you're watching. Pick Scale on TV or Scale on Device to turn it on. It's Disabled by default.

  • The frame rate comes from the stream itself before the audio starts, rather than server info that's often out of date for Live TV
  • Modes are picked in the right family, so 29.97 fps goes to 59.94 Hz and 25 fps to 50 Hz
  • The audio waits until the HDMI switch settles, and each item in a playlist gets its own pick. A live channel that changes frame rate between programs is corrected while it plays
  • The loading screen says "Matching display to 23.976 fps" while it switches, and the playback information shows the server's frame rate next to the measured one, the scan type, the HDMI output and any rate corrections

Dolby Vision Profile 7 on Android TV

Profile 7 is the Dolby Vision flavor found in UHD Blu-ray remuxes. No other Android client can direct play it, because ExoPlayer refuses the profile outright. Moonfin rewrites the Dolby Vision metadata as the stream arrives, so those files direct play and the server does no work. The video is never re-encoded.

What happens depends on your device:

Device Result
Profile 7 decoder, such as an Nvidia Shield Played untouched
Profile 8 decoder and a Dolby Vision display Metadata converted to Profile 8.1, real Dolby Vision
Anything else Metadata stripped, the HDR10 picture underneath plays as plain HEVC

The Dolby Vision Profile 7 Direct Play setting under Settings > Playback > Quality & Decoding controls this. Auto picks the route for your device. Enabled forces direct play. Disabled restores the old transcode.

Some devices, Fire TV 4K and 4K Max models among them, play Dolby Vision files that also carry HDR10+ with sound but a black screen. On those, the same screen has Play Dolby Vision with HDR10+ as HDR10+, which drops the Dolby Vision layer so the HDR10+ base plays. It's off by default.

AV1 files that carry Dolby Vision (profile 10.1) play through their HDR10 base layer, on Android and on Apple devices alike, so you get the HDR10 picture underneath.

Advanced: dual layer MKVs and diagnostics
  • Dual layer MKV remuxes keep their Dolby Vision data in block additions, which the stock reader discards. Moonfin reads it back out and converts it the same way.
  • An advanced switch always takes the HDR10 path, for setups where a converted stream looks wrong.
  • Playback reports record which route was taken, where the metadata came from, and what the converter produced, so a problem file can be diagnosed from a log alone.

HDR on Windows

Windows plays every title in mpv's own window by default, which keeps motion smooth and sends HDR video to the display untouched when Windows has the display in HDR mode. Video Renderer under Settings > Playback > Quality & Decoding picks how that works:

  • Native window, the default, for every title.
  • Native window for HDR only, which keeps SDR titles inside the app.
  • In-app, which keeps every title inside the app and converts HDR to SDR.

Try another option if video misbehaves. Auto HDR Switching, in the same place, can turn HDR mode on for you when an HDR video starts and put it back afterwards.

To check whether it's working, open the playback information during playback (I on a keyboard). The HDR line under Video shows the title's range, and says converted from when HDR reached the display as SDR.

Advanced: how the native window works
  • mpv draws the video into its own window instead of the app's video texture, which is what lets the HDR signal through unchanged.
  • It's used by the full player only. Live TV and the mini player stay on the standard path.
  • Windows also has mpv's own statistics overlay, Shift+I or the button in the playback information, for checking what mpv decoded and what it's sending out.

Codec support

The libmpv path gives broad codec coverage without relying on platform-specific frameworks:

Category Supported Formats
Video H.264, HEVC (H.265), VP8, VP9, AV1, MPEG-2, MPEG-4, VC-1
Audio AAC, MP3, FLAC, Opus, Vorbis, AC3 (Dolby Digital), EAC3 (Dolby Digital Plus), DTS, TrueHD, PCM (16-/24-bit), ALAC
Containers MP4, MKV, WebM, AVI, MOV, TS / M2TS, WMV / ASF
Subtitles SRT, ASS / SSA, VTT / WebVTT, TTML, SUB, plus bitmap (PGS, DVB, VobSub) on desktop
HDR Dolby Vision, HDR10+, HDR10, HLG, with automatic detection and signaling
HW Accel VA-API, QSV, NVENC, VideoToolbox, V4L2, RKMPP

The Android TV backend probes the device's own decoders rather than assuming a fixed list. Formats it can't demux, such as ASF and WMV, are handed back to the server for a remux instead of failing on the device.

Advanced: hardware capability probes

Moonfin asks the device what its display and audio chain actually support rather than assuming a fixed list. On a cold boot those probes can race the HDMI handshake and come back saying the device supports nothing, which forces the server to transcode everything until the app is restarted.

To prevent that, the last known good answer is saved and reused on the next launch, and a fresh probe runs when the app resumes. A probe result is only written when it's sound, so the cache can never hold the empty state, and a genuine change like a soundbar being unplugged still lands. Results are keyed to the device build, so a firmware update discards them.

Audio passthrough

On the TV backends (Android TV via Media3, Apple TV via AetherEngine), Moonfin can send AC3, EAC3, DTS, DTS-HD, TrueHD, and Atmos untouched to your AV receiver. Anything the receiver can't take is decoded in software and sent as PCM, so a track always plays. On Apple TV, TrueHD and DTS go out as lossless multichannel PCM when the HDMI or eARC route takes more than two channels, instead of being turned into Dolby Digital Plus 5.1.

If a TV or receiver struggles with one codec, Transcode Audio Codecs under Settings > Playback > Audio has the server convert just the codecs you pick, such as DTS or Opus, while the video plays untouched. Music still direct plays.

Advanced: passthrough modes and transcoding behavior
  • Android TV has two modes. Auto follows what the hardware probe reports, which suits most setups. Manual exposes a toggle per codec, for devices that misreport what their receiver accepts.
  • With DTS Core passthrough on and DTS-HD MA off, a DTS-HD track goes to the receiver as its DTS core rather than being decoded on the device.
  • DTS, DTS-HD MA and DTS:X inside Blu-ray .ts and .m2ts files play on Android, which the stock Media3 reader skips.
  • Every audio codec Moonfin can decode is advertised to the server, so an audio track alone no longer forces a video transcode. When audio does need converting, the video stream is copied rather than re-encoded.

On Android TV with the Media3 engine, Passthrough Output under Settings > Playback > Audio picks who packs the bitstream for the HDMI link. Automatic, system packer (AudioTrack RAW) is the default and leaves it to Android. App packer (AudioTrack IEC) has Moonfin pack it as IEC 61937 itself. Try the app packer if passthrough is silent or glitchy on your device, since the system packer is broken on some.

The Detected Audio Capabilities section at the bottom of the Audio settings shows what Moonfin found:

  • Locally Decoded Codecs are the formats the player decodes on the device itself: AAC, AC3, EAC3, DTS, DTS-HD, TrueHD and FLAC. That list is the same on every engine.
  • Transcode Target Codecs are the formats the server is asked to convert audio into when a track really can't play. They follow your Audio Fallback Codec choice.
  • On Android TV and Apple TV, the connection and the formats that can pass through to a receiver are listed too.

Subtitles

  • Embedded ASS fonts reach the libass renderer on Apple platforms, so styled subtitles render with their intended fonts.
  • Bitmap subtitles like PGS are positioned on the video itself rather than the whole player view.
  • During Live TV, embedded CEA-608/708 closed captions display on all platforms.
  • The subtitle track picker ends with a Subtitle Delay row for subtitles that are early or late. It opens at the top of the player with minus, Reset and plus in 100 ms steps, and a timeline of the track's lines sliding past the playhead, while the controls step aside so the subtitles stay in view. The native Apple player has it too. With the Media3 engine on Android it shifts them by up to 5 seconds either way, takes effect straight away, and goes back to zero when you start a new title. It's kept through quality and track changes.
  • Secondary Subtitles under Settings > Playback > Subtitles shows two subtitle tracks at once, on every player. Once it's on, the subtitle menu asks for the primary or secondary track. The secondary has to be an SRT or WebVTT track, external or embedded, and has its own delay, size, color and spacing. Preferred Secondary Subtitle Language puts a language at the top of its list. It's off by default.
  • Prefer Text Subtitles and Prefer External Subtitles, in the same place, rank text tracks above PGS and VobSub, or external files above embedded tracks, whenever Moonfin picks a track for you. Both are off by default.
  • On Android with Media3, PGS subtitles in a separate .sup file are drawn on the device, so they don't make the server transcode. PGS tracks inside the video file are still burned into the picture when a transcode is needed.
  • A subtitle the server is still extracting from a large file no longer holds the video back. Playback starts and the subtitle appears once it's ready. With mpv, a subtitle that failed to load is retried every ten seconds, up to five times, instead of a different language being picked in its place.
  • The text, stroke and background color pickers offer up to fifteen presets, grays, blue, magenta, navy and semi-transparent white among them, for SDR and HDR alike.
  • Subtitle Customization also has Bold Text, Text Stroke Width, a Text Shadow with its own intensity, offset and blur, and a Font choice of 10 Google Fonts like Inter, Lato and Atkinson Hyperlegible, downloaded the first time you pick one.
  • Subtitle Size resizes ASS subtitles during direct play too, keeping their styling, with Media3 and mpv.
Advanced: a separate subtitle style for HDR

What reads well on an SDR picture often blows out on HDR. The text color, stroke color, background color, size, offset, and weight can all be set separately for HDR playback, and they sync through the Moonbase plugin like the SDR ones.

Player options

These live under Settings > Playback > Player.

  • Crop Black Bars finds letterbox bars that are encoded into the picture, crops them off, and then fills the screen. It works on Windows and Linux, and on Android with either engine. It's hidden on iPhone, iPad, Mac, Apple TV and web. It isn't the same as the Zoom to Fill zoom mode, which simply zooms the whole picture to fill the screen without looking for bars. Off by default.
  • Recrop Interval sets how often Crop Black Bars looks again: Once at start, the default, or every second, every 5 or every 10 seconds, so a film that changes aspect ratio stays cropped. While cropping is on, the zoom button in the player becomes a recrop button, and B recrops from a keyboard.
  • Chapter Marks marks where each chapter starts on the seek bar. Off by default, and it syncs through the Moonbase plugin.
  • Pause While Scrubbing sits under Trick Play and shows while preview thumbnails are on. Playback pauses while you seek and carries on when you press play. Turn it off to keep playing and jump straight to the new spot. On by default.
  • Hide Controls After sets how long the controls stay up after your last press: 1, 3 or 5 seconds. 5 seconds is the default everywhere.
  • Dim Controls in HDR dims the controls by up to 70% while HDR video plays, since white looks far brighter next to it. Off by default.

Tuning playback

On Windows, Linux, and Android phones and tablets with the mpv engine selected, you can supply your own mpv.conf for custom shaders, scaling algorithms, and tone mapping. This doesn't apply to iOS, Apple TV, or macOS, which play through AetherEngine, or to Android TV, which doesn't offer the setting. See Custom mpv Configuration.

Clone this wiki locally