[FFmpeg-user] using ffmpeg to make mp4 from png file series

Ben Foster foster at ucar.edu
Wed Jun 24 23:52:33 CEST 2015


Lou,

Thanks a lot for your prompt reply. I will follow your suggestions
and get back to you if I have more problems.

--Ben

On Wed, Jun 24, 2015 at 3:46 PM, Lou <lou at lrcd.com> wrote:

> 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.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
Ben Foster
National Center for Atmospheric Research (NCAR)
High Altitude Observatory (HAO)
303-497-1595


More information about the ffmpeg-user mailing list