title: FFMPEG (libx264) "height not divisible by 2"
body: <p>I am trying to encode a .mp4 video from a set of frames using FFMPEG using the libx264 codec.</p>
  
  <p>This is the command I am running:</p>
  
  <pre><code>/usr/local/bin/ffmpeg -r 24 -i frame_%05d.jpg -vcodec libx264 -y -an video.mp4
  </code></pre>
  
  <p>I sometimes get the following error:</p>
  
  <pre><code>[libx264 @ 0xa3b85a0] height not divisible by 2 (520x369)
  </code></pre>
  
  <p>After searching around a bit it seems that the issue has something to do with the scaling algorithm and can be fixed by adding a -vf argument. </p>
  
  <p>However, in my case I don't want to do any scaling. Ideally, I want to keep the dimensions exactly the same as the frames. Any advice? Is there some sort of aspect ratio that h264 enforces?</p>