Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have lots of PNG images:


They are all of size 1280x720. I want to turn them into an animation and upload it to YouTube as a HD video. I've heard that H264 is a good format and the MPEG would result in poor quality. But I'm not good at animation formats. :-)

So. Is there a free command line application I can use to turn these into a H264 animation and what would the command line look like?

Edit: Please see CarlF's comment below. Apparently I'm confused on the formats. :-)

share|improve this question
  • ffmpeg or mencoder can be used to create videos out of image sequences. I found this tutorial on it after a quick google. Their codecs are (mostly) built-in. The apps work on Windows, Mac and Linux.
  • VirtualDub will allow you to import PNG image sequences, and encode them into videos. If you have the right codecs installed you can create H.264 files. You will need a separate application to convert it into the MP4 container. It does provide a command-line application. VDub is Windows-only.

And please don't forget that YouTube is in the habit of re-encoding its videos even if they're in the right format, so regardless you may just lose quality anyway. Thankfully it's not too much for live-action videos, but videos like 2D animations (anime, cartoons and the like) do suffer.

share|improve this answer
Just for the record H.264 is a variety of MPEG encoding. (Kent said one was better than the other.) For YouTube uploads, either would work fine. YouTube themselves <a href="">recommend MPEG 4 Advanced Simple Protocol in the Xvid or DivX formats</a>. Use the highest quality encoding you can get away with. – CarlF Oct 11 '09 at 0:47
Thank you CarlF, great comment! I always like learning and improving my knowledge. :-) It would have been better to comment on my post though. As it's more likely to be read there. – Deleted Oct 11 '09 at 18:49

Take a look at WinFF, a great GUI frontend to make using FFMpeg easier. You can add all your images in batch and choose the output format. If YouTube is your target, they recommend using H.264, MPEG-2 or MPEG-4 as the format as they work best with their conversion system quality wise, so don't just limit yourself to H.264 as the others will turn out well too and there are more tools available for those formats.

share|improve this answer
mencoder 'mf://*.png' -mf fps=25 -o output.mp4 -ovc lavc -lavcopts vcodec=libx264

Or something like that.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .