Skip to main content
Spacebruce dot netlify dot app

How to encode Video CD files with ffmpeg

The ffmpeg built in "-target pal-vcd" (and counterpart ntsc-vcd) option has some nasty compression "pulsing", creating fresh I-frames to enforce a strict data rate regardless of actual quality, these replacements reduce this somewhat and produce a slightly more watchable file. Change all instances of "in.mkv" to input filename/path and "out.mpeg" to output filename/path. If using Linux, replace nul with /dev/null

# PAL Video

ffmpeg -i "in.mkv" -pass 1 -c:v mpeg1video -f vcd -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x288 -g 15 -an -passlogfile log_file nul && ffmpeg -i "in.mkv" -pass 2 -c:v mpeg1video -f vcd -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x288 -g 15 -c:a mp2 -b:a 224000 -ar 44100 -ac 2 -packetsize 2324 -muxrate 1411200 -passlogfile log_file "out.mpeg"

# PAL Video with embedded subtitles;

ffmpeg -i "in.mkv" -pass 1 -c:v mpeg1video -f vcd -vf subtitles="in.mkv" -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x288 -g 15 -an -passlogfile log_file nul && ffmpeg -i "in.mkv" -pass 2 -c:v mpeg1video -vf subtitles="in.mkv" -f vcd -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x288 -g 15 -c:a mp2 -b:a 224000 -ar 44100 -ac 2 -packetsize 2324 -muxrate 1411200 -passlogfile log_file "out.mpeg"

# NTSC Video

ffmpeg -i "in.mkv" -pass 1 -c:v mpeg1video -f vcd -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x240 -g 18 -an -passlogfile log_file nul && ffmpeg -i "in.mkv" -pass 2 -c:v mpeg1video -f vcd -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x240 -g 18 -c:a mp2 -b:a 224000 -ar 44100 -ac 2 -packetsize 2324 -muxrate 1411200 -passlogfile log_file "out.mpeg"

# NTSC Video with embedded subtitles;

ffmpeg -i "in.mkv" -pass 1 -c:v mpeg1video -f vcd -vf subtitles="in.mkv" -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x240 -g 18 -an -passlogfile log_file nul && ffmpeg -i "in.mkv" -pass 2 -c:v mpeg1video -vf subtitles="in.mkv" -f vcd -b:v 1150000 -maxrate 1150000 -minrate 1150000 -bufsize 327680 -s 352x240 -g 18 -c:a mp2 -b:a 224000 -ar 44100 -ac 2 -packetsize 2324 -muxrate 1411200 -passlogfile log_file "out.mpeg"