SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

JPEGTOAVI
by Phillip Bruce

I. Introduction

In the tradition of the Unix computing philosophy, here is yet another operator that does one simple task, namely the creation of an AVI/MJPEG file given a list of JPEG/JFIF files.

I had some difficulty in performing this extremely simple task in Linux, mostly because it is so simple and all of the existing code to do it lie at the bottom of complicated and more ambitious projects--e.g. xawtv, avifile, etc. I then had to waste time reading M$ docs and xawtv source to find out how to do it.

II. Installation

The code is pretty basic, and so it should be pretty easy to install: "make all" compiles the program, "make install" installs it. If you want the files to reside in some directory besides /usr/local/bin and /usr/local/man, edit "Makefile".

II. Usage

There are three basic modes of operation:

  1. jpegtoavi per_usec width height [img1 ... imgN]
  2. jpegtoavi -f fps width height [img1 ... imgN]
  3. jpegtoavi -fsz [img1 ... imgN]

The first two print an AVI to stdout using the width and height parameters and the images named in chronological order. (No checks are made on the validity of the JPEG/JFIFs or their dimensions.) The first mode specifies the frame rate in terms of the period in microseconds for each frame, whereas the second specifies frames per second.

The third mode was added to give size hints during the transfer of AVIs without the use of a temporary file. Instead of generating the AVI it outputs the size in bytes that of the AVI that could have been generated.

The names of the JPEG/JFIF files may either be passed via stdin or via an argument list. It should be pointed out that for large lists, it is generally safer to pass the names through stdin. In either case, the order in which the files are named is the order in which their corresponding frames shall occur in the resulting AVI.

III. Contact, Bug Reports, and Suggestions

Send them to me at dI77IHd@yahoo.com


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.