Convert Video to Microsoft RLE Using FFmpeg

This article provides a step-by-step guide on how to transcode modern video files into the historical Microsoft RLE (Run-Length Encoding) format used in Windows 3.1 using FFmpeg. You will learn the exact command-line arguments required to format the video to 8-bit color and encode the audio into a compatible PCM format, ensuring the resulting AVI file can run on vintage operating systems.

Understanding Microsoft RLE constraints

Microsoft RLE (frequently identified by the FourCC code MRLE or RLE) is an extremely old graphics and video format. To successfully play a video in Windows 3.1 using the classic Media Player (MPLAYER.EXE), the file must adhere to strict limitations:

The FFmpeg Command

To transcode a modern video (such as an MP4) into a Windows 3.1-compatible AVI file with Microsoft RLE video and PCM audio, run the following command in your terminal:

ffmpeg -i input.mp4 -c:v msrle -pix_fmt pal8 -c:a pcm_s16le -ar 22050 -ac 1 output.avi

Command Breakdown

Adjusting Video Resolution (Optional)

Windows 3.1 computers struggle to play high-resolution files. If your input video is 1080p or 4K, you must downscale it to a historical resolution like 320x240 or 160x120.

You can add the scale filter to your command like this:

ffmpeg -i input.mp4 -vf "scale=320:240" -c:v msrle -pix_fmt pal8 -c:a pcm_s16le -ar 11025 -ac 1 output.avi

Using this command ensures your output file is fully optimized for vintage hardware emulation or original retro PCs running Windows 3.1.