From help-request at octave dot org Sat Oct 1 11:48:12 2005 Subject: Re: software for manipulating AVI files From: Stefan van der Walt To: "John W. Eaton" Cc: octave help mailing list Date: Sat, 1 Oct 2005 18:45:43 +0200 On Thu, Sep 29, 2005 at 12:36:37PM -0400, John W. Eaton wrote: > Does anyone here know of any good free software (GPL compatible > license required) for manipulating AVI files? I'd like to be able to > implement the at least the following AVI functions in Octave: > > addframe Add frame to AVI file > avifile Create new AVI file > aviinfo Return information about AVI file > aviread Read AVI file > close Close AVI file My previous email pointed to the FFMpeg wrapper at http://www.dsp.sun.ac.za/~stefan, but didn't give any further detail. For those interested, here are the docstrings of the functions mentioned above. -- Loadable Function: addframe (AVI, IMAGE) Add a frame to an AVI file. AVI is created using `avifile'. IMAGE must be of class `double' and scaled to be in [0-1]. See also: avifile, aviread, aviinfo. -- Loadable Function: F = avifile (FILENAME, [PARAMETER, VALUE, ...]) -- Loadable Function: avifile ("codecs") Create an AVI-format video file. The supported parameters are `"compression"' or `"codec"' The type of encoder used (default: `"msmpeg4v2"') `"fps"' Encoding frame rate per second (default: `25.0') `"gop"' Group-of-pictures - the number of frames after which a keyframe is inserted (default: `10') `"bitrate"' Encoding bitrate (default: `400000') To see a list of the available codecs, do `avifile("codecs")'. See also: addframe, aviinfo, aviread. -- Loadable Function: INFO = aviinfo (FILENAME) Return the properties of an AVI file. See also: avifile, aviread, addframe. -- Loadable Function: IMAGE = aviread (FILENAME, N) Load frame N from the AVI file FILENAME. See also: avifile, aviinfo, addframe. Here is an example snippet that utilises the wrapper: # ---------------------------------------------- # Open the AVI file m = avifile("test.avi", "codec", "msmpeg4v2") # Generate and add frames for i = 1:100 I = zeros(100,100); I(i,:) = i; I(:,i) = 200-i; addframe(m, I/255) printf(".") endfor printf("\n") # Close the file clear m # ---------------------------------------------- Regards Stéfan ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------