Motion JPEG Codec on CUDA for High FPS Video

Updated:

Fastvideo CUDA MJPEG codec compresses and decompresses Motion JPEG streams entirely on the GPU, reaching 5500 fps of Full HD encoding on the NVIDIA GeForce RTX 4090. Motion JPEG is video built from independent JPEG frames, and that independence is exactly what makes it the format of choice when frame rates go extreme. The codec is the video counterpart of our Fast JPEG codec: the same fully parallel per-frame engine, applied to continuous streams.

Detailed benchmark data. Measured results are published on our benchmark pages: JPEG codec benchmarks, all benchmarks.

A large web service processed over 400,000 JPEG images per second on our SDK.

Why MJPEG for High Speed Video

Inter-frame codecs — H.264, H.265, AV1 — achieve better compression ratios, but their encoders are built around motion estimation between frames and cannot sustain the frame rates that high speed cameras produce. MJPEG has no inter-frame dependencies: every frame is encoded on its own, so the throughput scales with the JPEG engine, and on the GPU that means video encoding at 1000 fps and far beyond. For high speed imaging, MJPEG is effectively the only option for real-time encoding — and as a bonus, every frame of the recording is individually seekable and extractable, which inter-frame formats cannot offer.

Features of the Motion JPEG Codec on CUDA

MJPEG Benchmarks on the NVIDIA GeForce RTX 4090

Motion JPEG (MJPEG) encoding and decoding throughput of the Fastvideo codec on the NVIDIA GeForce RTX 4090.
Motion JPEG on NVIDIA GeForce RTX 4090 (Full HD, single-thread) Throughput
MJPEG encoding up to 5500 fps
MJPEG decoding up to 1500 fps

Test conditions: Full HD frames (1920×1080, 8-bit per channel, RGB), all data in GPU memory, timing includes GPU computations only, quality 95, subsampling 4:4:4. Hardware: NVIDIA GeForce RTX 4090 (PCIe 4.0 x16), CPU AMD Ryzen 9 7950X. Software: Windows 10/11, CUDA 12.6.

These numbers are for a single-threaded application; multithreading improves them further, and on Linux the CUDA MPS mode adds another gain. Benchmarks for other frame sizes are collected on the SDK benchmarks page.

MJPEG inside a Camera Pipeline

The codec rarely works alone: in high speed camera applications it is the final stage of a GPU pipeline. We offer the combined debayer and JPEG encoder as a ready pair, and the full chain — acquisition, dark frame subtraction, flat-field correction, white balance, denoising, demosaicing, color correction, LUTs, tone mapping, crop/resize/remap, sharpening, and MJPEG compression — is available from the Fastvideo SDK. This is exactly the configuration used in our own GPU RAW Processor and FastVCR software, where MJPEG recording keeps up with the camera at full resolution and frame rate.

Roadmap for the CUDA MJPEG Codec

Recently released:

In progress:

Support

For further information about the CUDA MJPEG codec, a demo, or a quotation, contact us via the form below.

Fyodor Serzhenko, Fastvideo

About the author

Fyodor Serzhenko, PhD, is the founder and CEO of Fastvideo. He earned his PhD at the Moscow Institute of Physics and Technology (MIPT) in 1993. Since 2009 he has led the development of Fastvideo’s GPU-accelerated image codecs and ISP modules, including the Fastvideo SDK. Connect on LinkedIn.

Why you can trust these results

Fastvideo has built GPU-accelerated image processing software since 2009. Our codecs comply with the standards they implement — JPEG (ITU-T T.81 / ISO IEC 10918) and JPEG2000 (ITU-T T.800 / ISO IEC 15444) — and our tools are open source on GitHub. Every performance figure we publish is reproducible: see our benchmark methodology, download the Fastvideo SDK benchmark report (PDF), and measure it on your own GPU.

Contact Form

This form collects your name and email. See our Privacy Policy for how we handle your personal data.