Hi Suoqing,

For a while (and currently in the stable branch), we were using a bbox_inches='tight' keyword when saving matplotlib figures to take care of fitting all of the labels/axes/etc on the canvas.  As you've noticed though, this can lead to different sized images.  Shortly after 2.4 was released, we changed this behavior a bit in the "yt" branch so that the image size says the same for a given aspect ratio simulation.  I think the quickest way to get the behavior you'd like is to cd to your yt-hg directory and do:

hg pull;
hg up -r 3840366c0379
python setup.py install

Let us know if that helps.

Best,
Sam

On Wed, Sep 12, 2012 at 11:51 AM, Ji Suoqing <jisuoqing@gmail.com> wrote:
Hi all,

Sometimes I use YT to generate time series projection/slice plots, and use ffmpeg to convert these png file to mp4 movie. However, the problem is ffmpeg only recognizes the png file with the pixel number of length being an even number. If the inputted png file size is not even times even, there's the error:

[libx264 @ 0x7fcc3c047000] width not divisible by 2 (983x886)
Output #0, mp4, to 'movie.mp4':
    Stream #0:0: Video: h264, yuv420p, 983x886, q=-1--1, 90k tbn, 20 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> libx264)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

So, is there anyway to control the pixel size of the projection/slice plots to be even? Or, is there a much simpler way to generate a projection/slice movie?

Best wishes,
Suoqing
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org