title: How to avoid pumping artifacts when encoding still images into a mpeg-2 video using ffmpeg
body: <p>I'm encoding a still image into a dvd compliant mpeg stream using a command line like this:</p>
  
  <p><code>ffmpeg.exe -y -loop 1 -t 00:00:30 -r 1 -i "image.jpg" -target pal-dvd -b:v 6000000 video.mpg</code></p>
  
  <p>This generates a video of 30s showing a single still image.
  When watching the video I notice strange (and ugly) "pumping" artifacts, approximately at the end of each GOP.
  Using a stream analyzer tool I noticed that two consecutive I frames in a sequence of IPPPPPPPPPPPPPPIPPPPPPPPPPPPPP... do not look the the same as I would expect it, since there should be no reason for the encoder to change encoding parameters that influence quality.</p>
  
  <p>I also encoded the same image using the command line</p>
  
  <p><code>ffmpeg.exe -y -loop 1 -t 00:00:30 -r 1 -i "image.jpg" -f dvd -pix_fmt yuv420p -r 25 -s 720x576 -aspect 16:9 -vcodec mpeg2video -b:v 6000000 -maxrate 9000000 -bufsize 1835008 -muxrate 10080000 -minrate 0 -packetsize 2048 -g 15 video.mpg</code></p>
  
  <p>which applies more or less the same parameters that are implied by -target pal-dvd above.
  The result is the same as expected.</p>
  
  <p>Note: non still material shows less to no "pumping". It also nearly disappears when setting vbv buffer size to a higher value like 3670016 bytes, doubling it effectively.
  Unfortunately this is no option since the stream should be dvd compliant which enforces a vbv buffer size like in the command lines above.</p>
  
  <p>So how can I avoid these visual artifacts and get a stream that (really) shows a still image?</p>