FFmpeg Command to Output MPEG-2 VOB

This article provides a direct guide on how to write an FFmpeg command to output video in the MPEG-2 Program Stream (VOB) container. You will find the exact command-line syntax for both automatic presets and manual configurations, along with a breakdown of the essential parameters required to ensure compatibility with the VOB format, which is standard for DVD-Video.


The Standard Command (Using DVD Presets)

The easiest and most reliable way to output a VOB file in FFmpeg is to use the built-in target presets. These presets automatically configure the correct video codec, audio codec, resolution, bitrate, and container format required for standard MPEG-2 Program Streams.

For NTSC format (used primarily in North America and Japan):

ffmpeg -i input.mp4 -target ntsc-dvd output.vob

For PAL format (used primarily in Europe and other regions):

ffmpeg -i input.mp4 -target pal-dvd output.vob

The Manual Command (For Custom Settings)

If you need custom control over the bitrate, resolution, or aspect ratio while still outputting to a VOB container, you can define the parameters manually.

Below is the standard manual command for a high-quality MPEG-2 VOB file:

ffmpeg -i input.mp4 -c:v mpeg2video -b:v 5000k -maxrate 9000k -bufsize 1835k -c:a ac3 -b:a 192k -f vob output.vob

Parameter Breakdown

Understanding the individual arguments used in the manual command allows you to customize the output to your specific needs:

  • -i input.mp4: Specifies your input source video.
  • -c:v mpeg2video: Sets the video codec to MPEG-2, which is mandatory for the VOB container.
  • -b:v 5000k: Sets the average video bitrate to 5 Mbps (5000 kbps). You can adjust this to balance file size and quality.
  • -maxrate 9000k: Sets the maximum video bitrate. For standard DVD compatibility, the maximum peak bitrate should not exceed 9.8 Mbps (9800 kbps).
  • -bufsize 1835k: Sets the video buffer verifier (VBV) buffer size, which controls bitrate fluctuations to prevent playback stuttering on older hardware.
  • -c:a ac3: Sets the audio codec to AC-3 (Dolby Digital), which is the standard audio format for VOB files. Alternatively, you can use -c:a mp2 for MPEG-1 Audio Layer II.
  • -b:a 192k: Sets the audio bitrate to 192 kbps.
  • -f vob: Forces the output format to be a VOB (MPEG-2 Program Stream) container.
  • output.vob: The name of your output file.