Repository navigation
v3.0
mobipeg 3.0 is the biggest release so far: two new Flipnote muxers, three new decoders and demuxers, five encoders that now write exactly what their reference tools write, and a speed pass over almost every Nintendo codec in the tree, with unchanged output wherever the format did not change. It is rebased onto FFmpeg master as of 2026-11-14 (bcbc183264), with 310 mobipeg commits on top.
Highlights
- Much faster. Mobiclip video encodes about 3x faster, VX audio about 20x, GameCube/Wii/3DS ADPCM up to 7x, THP video up to 1.9x, and the decoders 1.3x to 10x. Numbers are in Benchmarks.
- Byte-exact encoders. FastVideoDS, RocketVideo, MOFLEX FastAudio and MOFLEX ADPCM output is now identical to FastVideoDSEncoder, Vid2RVID and MoflexTool for the same input.
- Flipnote Studio and Flipnote Studio 3D output.
.ppm(DSi) and.kwz(3DS) notes can be written, fromffmpeg,encode.pyand the GUI. - New things to play. FVDS (First Hunt) video, Pixter Multimedia Em-Flash movies, and
mus1MobiClip audio.
New formats
Flipnote Studio (.ppm) muxer. 256x192 1-bit video with optional 8192 Hz BGM stored as ADPCM, signed with RSA-1024/SHA-1 so the DSi accepts the note. encode.py and the GUI gained a flipnote target that dithers to 1-bit.
Flipnote Studio 3D (.kwz) muxer. 320x240 video reduced to the six Flipnote colours with ordered dithering chosen in Oklab, spread over the three layers the way the application's own sample notes are. Layers are compressed with the application's rules (cheapest tile type, unchanged tiles skipped in runs), the BGM uses the format's 2/4-bit ADPCM, and the thumbnail is a JPEG laid out like the application's. Notes end in an RSA-2048 signature; the key is not included and is passed with -kwz_key. Without a key the signature is left zeroed. encode.py and the GUI gained a flipnote3d target plus --flipnote-author, --flipnote-dither, --flipnote-paper, --flipnote-key and --flipnote-loop.
FVDS (First Hunt) demuxer and video decoder. Bit-exact against the game's own decoder, with the FastAudio DS variant for its sound.
Em-Flash decoder (Pixter Multimedia fla2/fla3). These payloads are Flash 3-5 movies. The decoder is a software Flash player: shapes with solid and gradient fills, text, buttons, sprites, clip masks and an ActionScript 1 interpreter. Frames match Ruffle up to edge antialiasing. moc3 descrambles the payload and exposes it as a video stream; -autoclick presses on-screen buttons so games leave their menus, -fla_frames sets how long an interactive movie runs, and -fla_data keeps the raw SWF output.
MobiClip mus1 audio demuxer (mobimus), fla3/vid3 tags in moc3, and video size options for moc3.
Encoders that match their reference
Each of these is tested by comparing its output with the reference tool's for the same input.
| Output | Reference | What matches |
|---|---|---|
FastVideoDS .fv (video, audio, container) |
FastVideoDSEncoder | the whole file |
RocketVideo .rvid |
Vid2RVID | the whole file |
| MOFLEX FastAudio | MoflexTool | every audio packet |
| MOFLEX IMA ADPCM | MoflexTool | every sample code |
Flipnote Studio 3D .kwz layers |
notes saved by the application | the compressed data of stand-alone and run-skipped layers |
FastVideoDS. The encoder gained predicted frames and follows the reference decision for decision: escape order, diamond motion search, trellis quantizer for residuals, intra/predicted choice, and key frame placement. The 12-second test clip comes out at 2.3 MB instead of the 9.9 MB that 2.3 wrote. The audio is now its own adpcm_ima_fvds codec. The muxer writes the key frame table that FastVideoDSPlayer needs to open a file, and the demuxer seeks by it. Rows of blocks are coded in parallel, and the output is the same at any thread count.
RocketVideo. RGB555, RGB565 and 256 colour modes, compressed or not, interlaced, NTSC rates and two screens (-dual_screen 1) all match Vid2RVID. The decoder now handles raw frames inside compressed files (such files used to fail), 1000/1001 frame rates, signed 8-bit sound, header versions 1 to 4 and dual-screen videos. Sound above 32000 Hz, which the player refuses, is rejected; encode.py resamples.
FastAudio. The encoder now uses linear prediction and a least-squares pulse search, the method of MoflexTool. Signal to noise on speech and music goes from about 6 dB to about 13 dB. A new lookahead option gives the encoder the samples after a frame.
MOFLEX IMA ADPCM. Picks the nearest IMA level again, which is worth about 5 dB on MOFLEX audio and about 3 dB on every other IMA encoder sharing the code.
Fixes
- MOFLEX 3D audio stutter. In frame-interleaved 3D files each audio chunk held half a picture's worth of sound and the 3DS player stuttered. Both eyes of a picture now stay together so audio comes once per picture. Based on the moflex-3d-pair-audio patch from RevivetendoOpenSource, which was tested on a real 3DS.
- MOFLEX 2D descriptor. A 2D movie now carries the plain video descriptor, as retail 2D movies do. MoflexTool used to show mobipeg's 2D files as 3D.
-mo_vdesc 3still writes the layout descriptor. - MODS N2 audio. The audio of key frames in N2 files (written by the TWL SDK encoder) was dropped. It is now read, and N2 files are recognised by content as well as by name.
- FastAudio decoder. The last sample of a sub-block is rebuilt from three bits, which makes decoding bit-exact with the reference decoders again.
- AAC encoder hang. Audio with a loud onset after near-silence (16 kHz stereo at 128k, for one) could loop forever.
- Crash on MobiClip Wii ADPCM and Siren Express streams, caused by a codec descriptor out of order.
- MO muxer scaled samples by 32767 instead of 32768.
- GUI. Subprocess output is decoded as UTF-8, and environment-only errors are no longer sent to Sentry.
- CI. macOS builds moved to the
macos-15runner; GitHub retiredmacos-14in early November, which had stopped the macOS, GUI and release jobs.
Benchmarks
Measured on an Apple M4 (macOS, default thread count unless noted), wall time, best of three runs. "2.3" is the last build before the speed work, which has the 2.3 codecs. Test clips are 12 seconds of film at 24 fps (256x192, 400x240) or 29.97 fps (624x352), with 32 kHz stereo sound. "Same" means the output file is byte-identical.
Several of the gains come from NEON code (the ADPCM encoders, the THP/Factor 5 quantizer, and RGB conversion in the decoders). Those apply to arm64 builds only; x86 builds keep the previous code paths for them and gain less.
Mobiclip video (MODS, MOFLEX, MO)
| Encode | 2.3 | 3.0 | Faster | Output |
|---|---|---|---|---|
| MODS 256x192, video only, one thread | 1.52 s | 0.47 s | 3.2x | same |
MODS 256x192, -qp 30 |
1.19 s | 0.41 s | 2.9x | same |
MODS 256x192, -preset slow |
1.77 s | 0.57 s | 3.1x | same |
| MODS 256x192 + ADPCM audio | 1.55 s | 0.48 s | 3.3x | same |
| MODS 256x192 + codebook (VX) audio | 24.83 s | 1.07 s | 23x | same |
| MODS 256x192 + FastAudio | 1.98 s | 0.53 s | 3.7x | new audio encoder |
| MOFLEX 400x240 + ADPCM audio | 2.81 s | 0.87 s | 3.2x | audio and descriptor fixes |
| MOFLEX 400x240, 600 kb/s | 3.00 s | 0.90 s | 3.3x | descriptor fix |
| MOFLEX 400x240 + FastAudio | 3.02 s | 0.88 s | 3.4x | new audio encoder |
| MO 624x352 + ADPCM audio | 7.23 s | 2.30 s | 3.1x | same |
| MO 624x352 + PCM audio, one thread | 7.22 s | 2.30 s | 3.1x | same |
| MO 624x352 + FastAudio | 7.29 s | 2.32 s | 3.1x | new audio encoder |
VX (GBA)
| Encode | 2.3 | 3.0 | Faster | Output |
|---|---|---|---|---|
| VX video + VX audio (mono) | 12.49 s | 0.65 s | 19x | same |
| VX video only | 0.89 s | 0.29 s | 3.1x | same |
| VX video, 300 kb/s rate control (4 s) | 1.74 s | 0.62 s | 2.8x | same |
VX video + audio, -ltp 0 |
0.94 s | 0.30 s | 3.1x | same |
GameCube, Wii and 3DS audio (60 s stereo unless noted)
| Encode | 2.3 | 3.0 | Faster | Output |
|---|---|---|---|---|
| AST (AFC ADPCM) | 0.680 s | 0.091 s | 7.4x | same |
| BCSTM | 0.358 s | 0.093 s | 3.9x | same |
| BRSTM (DSP ADPCM) | 0.350 s | 0.093 s | 3.8x | same |
| DSP, mono | 0.193 s | 0.052 s | 3.7x | same |
| BRWAV, 12 s mono | 0.053 s | 0.023 s | 2.3x | same |
THP and Factor 5 video (1800 frames)
| Encode | 2.3 | 3.0 | Faster | Output |
|---|---|---|---|---|
THP 624x352, -q:v 2 |
0.373 s | 0.236 s | 1.6x | same |
THP 624x352, -q:v 2, one thread |
1.70 s | 0.89 s | 1.9x | same |
THP 624x352, -q:v 8 |
0.243 s | 0.159 s | 1.5x | same |
Factor 5 640x480, -q:v 3 |
1.43 s | 1.10 s | 1.3x | same |
Factor 5 640x480, -q:v 8 |
0.98 s | 0.82 s | 1.2x | same |
| Factor 5 640x480, 800 kb/s | 0.78 s | 0.70 s | 1.1x | same |
FastVideoDS encoder (256x192, 288 frames)
The 2.3 encoder wrote key frames only. The 3.0 encoder does the reference encoder's full motion search and trellis and still finishes sooner.
| Build | Time | File size |
|---|---|---|
| 2.3 (key frames only) | 0.49 s | 9.9 MB |
| 3.0, default threads | 0.25 s | 2.3 MB |
| 3.0, one thread | 0.53 s | 2.3 MB |
Decoding (same file, same decoded pictures)
| Decode | 2.3 | 3.0 | Faster |
|---|---|---|---|
| FastVideoDS, key frames only (9.9 MB) | 1.28 s | 0.13 s | 10x |
| FastVideoDS, predicted frames (2.3 MB) | 0.258 s | 0.054 s | 4.8x |
| VX 256x192, 1728 frames | 0.466 s | 0.180 s | 2.6x |
| VX 256x192, 12 s | 0.077 s | 0.029 s | 2.7x |
Mobiclip MODS 256x192, -qp 30 |
0.032 s | 0.016 s | 2.0x |
| Mobiclip MODS 256x192 | 0.037 s | 0.021 s | 1.8x |
| Mobiclip MO 624x352 | 0.093 s | 0.064 s | 1.5x |
| Mobiclip MO 256x192, 60 s with FastAudio | 0.118 s | 0.084 s | 1.4x |
Upgrading
- FastVideoDS, RocketVideo, MOFLEX and FastAudio output differs from 2.3 because it now matches the reference tools. Files written by 2.3 still decode.
.fvaudio is the newadpcm_ima_fvdscodec instead of MobiClip ADPCM. The demuxer still reads files from the old muxer, which have no key frame table.- RocketVideo compression and interlacing now default to Vid2RVID's frame rate rules;
-lazy 1keeps the tighter LZ10 parse.
Thanks
Gericom (FastVideoDSEncoder), RocketRobz (Vid2RVID), koori0831 (MoflexTool) and the Ruffle project for the references this release is tested against, and RevivetendoOpenSource for the MOFLEX 3D audio patch.