[yt-users] how to control the pixel size for projection/slice plot in order to use ffmpeg

Ji Suoqing jisuoqing at gmail.com
Wed Sep 12 10:51:37 PDT 2012


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


More information about the yt-users mailing list