[lug] individual frames from AVI file?

Ed Hill ed at eh3.com
Tue Jun 8 07:18:35 MDT 2004


On Tue, 2004-06-08 at 04:20, Tkil wrote:
> Stupid question time.
> 
> I recently got a Canon PowerShot S400 "Digital Elph" camera.  It has
> two movie modes, either 320x240 or 640x480, both at 15 frames per
> second.  I believe the output format is MJPEG, in an AVI container:
> 
> | $ tcprobe -i 0066.avi 
> | [tcprobe] RIFF data, AVI video
> | [avilib] V: 15.000 fps, codec=MJPG, frames=2700, width=320, height=240
> | [avilib] A: 11024 Hz, format=0x01, bits=8, channels=1, bitrate=88 kbps,
> | [avilib]    180 chunks, 1984320 bytes, CBR
> | [tcprobe] summary for 0066.avi, (*) = not default, 0 = not detected
> | import frame size: -g 320x240 [720x576] (*)
> |        frame rate: -f 15.000 [25.000] frc=0 (*)
> |       audio track: -a 0 [0] -e 11024,8,1 [48000,16,2] -n 0x1 [0x2000] (*)
> |                    bitrate=88 kbps
> |            length: 2700 frames, frame_time=66 msec, duration=0:02:59.998
> 
> What tools can I use to decompose these streams into individual
> frames?  I have found various references to using the avi* and tc*
> programs, but the closest I've gotten is having it biff at the
> non-standard frame rate.

I do this frequently for image processing in the lab.  See "man
ImageMagick" where the command will be:

  convert -deconstruct file.avi frame.jpg


> My eventual goal is to extract about 2 seconds of video at about the
> 2:50 mark as individual frames (either JPEG or PNG or any raster
> format, really); do some smoothing, posterization, quantization, then
> rebuilding them into a small animated GIF.

There are multiple was to do re-assembly including the ImageMagick
"-coalesce" option.

Good luck!
Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20040608/d2bdbe9b/attachment.pgp>


More information about the LUG mailing list