Technology

Native Swift. Our own engine. Our own libmpv build.

Neverlag for Mac, iPhone, iPad and Apple TV is a native Swift app. Between provider and decoder sits our own engine, which fetches, holds and splices the stream. The decoder is our own build of libmpv. This page says what that means – for people who want to know exactly.

As of 12 October 2026mpv 0.41.0FFmpeg 8.0.3

Neverlag is an IPTV player for Apple TV, iPhone, iPad, Mac and Fire TV for Xtream Codes and M3U providers. It separates fetching the stream from playing it, so that connection drops do not lead to reloads. Measured: 60 seconds without a connection, zero reloads.

In short

  • Neverlag for Mac, iPhone, iPad and Apple TV is a native Swift app – no webview, no cross-platform framework, one build target per platform.
  • The decoder is libmpv, the library form of mpv, as our own build: mpv 0.41.0 with FFmpeg 8.0.3, LGPL, without GPL parts, without the mpv player.
  • Between provider and decoder sits Neverlag’s own engine. It holds the connection, builds a reserve, detects cuts, delivery pauses and timestamp jumps, reconnects and splices the parts into one continuous stream.
  • The decoder receives that continuous stream. When the connection is cut, it does not reload. Measured: line cut for 60 seconds, zero reloads.
  • The core of the engine is independent of the decoder: no part of it calls libmpv. Only a thin layer talks to the decoder.
  • On the Mac the decoder runs in its own process, separate from the app.
  • Hardware decoding through Apple’s VideoToolbox; FFmpeg is built with it on every platform.
  • Neverlag sets the screen to the cadence of the broadcast where the device permits: 50 Hz on the Mac in full screen, 120 Hz on iPhones with ProMotion. From version 1.0.2 (coming shortly).
  • Neverlag downmixes multichannel audio to stereo where required – and carries over the dialogue that some films put in the low-frequency channel. Common players drop that channel; measured against VLC and Apple’s AudioToolbox.
  • Neverlag IPTV Bench, a test bench for players under the same disruptions, is in preparation.

Technology

The path of the stream

An IPTV stream is a data stream from the provider’s server that is never supposed to break – and does. What matters is who sees the break: the decoder, or something in front of it.

Diagram: The stream flows from the provider into the Neverlag engine, from there as a continuous stream into the libmpv decoder and onto the screen. Provider Neverlag engine Connection · Reserve · Detect Reconnect · Splice continuous stream libmpv decoder Demuxing · Decoding VideoToolbox Screen Diagram: The stream flows from the provider into the Neverlag engine, from there as a continuous stream into the libmpv decoder and onto the screen. Provider Neverlag engine Connection · Reserve · Detect Reconnect · Splice continuous stream libmpv decoder Demuxing · Decoding · VideoToolbox Screen
The decoder only ever sees the continuous stream from the engine – never the provider.

A common player

A common player lets the decoder fetch the stream itself. When the connection breaks, the decoder notices once its buffer is empty – and reloads. The picture freezes, the sentence repeats, rewinding is gone.

Its reserve is a fixed read buffer of a few megabytes: at HD a few seconds up to half a minute, and it does not grow. When the connection breaks, the decoder has to reload – new connection, new start, the rewind buffer begins from zero. There is no point at which the new connection could be joined to the old one. It cannot hide the break from the decoder.

Neverlag

Neverlag is built differently. The engine fetches the stream from the provider and holds a reserve on the device. It watches the delivery, detects cuts, delivery pauses and timestamp jumps, reconnects in the background and splices the new connection onto the reserve.

The decoder receives one continuous stream. When the connection is cut, it sees no cut and does not reload. When the provider restarts the stream, the engine restarts the stream cleanly: 0.44 seconds of still frame, no black frame.

Measured on 8 September 2026: the device’s line cut for 20, 30, 45 and 60 seconds – zero reloads in every run, new connection 1.1 to 2.1 seconds after the server came back.

What the engine does

Seven tasks, all in front of the decoder. Each with a measurement from the Playback Lab where there is one.

  1. 01

    Hold the connection

    The engine holds the connection to the provider and fetches the stream ahead – separate from playback.

    5 minutes undisturbed: 2 requests to the account, 2 stream connections, 0 reloads (24 September 2026).

  2. 02

    Reserve

    30 to 60 seconds of programme sit on the device before they are played. The reserve is the margin every disruption has to use up first.

    Line cut for 20 s with 30 s of reserve: 0 reloads, 0 switches, one stall of 0.6 s (25 September 2026).

  3. 03

    Detect

    Cut, delivery pause, timestamp jump, line too slow: the engine detects the disruption in the data stream before the picture stops – not from the frozen picture.

    Channel dead at the provider: switch to the other route after 14 s, first picture 1.2 s after the switch (24 September 2026).

  4. 04

    Reconnect

    The new connection is made in the background while the reserve keeps playing.

    New connection 1.1 to 2.1 s after the server came back (8 September 2026).

  5. 05

    Splice

    The engine joins the new connection onto the reserve. The decoder receives one continuous stream and does not reload.

    Line cut for 60 s: 0 reloads (8 September 2026).

  6. 06

    One referee

    On a disruption exactly one mechanism reacts – reconnect, step down quality or change route, never everything at once. Every decision is written to the diagnostics.

  7. 07

    Slow line

    If the line persistently delivers less than the channel needs, Neverlag adapts playback instead of reloading.

    15 minutes throttled to about 90 % of demand: 42 dropouts without the adaptation, 0 with it, 1 connection (9 September 2026).

libmpv

The decoder: libmpv, our own build

Neverlag decodes with libmpv, the library form of the mpv player. The mpv player itself is not included: no command line, no Lua, no JavaScript, no GPL parts.

The build is our own. mpv 0.41.0 and FFmpeg 8.0.3 come from the unmodified release archives, plus libplacebo 7.360.1, libass 0.17.3, FreeType 2.13.3, FriBidi 1.0.16 and HarfBuzz 10.1.0 – built with Apple’s clang for arm64 (Mac additionally x86_64), linked into one framework per platform and embedded in the app as Libmpv.xcframework.

FFmpeg is built in a strict LGPL configuration – without GPL and without non-free parts. No x264, no x265, no fdk-aac, no OpenSSL – encrypted connections go through Apple’s system. The build aborts if GPL code were to get in.

FFmpeg, libplacebo, libass, FreeType, FriBidi and HarfBuzz are unmodified – no patch, configuration only. The codec set is FFmpeg’s native one, without external codec libraries.

Hardware decoding through VideoToolbox, software decoding as the fallback where Apple’s hardware does not accept a format – interlaced material, for instance. Audio through Apple’s audio stack, subtitles through libass, GPU processing through libplacebo on Mac, iPhone and iPad; on Apple TV, Neverlag puts every frame on the screen itself.

The media framework (Libmpv.framework) sits as a separate, dynamically loaded file in the app bundle. The app uses only the public libmpv interface. You may replace the framework with your own build that keeps the same interface (LGPL 2.1 § 6 b); on the Mac, replace every copy of it in the bundle. On iPhone, iPad and Apple TV, Apple additionally requires the whole app bundle to be re-signed with your own developer certificate – that is a rule of the platform, not of the licence. Sources, patch and build scripts for this are available through the written offer. The stream engine itself is not in the framework but in the app – replacing the framework leaves it untouched.

What we changed in mpv

We did not simply take mpv as it is. For Apple platforms we rebuilt the build system so that libmpv runs on Mac, iPhone, iPad and Apple TV without the desktop dependencies of the mpv player. And we extended the render interface of libmpv with a path that takes decoded frames straight into Neverlag’s own display – with no detour through mpv’s output paths. That is the foundation for Neverlag on Apple TV: there, the app puts every frame on the screen itself. FFmpeg and all other libraries are unmodified. The changes are licensed under the LGPL 2.1 or later; we provide the patch through the written offer on the open-source page.

Open source: components, licences, checksums and source offer

The boundary between engine and decoder

The engine is independent of the decoder. Its core – connection, reserve, detection, reconnection, referee, diagnostics – contains not a single call to libmpv.

Only a thin layer talks to the decoder, through the public libmpv API. The core does not depend on mpv.

On the Mac the decoder runs in its own process, separate from the app. A decoder crash does not take the app down. On iPhone, iPad and Apple TV it runs in the app’s process – the platform allows no second one.

The diagnostics sit in the engine, not in the decoder. They see the connection, the reserve and every decision of the referee. Their verdict is shown in the app: whether it was the provider, your Wi-Fi or your device. The journal records, for every disruption, who caused it – provider, network or device.

Picture and sound

Neverlag sets the screen to the cadence of the broadcast where the device permits. From version 1.0.2 (coming shortly), the Mac switches to 50 Hz in full screen for programmes at 25 and 50 frames per second and back afterwards. Measured: 50 Hz held, frame interval 20.0 ms, no frame outside the cadence.

iPhones with ProMotion show video at 120 Hz. On the Apple TV, “Match frame rate” is a system setting.

Neverlag downmixes multichannel audio (5.1) to stereo where required. For each file it checks whether the dialogue sits in the low-frequency channel and carries it over. Common players drop that channel when mixing down to two speakers – measured against VLC and Apple’s AudioToolbox. From version 1.0.2 (coming shortly).

Playback Lab

Where the numbers come from

Every Neverlag installation keeps a playback journal on the device: connections, reserve, disruptions, every decision of the referee. It never leaves the device unless you share it with support yourself.

In the Playback Lab we replay recorded disruptions against the release build: line cut, line throttled, stream restarted, channel dead. Every run is listed with its date in the Lab and in the Facts.

Neverlag IPTV Bench – a test bench that measures players under the same disruptions – is in preparation.

reloads
line cut for 60 s, 8 September 2026
still frame
stream restarted at the provider, 24 September 2026
new connection
after the server came back, 8 September 2026
connections
in 5 minutes undisturbed, 24 September 2026

Components and licences

Neverlag itself is not open source. The libraries are, and they stay under their licences. Versions come from the build configuration, read when this page is built.

ComponentVersionLicenceRole
mpv (libmpv) 0.41.0 LGPL-2.1-or-later Playback core, rebuilt by Neverlag for Apple platforms. (all platforms)
FFmpeg 8.0.3 LGPL-2.1-or-later Containers, protocols and decoders. (all platforms)
libplacebo 7.360.1 LGPL-2.1-or-later GPU processing: colour management, scaling, tone mapping. (all platforms)
libass 0.17.3 ISC Subtitle rendering. (all platforms)
FreeType 2.13.3 FTL Font rendering for subtitles. (all platforms)
FriBidi 1.0.16 LGPL-2.1-or-later Bidirectional text for subtitles. (all platforms)
HarfBuzz 10.1.0 MIT Text shaping for subtitles. (all platforms)
GRDB.swift 7.11.1 MIT Database for the catalogue and programme guide. (all platforms)

The components with versions and licences, the checksums of the source archives and the written source offer under LGPL 2.1 are on the open-source page.

Platforms

DeviceTechnology
Mac macOS 14 or later, Apple silicon and Intel. Decoder in its own process, picture through OpenGL.
iPhone and iPad iOS and iPadOS 17 or later, arm64. Decoder in the app’s process, picture through OpenGL.
Apple TV tvOS 17 or later, arm64. Decoder in the app’s process; our own render backend, picture without a copy, drawn with Metal.
Fire TV Separate app as a direct download, with the same mechanisms: reserve, new connection in the background, other route, 4K comes back by itself.
Android Android — in progress, Play Store version to follow.

Questions about the technology

What is Neverlag based on?

On our own engine in Swift, which fetches, holds and splices the stream, and on libmpv as the decoder – our own LGPL build of mpv 0.41.0 with FFmpeg 8.0.3. The app is native Swift for Mac, iPhone, iPad and Apple TV.

Is Neverlag just an mpv frontend?

No. Most players decode with FFmpeg – VLC, mpv and Kodi included. The difference is made before that: in how the stream is fetched, buffered, bridged and joined. That is exactly the part Neverlag built from the ground up. mpv decodes – everything before it is Neverlag’s own stream engine: holding the connection, building up a reserve, detecting drops, reconnecting in the background, joining the pieces into one continuous stream, diagnostics. Its core does not contain a single libmpv call. On top of that, we rebuilt libmpv for Apple platforms and extended its render interface; on Apple TV the app puts every frame on the screen itself, on the Mac the decoder runs in a process of its own.

Is Neverlag a webview or a cross-platform framework?

No. Neverlag is written in Swift and built as a separate native app per platform – Mac, iPhone and iPad, Apple TV. No webview, no Electron, no Flutter, no React Native.

Why does the decoder not reload when the connection is cut?

Because it does not see the cut. The engine holds a reserve of 30 to 60 seconds on the device, reconnects in the background and joins the new connection onto the reserve. The decoder receives one continuous stream.

Measured on 8 September 2026: line cut for 60 seconds, zero reloads, new connection 2.1 seconds after the server came back.

Which formats and codecs does Neverlag play?

MPEG-TS and HLS from the provider; as containers also MP4/MOV, Matroska, MPEG-PS and FLV. Video: H.264, HEVC, MPEG-2, MPEG-4 and VP9 – in hardware through VideoToolbox where the chip supports the codec, otherwise in software; AV1 only on devices with AV1 hardware. Audio: AAC, AC-3, E-AC-3, MP2, MP3, Opus, FLAC. All native FFmpeg decoders, no external codec library. No DRM.

Which data leaves the device?

None to Neverlag. The app talks to your provider and to the App Store. No account, no tracking, no analytics. The playback journal stays on the device; you export it yourself if you want to send it to support.

Can I replace the media framework?

Yes. The media framework (Libmpv.framework) sits as a separate, dynamically loaded file in the app bundle. The app uses only the public libmpv interface. You may replace the framework with your own build that keeps the same interface (LGPL 2.1 § 6 b); on the Mac, replace every copy of it in the bundle. On iPhone, iPad and Apple TV, Apple additionally requires the whole app bundle to be re-signed with your own developer certificate – that is a rule of the platform, not of the licence. Sources, patch and build scripts for this are available through the written offer. The stream engine itself is not in the framework but in the app – replacing the framework leaves it untouched.

What is the Neverlag IPTV Bench?

A test bench that measures players under the same recorded disruptions as the Playback Lab. In preparation; more when it runs.

As of 12 October 2026

Neverlag is a player. You need your own M3U playlist or credentials from an IPTV provider. Neverlag does not contain, deliver or broker any content.