[FFmpeg-user] using ffmpeg to make mp4 from png file series
Lou
lou at lrcd.com
Wed Jun 24 23:46:24 CEST 2015
On Wed, 24 Jun 2015 14:40:16 -0600
Ben Foster <foster at ucar.edu> wrote:
> Hi,
>
> I have a series of png files that I would like to make into an mpeg movie
> that would be playable on a Mac. I am trying this w/ the following command:
> ffmpeg -f image2 -i "oplus_maps_zp1_%03d.png" -pix_fmt yuv420p file.mp4
The "-f image2" is not needed.
> The error in question is: [libx264 @ 0x35e1f00] width not divisible by 2
> (455x450)
If you need yuv420p you will need to either:
* scale
ffmpeg -i input%03d.png -vf scale=-2:ih,format=yuv420p output.mp4
* or crop
ffmpeg -i input%03d.png -vf crop=iw-1:ih,format=yuv420p output.mp4
> I assume this means my input file width should be divisible by 2. I used
> ImageMagick
> convert to create png files with an even number of pixels in width, but it
> did not solve
> the problem.
That step was likely unnecessary. Are you sure it did what you wanted?
The width is still 455.
> Ben Foster
> foster at ucar.edu
>
> [foster at yslogin6 oplus_maps_zp1.movie]$ !ffmpeg
> ffmpeg -f image2 -i "oplus_maps_zp1_%03d.png" -pix_fmt yuv420p file.mp4
Ancient. Please compile from current git master or use a recent static
build from http://johnvansickle.com/ffmpeg/
Don't waste your time with old builds.
> ffmpeg version 1.1.2 Copyright (c) 2000-2013 the FFmpeg developers
> built on Feb 19 2013 10:15:04 with gcc 4.4.6 (GCC) 20110731 (Red Hat
> 4.4.6-3)
> configuration: --disable-yasm --prefix=/glade/p/hao/wiltbemj/local
--disable-yasm is not a good idea.
More information about the ffmpeg-user
mailing list