Skip to content

v4.0

Choose a tag to compare

@quatric quatric released this 19 Nov 03:41
· 482 commits to master since this release

mobipeg 4.0 makes MobiClip encoding about twice as fast as 3.0, and a whole encode.py run 2.3x to 7.6x faster, while the files come out 11% to 24% smaller at the same quality. It also adds Bink 1 and Bink 2 encoding, MIVF, and the Topos 3DS player presets. It is rebased onto FFmpeg master as of 2026-11-17.

Speed

Measured on an Apple M4 (4 performance and 6 efficiency cores, macOS), best of several runs. "3.0" is the MobiClip encoder as it stood just after the 3.0 release, before this release's speed work.

MobiClip encoder

Video only, QP 22, on two 20-second clips scaled to each format's size: a film, and the high-motion aespa "Whiplash" music video (from 1:10). Instructions are counted on one thread; they don't move with machine load the way wall time does.

Format Clip 3.0 4.0 Faster
Wii .mo 624x352 film 55.9 G instructions 26.5 G 2.1x
Wii .mo 624x352 Whiplash 55.1 G 25.8 G 2.1x
3DS .moflex 400x240 film 22.3 G 11.1 G 2.0x
3DS .moflex 400x240 Whiplash 25.4 G 12.2 G 2.1x
DS .mods 256x192 film 11.9 G 6.0 G 2.0x
DS .mods 256x192 Whiplash 13.5 G 6.7 G 2.0x

Wall time on Whiplash, all threads:

Format 3.0 4.0 Faster
Wii .mo 0.99 s 0.44 s 2.3x
3DS .moflex 0.61 s 0.26 s 2.3x
DS .mods 0.36 s 0.17 s 2.1x

Quality

The same clips encoded at QP 18, 22, 26 and 30 by both versions. The table shows how much smaller the 4.0 files are for the same picture quality, measured two ways (BD-rate; more negative is better).

Format Clip By PSNR By SSIM
Wii .mo film -17.2% -11.0%
Wii .mo Whiplash -19.4% -13.0%
3DS .moflex film -16.2% -11.3%
3DS .moflex Whiplash -21.3% -15.3%
DS .mods film -14.6% -12.0%
DS .mods Whiplash -24.4% -19.3%

Whole encodes with encode.py

A 3-minute 640x360 H.264 video with PCM audio, default options. The 3.0 column runs 3.0's own encode.py.

Format 3.0 4.0 Faster
Wii .mo 8.09 s 2.84 s 2.8x
3DS .moflex 4.90 s 2.18 s 2.3x
DS .mods 13.76 s 1.81 s 7.6x

Where the speed comes from

  • Motion search on the half-pel grid. MobiClip vectors are half-pel, but x264 searched quarter-pel positions the format can't use. Searching only the positions the decoder can see is faster and slightly better.
  • Rate-distortion costs at the real quantizer. MobiClip codes 12 steps coarser than the QP it is given, but its bits were priced at that QP. Pricing them nearer the real quantizer stops the encoder testing (and choosing) splits it can't afford. This change alone makes files 1% to 7% smaller at the same quality.
  • Less wasted work. Intra and partition searches stop early when they can't win, and a partition re-score whose result was thrown away is skipped.
  • Frame threads for MobiClip pictures.
  • Parallel chunks. encode.py encodes MobiClip and Topos video as several pieces at once and joins them by stream copy (--jobs, default one job per two cores).

The encoder's reconstruction still matches the MobiClip decoder frame for frame. At a fixed --quantizer (QP), files are now somewhat smaller than in 3.0; use a slightly lower QP if you want the old size back.

New formats

  • Bink 1 encoding: video and DCT audio encoders and a .bik muxer; bink format in encode.py and the GUI.
  • Bink 2 encoding (bink2enc ported into libavcodec, KB2j muxer), and a Bink 2 decoder matched against RAD's: the old bitstream, short pictures, and frames without edge flags. The Bink 2 encoder is AGPL-3.0; the release builds now configure FFmpeg with --enable-version3 to include it, so the release binaries are GPLv3.
  • MIVF: M2Y1/M2Y2 video codec, IA4M audio decoder, muxer and demuxer; mivf format in encode.py and the GUI, with an M2Y2 checkbox and audio rate field.
  • Topos 3DS video player presets: topos and topos3d (H.264, New 3DS), and topos_mpeg2 and topos3d_mpeg2 (MPEG-2, Old 3DS). The output is MKV; 3D formats take two eye files or one packed stereoscopic source.

Other changes

  • MODS: DS codebook audio is encoded in the muxer. When the source gives no frame rate, stream copy now paces the audio by the fallback rate instead of coming out short.
  • DS (YCgCo) colour conversion and the keyframe probe are faster.
  • The GUI shows the version in its title and keeps the console on screen on short displays.
  • CI clears extended attributes and codesigns the macOS GUI app, and builds with --enable-version3 (GPLv3) so Bink 2 is included.

Full Changelog: https://github.com/quatric/mobipeg/commits/v4.0