Click here to Skip to main content
15,938,218 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Algorithm to convert a sequence of images to a video file?

1 solution

There is no such single algorithm.

There is a great number of different media container formats, see[^]. Now, there is a great number of video compression algorithms and standards, see[^]. Then, most of the media containers can, well, contain, some big subset of different video compression formats, so the number of possible "video file formats" is really big, so nobody even considers this set; everyone works with the combination. Uncompressed video is also possible and is considered as one of the possible compression formats. Finally there are piece of software called codecs, each of them can work with some sub-set of the format, see[^]. Don't forget that video files also include audio, and audio is synchronized with video (which is one of the problems, in fact). This also adds to a great number of options.

For a nearly comprehensive set of codec capabilities you can download a freeware product called K-Lite Codec Pack, see[^],[^].

But this is only for Windows, and you did not tag your platform. Shame is on you. Don't tell us "Java", this is not enough. (However, why not enough? There are also pure Java codecs, for JMF, see[^]. About JMF (Java Media Framework) see[^]).

For different platforms like Linux, there are also different codecs packs. See[^].

To close this discussion: you can more or less easily find an application which will solve this problem for you. I did what you want to do using VirtualDub,[^], VirtualDub, GNU License. It is only for Windows and operates only on AVI files ([^]).

However, if you still want to do it by yourself using Java, first select the standards you want to implement, and go ahead, find the documentation and implement it. My mission was to warn you about the scale of the problem and list what's involved. Maybe the easiest way would be creating your own format and implementing it. Nobody else would be able to use it though, but I'm not sure this is one of your requirements. :-)

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900