Thursday, December 26, 2013

Convert png into movie for youtube

Just small piece of code does the magic!


avconv -i rlds_bced_1960_1999_ipsl-cm5a-lr_rcp8p5_20%02d.png -r 5 -c:v libx264 -crf 1  -pix_fmt yuv420p img2.mov
  • -i "rlds_bced_1960_1999_ipsl-cm5a-lr_rcp8p5_20%02d.png" uses these files as the input, %d is a placeholder for the number
  • -r 5 the desired frame rate, 5 FPS in this case
  • -c:v libx264 use the h264 codec x264
  • -crf 20 the video quality, 20 is pretty high, the default is 23
  • -pix_fmt yuv420p a compatible pixel format

The nice info here:
http://askubuntu.com/questions/269834/how-to-generate-a-mov-file-from-png-images

No comments: