What is the MJPG file format?
An .mjpg file contains Motion JPEG (MJPEG) video - a sequence of individual JPEG images played back in rapid succession to create the appearance of motion. Unlike codec-compressed formats such as H.264, there is no inter-frame compression: every frame is a complete, independently decodable JPEG image.
Most .mjpg files use an AVI container (RIFF-based) with the MJPG FourCC in the video stream header. Some cameras output a raw stream of concatenated JPEG frames, each beginning with the standard FF D8 start-of-image marker. QuickTime MOV and RTP streaming (RFC 2435) are also common delivery wrappers.
MJPEG's defining property - every frame is a keyframe - makes it well-suited for frame-accurate editing, minimal decoder latency, and simple hardware implementation. As of 2026 it remains the dominant format for USB webcams (UVC standard), IP and security cameras (ONVIF MJPEG profile), industrial machine-vision cameras, and video capture cards. Frame-by-frame scrubbing in video editors is straightforward because no reference frames must be decoded first.
The trade-off is file size: MJPEG produces significantly larger files than H.264 at equivalent visual quality. Files range from a few megabytes for a brief clip to several gigabytes for hours of security footage. VLC, FFmpeg, and most video editors handle .mjpg files without additional codecs.
Security & safety
RISK: LOWMJPG files are video data - they do not execute code. Opening them in VLC, HandBrake or FFmpeg is safe. Risks are indirect: 'Motion JPEG player' or 'codec pack' download sites sometimes bundle adware or PUPs - use only official VLC (videolan.org), HandBrake (handbrake.fr), FFmpeg (ffmpeg.org) downloads. Malformed MJPG files could theoretically trigger bugs in parser code (JPEG parsing vulnerabilities) but no known active exploits in major players.
Format details
in a nutshell- Wavelet MJPG variant (lossless) - Some professional cameras output a lossless/near-lossless MJPEG variant not compatible with standard MJPG decoders.
Programs that open MJPG files
Technical details
deep spec| Container | Typically AVI (RIFF-based) with `MJPG` FourCC; also QuickTime MOV, raw JPEG sequence, or RTP (RFC 2435) |
| Magic bytes | AVI: `52 49 46 46` (RIFF) at offset 0, `41 56 49 20` (AVI ) at offset 8; raw stream: `FF D8` per-frame SOI marker |
| Video codec | Motion JPEG - JPEG DCT lossy compression applied independently to each frame |
| Temporal compression | Absent - each frame is an independent JPEG with no reference to preceding or following frames (no P-frames or B-frames) |
| FourCC | `MJPG` in AVI stream header; Huffman tables may be omitted from interior frames (standard tables assumed by decoder) |
| Color depth | 24-bit, 4:2:0 YCbCr typical for video; 4:2:2 in professional and broadcast variants |
| Frame independence | Every frame is a full keyframe; random access and frame-accurate editing require no reference frame decoding |
| Audio (when present) | PCM or compressed audio interleaved in the AVI/MOV container, typically 8-48 kHz sample rate |
| Resolution range | 640×480 to 3840×2160 (device-dependent); JPEG format supports up to 65535×65535 per frame |
| Typical size | 1 MB - 4 GB (brief webcam clip to hours of security camera footage) |
| Byte order | Little-endian (AVI/RIFF container) |
| RTP/MJPEG standard | IETF RFC 2435 defines packetization of MJPEG frames over RTP for live streaming in IP camera protocols |
| Key use cases | USB webcams (UVC), IP/security cameras (ONVIF), industrial cameras, video capture cards |
| Superseded by | H.264/AVC (MP4) for general use; MJPEG persists where intraframe-only per-frame access is required |
| Released | Early 1990s (first used in digital video cameras and capture cards) |
| Latest version | N/A - no formal versioning; format is stable and implementation-defined |
| Specification | www.loc.gov |
MJPG conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MJPG files.