Turn multiple PNG images into a H264 encoded 1280x720 animation for YouTube HD upload

4

3

I have lots of PNG images:

pic1.png
pic2.png
pic3.png
...

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. :-)

Deleted

Posted 2009-10-10T23:02:45.447

Reputation: 3 548

Answers

5

  • 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.

Jonathan Prior

Posted 2009-10-10T23:02:45.447

Reputation: 601

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="http://www.youtube.com/t/howto_makevideo">recommend MPEG 4 Advanced Simple Protocol in the Xvid or DivX formats</a>.

Use the highest quality encoding you can get away with. – CarlF – 2009-10-11T00:47:04.567

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 – 2009-10-11T18:49:31.767

3

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.

John T

Posted 2009-10-10T23:02:45.447

Reputation: 149 037

Dead link. New home here? https://www.biggmatt.com/winff/

– endolith – 2018-10-30T00:41:14.120

3

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

Or something like that.

wfaulk

Posted 2009-10-10T23:02:45.447

Reputation: 5 692

0

You can use ImageMagick:

convert -quality 100 *.png outputfile.mpeg

but the quality is not very good. The video format is "MPEG-1/2 Video (mpgv)"

http://www.andrewnoske.com/wiki/Convert_an_image_sequence_to_a_movie

http://jupiter.ethz.ch/~pjt/makingMovies.html

endolith

Posted 2009-10-10T23:02:45.447

Reputation: 6 626