Re: Q: capture video frames
This is indeed off-topic, but I'm re-posting it to the list since I imagine it may be of some interest to many people who subscribe... On Fri, 19 Nov 1999, Kati Gäbler wrote: > Hi, [snip] > Assuming that this has (somehow) been solved, I might then have one > thousand Tiff's or XCF's in a directory named: I don't know how to solve the first part :-) So you're on your own there. > 1) Open image 0001.tif > 2) Scale to 150 × 100 > 3) Save As, 0001.jpg, in other* directory (at 40% Quality) > > Then do the same on 0002.jpg and so on.. I have a few scripts that do things like this. I think that Gimp could theoretically be used in Batch mode for something like this, but that seems to me like swatting flies with a sledgehammer... There is a utility that comes with ImageMagick called 'convert'. (Read the manpage ...). To solve your particular problem... (I assume you're using bash. If not, your mileage may vary.) cd /home/kati/originals for i in *.tif do convert -quality 40 -sample 150x100 $i ../processed/`basename $i .tif`.jpg; done Just type that on the command-line and you should be ready to go. If any Gimp wizards know how to do this with the Gimp, please let me know! I could never find concise documentation, pointers to some would be appreciated, for more complex image processing like applying filters. Hope this is helpful, --glyph
Re: Q: capture video frames
[...] >I would like to grab frames from the video at pre-defined time intervals >of say one frame p/second. Then hopefully, auto-save the images in a >numerical order, at a pre-defined size (i.e. 300 × 200 pixels) as Tiff >or XCF format. Linuxmedialabs make capture cards. http://linuxmedialabs.com/ [...] >Therefore I would like to do the following: >Automatically run through the originals directory, opening image after >image, scaling them, and saving them in another directory, as Jpg's, >something like this: I have a perl script to do that using ImageMagick. Other guys has posted a bash script that does the same. [...] >Anyone knows a magic script, or unix command line that can manage this >kind of multi-image processing, or / and if you have any tips on the >Video --> Tiff or XCF conversion possibilities for Linux would be much >appreciated, anything that saves me a thousand dollars on some useless >Windoze application! You need hardware to capture the images, maybe a Quickcam or something. For medium quality visit the site mentioned above, card LML33 is great for VHS and such things. And IIRC it writes JPGs directly (or via included tools). >I currently have Caldera with following image processing programs: >Image Magic 4.1.7 >XV 3.10 >Gimp 1.02 Get newer version if you want. 1.0.4 estable (w/ GTK+ 1.2), 1.1.11 developer. >Blender 1.36 Hey! Current is 1.70, lot of new things, upgrading is recommended. GSR
Re: Q: capture video frames
On Fri, 19 Nov 1999, Kati Gäbler wrote: > (...) > Anyone knows a magic script, or unix command line that can manage this > kind of multi-image processing, or / and if you have any tips on the > Video --> Tiff or XCF conversion possibilities for Linux would be much > appreciated, anything that saves me a thousand dollars on some useless > Windoze application! I used to do this for a whole folder of JPEGs in one commandline. The tool I used is in NETPBM, a large collection of commandline imageprocessing tool. One is called `pnmscale` and can scale pmn images, read from stdin and writes them to stdout. Your only problem is to read in the TIFFs, convert them to pmn and pipe them to pmnscale. The jpeg tool `cjpeg` can then compress the images. Maybe you can do (untestet braindump): $ for file in `/dir/to/files/*` > do > echo "processing $file" > convert $file /tmp/.img.pnm > cat /tmp/.img.pnm | pnmscale -width 100 | cjpeg -quality 40 > $file"_pre.jpeg" > done Cheers, Martin. __ ___ * _ _ |\/| /\ |_) | ||\ | |_| /\\/| |(_`| |_| | |/--\| \ | || \| | |/--\\/\/ |_ |._)|_ | | mailto:[EMAIL PROTECTED] http://freddy.rz.fh-mannheim.de/~hawlisch
Q: capture video frames
Hi, Could anyone please kindly advice on capturing and multi-processing images. Let me explain the complete picture, just in case anyone can offer some advice on the complete (off-)topic. I'd like to convert a short video to a series of images by somehow conecting up a standard VHS home video recorder to my Linux system. I would like to grab frames from the video at pre-defined time intervals of say one frame p/second. Then hopefully, auto-save the images in a numerical order, at a pre-defined size (i.e. 300 × 200 pixels) as Tiff or XCF format. 0001.tif 0002.tif 0003.tif etc .. (up to a thousand images). Assuming that this has (somehow) been solved, I might then have one thousand Tiff's or XCF's in a directory named: /home/kati/originals/ All images in this directory will from now on serve as originals for whenever I need to modify specific image frames. The end result should however be Jpg format, the reason is that I will create a short Jpeg web animation using image replacement Javascript (the browser calling the images from the server one after another). Therefore I would like to do the following: Automatically run through the originals directory, opening image after image, scaling them, and saving them in another directory, as Jpg's, something like this: 1) Open image 0001.tif 2) Scale to 150 × 100 3) Save As, 0001.jpg, in other* directory (at 40% Quality) Then do the same on 0002.jpg and so on.. (whilst I'm doing something more relaxing like cooking some pasta..). ..until the last image in the originals directory has been processed. Hopefully I can now find all the newly created content, nicely stacked in the other* directory. /home/kati/shortmovie/ 0001.jpg 0002.jpg 0003.jpg (etc..).. Anyone knows a magic script, or unix command line that can manage this kind of multi-image processing, or / and if you have any tips on the Video --> Tiff or XCF conversion possibilities for Linux would be much appreciated, anything that saves me a thousand dollars on some useless Windoze application! Thanks, Kati I currently have Caldera with following image processing programs: Image Magic 4.1.7 XV 3.10 Gimp 1.02 Blender 1.36