MJPEG to PPM Converter

Convert MJPEG files to PPM format online. Free, fast, no watermarks.

Initializing... drag & drop files here

Supports: MJPEG

OptionsAdvanced Options - Our defaults are optimized for the best results. We recommend you keeping the defaults unless you have a specific need.
Image resolution
Bit Depth
Frame Selection
Time (seconds)
Capture a single frame at the specified time. For example, 2.100 means 2 seconds and 100 milliseconds into the video.

Convert MJPEG to PPM

An .mjpeg file is a raw Motion JPEG stream: a run of complete, independent JPEG images written back to back with no container and no timing information. A PPM is the opposite kind of file — a single uncompressed RGB bitmap in the Netpbm family, a fifteen-byte ASCII header followed by raw pixel bytes. Converting between them pulls one frame out of the video stream and writes it as pixels a program can read without a decoder.

That is the whole appeal of PPM. It is the format you reach for when the next step is a script, a computer-vision pipeline, a scientific tool or a piece of C code that would rather parse three integers than link a JPEG library. It is a poor choice for anything you plan to store or send, because uncompressed RGB is enormous.

How to Convert MJPEG to PPM

  1. Upload Your MJPEG File: Drag the .mjpeg file onto the page or click "Add Files". Uploads travel over an encrypted connection and are processed on our servers.
  2. Choose Frame Selection: Specific Frame takes one frame at a Time (seconds) you give, and it starts at 0. Multiple Screenshots instead walks the whole stream at a Capture Rate — one frame per second by default, adjustable from ten frames per second down to one frame every ten seconds — and writes a PPM for each frame it takes. Read the raw-stream note below before you change the time on Specific Frame.
  3. Set Bit Depth and Image Resolution: Bit Depth offers 8-bit (Recommended), 16-bit (High Precision) and 1-bit (Black & White). Image resolution opens on Keep original, with Resolution Percentage, Preset Resolutions, Width, Height and Width x Height as alternatives. Resolution is the only control here that meaningfully changes the output size.
  4. Convert and Download: Click Convert and save the result. No sign-up, no watermark; uploads and outputs are deleted automatically after a few hours.

What Happens Between Upload and Download

The conversion is two steps, and knowing them explains most of its behaviour. First the selected frame or frames are decoded out of the MJPEG stream and written as lossless PNG, so nothing is re-compressed at this stage. Then each PNG is written out as PPM with the bit depth you chose and with metadata stripped.

Because PPM has no compression at all, the second step cannot make the file smaller. A PPM's size is fixed by three numbers: width, height, and bytes per sample. Scaling the image down is the only lever that changes it much.

PPM property Value
Full name Portable Pixmap, part of the Netpbm family
Magic number written here P6 — the binary variant; P3 is the ASCII one
Header contents Magic number, width, height and maximum sample value, separated by whitespace
Colour model RGB only — no alpha channel, no palette, no colour profile
Compression None whatsoever
Metadata None; there is nowhere in the format to store it
Aspect ratio flag Not stored — the pixel grid is all there is
Related formats PBM for bitmaps, PGM for greyscale, PNM as the umbrella name, PAM when an alpha channel is needed

Bit Depth: What the Three Settings Actually Do

This is the control people most often expect to shrink the file, and on PPM two of the three settings do not. We converted the same 640×480 frame at each depth and measured the results:

Bit Depth setting PPM header written File size for a 640×480 frame What actually changed
8-bit (Recommended) P6 with maxval 255 921,615 bytes Baseline — three bytes per pixel
16-bit (High Precision) P6 with maxval 65535 1,843,217 bytes Exactly double; six bytes per pixel
1-bit (Black & White) P6 with maxval 1 921,613 bytes No size change. Each channel is quantised to 0 or 1, leaving eight possible colours, but the file still stores one byte per sample

The 1-bit result is the surprising one and worth stating plainly: choosing it posterises the picture hard without saving a single meaningful byte, because binary PPM always writes whole bytes per sample regardless of the declared maximum value. If you want a genuinely small monochrome bitmap, PPM is the wrong container — use an image editor to write a true one-bit format, or convert to a compressed format such as MJPEG to PNG instead.

16-bit is worth choosing only when the downstream tool genuinely reads 16-bit samples. An MJPEG source is 8-bit JPEG data to begin with, so 16-bit output doubles the file without adding any information that was not already there — it is a format-compatibility choice, not a quality one.

Frame Selection on a Raw Stream — the One Real Trap

A raw .mjpeg file carries no index and no timestamps, and that has two consequences that catch people out:

  • The frame rate is assumed. FFmpeg's raw video demuxer defaults to 25 fps for these files. So "2 seconds in" means frame 50, regardless of the rate the frames were actually captured at. If a camera wrote 10 fps, asking for 2 seconds gets you the frame five seconds into the real recording.
  • Seeking does not work. There is no index to seek with, so asking for any non-zero time under Specific Frame finds nothing at all and produces no output file rather than a picture. We reproduced this against a raw MJPEG stream: a request at 0 seconds returned a frame; requests at 0.04, 0.5, 1 and 2 seconds each returned nothing.

The practical rules that follow are simple. Leave Specific Frame at 0 to grab the opening frame, which is the default and works. To reach a later frame, use Multiple Screenshots instead — it walks the stream forward rather than seeking into it, so it works fine on raw data, and you pick the frame you wanted from the set. If you need one exact frame from deep in a long stream, convert the MJPEG into a real container first with MJPEG to MP4; seeking behaves normally once the file has an index.

Frequently Asked Questions

My conversion produced no file. What went wrong?

If you changed the Time (seconds) value under Specific Frame, that is almost certainly the cause. Raw MJPEG streams cannot be seeked into, so a non-zero time lands past the end of what the demuxer will read and nothing is encoded. Set the time back to 0, or switch to Multiple Screenshots and let the converter walk through the stream. Both routes work reliably on raw data.

Why is my PPM so much larger than the MJPEG it came from?

Because PPM stores raw pixels and JPEG stores a compressed approximation of them. A 640×480 frame is 921,600 bytes of RGB no matter what it looked like, while the same frame as JPEG might be 30 KB. The ratio only grows with resolution: a 1920×1080 frame is about 6.2 MB as 8-bit PPM. That is not waste — it is the point of the format — but it means PPM is for processing, not storage or transfer.

Is the PPM lossless compared with the original frame?

Compared with the decoded frame, yes at 8-bit. The frame comes out of the MJPEG stream as lossless PNG and is then written to PPM without any further compression, so no pixel values change. What you cannot recover is the loss JPEG already applied when the frame was recorded — the blocking and ringing of the original encode are baked into the pixels and get preserved faithfully.

What is the difference between P3 and P6 PPM files?

They are the ASCII and binary variants of the same format. P3 spells every sample out as decimal text, which is human-readable and roughly three to four times larger; P6 writes raw bytes after the header. This converter writes P6, which is what almost all software expects and what every reader in the Netpbm family handles. You can confirm it by opening the output in a text editor — the first two characters are P6.

Can I get every frame of the MJPEG as separate PPM files?

Close to it. Multiple Screenshots captures on a fixed schedule rather than every frame, and the fastest setting is ten frames per second. On a stream the demuxer treats as 25 fps that samples a bit under half the frames. It is the right tool for contact sheets, thumbnail strips and sampling a long capture; it is not a full frame dump. Bear in mind the arithmetic before you start — a minute of 1080p at ten frames per second is around 3.7 GB of uncompressed PPM.

Does the PPM keep any metadata from the source?

No, and deliberately so. The format has no place to put it: a PPM header contains a magic number, the width, the height and the maximum sample value, and that is the entire specification. Colour profiles, EXIF, timestamps and orientation flags are all discarded, and metadata is stripped during the write. If any of that matters, convert to a format that can carry it, such as PNG or TIFF.

Why does my extracted frame look stretched?

PPM stores no aspect-ratio information whatsoever, so a source with non-square pixels loses the flag that told players to display it wider or narrower than its stored size. Raw MJPEG is usually square-pixel, so this is uncommon here, but if you know your source is anamorphic, set Width x Height explicitly to the display shape you want. Note that any resize in this pipeline flattens the pixel aspect to square, so entering the target dimensions yourself is the reliable route.

How are my files handled while they are on your servers?

The .mjpeg file is uploaded over an encrypted connection, converted on our servers, and both the upload and the output are deleted automatically after a few hours. There is no account to create, no watermark, and files are never shared or made public. Raw MJPEG streams are large for their duration, so upload time is usually the practical constraint rather than anything about the conversion itself.

Rate MJPEG to PPM Converter Tool

Rating: 4.8 / 5 - 62 reviews