MJPEG to MP4 Converter

Turn a Motion JPEG recording into an H.264 MP4 in your browser.

or drop files here

MJ

MJPEG Format

Motion JPEG

A video encoding that codes each frame as a separate JPEG image. It is found in AVI and QuickTime files and in camera streams.

  • Each frame is a JPEG
  • No inter-frame compression
  • Common in cameras and capture
MP

MP4 Format

MPEG-4 Part 14

A container format defined in ISO/IEC 14496-14 that holds video, audio, subtitles and metadata. H.264 video with AAC audio is the most common combination.

  • H.264, H.265 and AV1 video
  • Plays in every major browser
  • Built from nested boxes

How to convert MJPEG to MP4

Follow these steps to convert MJPEG to MP4 online.

    1

    Choose your MJPEG file, or several at once.

    2

    Wait while the converter turns each file into MP4.

    3

    Download each new MP4 file. Your original file isn't changed.

Before converting MJPEG to MP4

  • The video is encoded again as H.264.
  • Large pictures and high frame rates are limited.
  • A raw stream has no sound to carry over.
  • Each recording gives its own MP4.

About MJPEG and MP4

What is an MJPEG file?

Motion JPEG is a way of coding video: each frame is compressed as an ordinary JPEG picture and the frames follow one another, with no prediction between them. It is therefore an encoding and not a container. AVI files carry it under the MJPG FourCC, following a profile that OpenDML documented in 1996 and 1997, and QuickTime can hold it as well. Cameras and capture hardware commonly record it, and editors sometimes work in it before exporting something lighter for delivery.

Programs that open MJPEG files

  • Windows, Mac and Linux: VLC media player lists MJPEG A/B decoding, and FFmpeg reads raw MJPEG.

MJPEG and MP4 compared

  • Compression: MJPEG compresses every frame on its own, so size follows the encoded images. H.264 also exploits similarity between frames.
  • Container: MJPEG is an encoding that sits in AVI, QuickTime or a raw stream, and MP4 is a container.
  • Editing: because every frame stands alone, editors can cut at any frame, while H.264 is made for delivery.
  • Reach: every major browser plays MP4.

Conversion happens in your browser with FFmpeg, and nothing is uploaded. libx264 does the work, set to ultrafast with CRF 32 and the zerolatency tune. A picture above 1920 pixels on either side is scaled down, and 30 frames a second is the ceiling. Interlaced frames are cleaned up on the way, and audio, if there is any, becomes AAC at 96 kbps. After converting, play the MP4 and check its length and speed against the original recording, since the page does not preview the result for you.

Other ways to convert MJPEG to MP4

  • FFmpeg: ffmpeg -i camera.mjpeg -c:v libx264 -an camera_view.mp4 encodes H.264 and drops audio from the command.
  • FFmpeg with a chosen pixel format: ffmpeg -i clip.mjpeg -pix_fmt yuv420p -c:v libx264 clip_player.mp4 also sets the pixel format to yuv420p.

Problems with MJPEG files

  • The file will not parse: raw MJPEG and multipart JPEG are different formats, and a wrong assumption can stop FFmpeg.
  • A saved frame is not a valid JPEG: an extracted frame can lack a Huffman table that a standalone decoder needs.
  • The result has no sound: a raw MJPEG stream normally carries none.

Frequently Asked Questions

Everything you need to know about our converter

Why convert MJPEG to MP4?

How do I convert MJPEG to MP4?

Can I raise the quality of the MP4?

What happens to a very large or very fast recording?

Is MJPEG a file type?

Will the MP4 have sound?

Does the picture get re-encoded?

Where does MJPEG come from?