Transcode Video to MPEG-1 Using FFmpeg
This article provides a straightforward guide on how to transcode
modern video files into the legacy MPEG-1 format using FFmpeg and the
mpeg1video encoder. You will learn the basic command-line
syntax, essential encoding parameters for video and audio, and how to
configure settings for specific target requirements like Video CD (VCD)
compatibility.
Basic MPEG-1 Conversion Command
To convert a video file to MPEG-1, you must specify the
mpeg1video encoder for the video stream. Because MPEG-1 is
an older format, it is typically paired with MP2 (MPEG-1 Audio Layer II)
audio and packaged inside an MPEG-PS container (.mpg).
Here is the standard command to transcode a video:
ffmpeg -i input.mp4 -c:v mpeg1video -b:v 2000k -c:a mp2 -b:a 192k output.mpgExplanation of Parameters
-i input.mp4: Specifies the source video file.-c:v mpeg1video: Selects the MPEG-1 video encoder.-b:v 2000k: Sets the video bitrate to 2000 Kbps. MPEG-1 does not use modern constant quality modes (like CRF in x264), so setting an explicit bitrate is necessary to control quality and file size.-c:a mp2: Selects the MP2 audio encoder, which is the standard audio format companion for MPEG-1.-b:a 192k: Sets the audio bitrate to 192 Kbps.output.mpg: The designated output file name with the.mpgcontainer extension.
Adjusting Resolution and Framerate
MPEG-1 has strict limitations regarding maximum resolution and framerates depending on the player or decoder being used. If you need to resize the video or change the framerate to ensure compatibility, use the scale filter and the framerate flag:
ffmpeg -i input.mp4 -c:v mpeg1video -vf "scale=352:248" -r 30 -b:v 1500k -c:a mp2 -b:a 128k output.mpg-vf "scale=352:248": Resizes the video to a width of 352 pixels and a height of 248 pixels.-r 30: Forces the output framerate to 30 frames per second.
Encoding for Strict VCD Compatibility
If you are transcoding a video specifically for playback on vintage Video CD (VCD) hardware, the parameters must adhere to strict NTSC or PAL standards. FFmpeg includes a built-in target profile that configures these settings automatically.
For NTSC VCD (North America/Japan):
ffmpeg -i input.mp4 -target ntsc-vcd output.mpgFor PAL VCD (Europe/Asia):
ffmpeg -i input.mp4 -target pal-vcd output.mpgUsing the -target flag automatically sets the correct
video resolution (352x240 for NTSC, 352x288 for PAL), framerate, video
bitrate (1150 Kbps), audio format (MP2 at 224 Kbps, 44.1 kHz), and
multiplexer settings required for VCD authoring.