Javier GarcÃa wrote:
Thanks IOhannes, but
[bng][bng][bng] [bng][bng][bng] [bng][bng][bng]
connect each [bng] to another messagebox holding the filename of the video you want to trigger; then connect all of them to:
| [symbol] | [open $1( | [pix_film]
anyway to see the frame-icon of the video?
no. Gem outputs to a special "gem-window" and not to a pd-canvas. there are no plans to change this (at least not in a a way you intend it)
a solution for you would be: generate thumbnails from your videos via an off-pd script (choose your favourite tool) use one of the tcl/tk image-loading externals (don't ask me for a specific library; i don't know it, but most likely there are several of them (iemgui being one of them; no idea where to get a compiled version for osx (and whether it works on osx at all))) to load the thumbnails into your patch; depending on the object it might react on clicks or you have to put a [bng] below it...
of course this is rather non-dynamic.
btw: always reply to the pd-list and not just to me in private.
mfga.sdr .IOhannes
and for windows this is also the solution?
From: IOhannes m zmoelnig zmoelnig@iem.at To: Javier GarcÃa tirengarfio@hotmail.com, pd-list pd-list@iem.at Subject: Re: [PD] Make a grid for choosing videos. How Date: Mon, 04 Sep 2006 12:37:08 +0200
Javier GarcÃa wrote:
Thanks IOhannes, but
[bng][bng][bng] [bng][bng][bng] [bng][bng][bng]
connect each [bng] to another messagebox holding the filename of the video you want to trigger; then connect all of them to:
| [symbol] | [open $1( | [pix_film]
anyway to see the frame-icon of the video?
no. Gem outputs to a special "gem-window" and not to a pd-canvas. there are no plans to change this (at least not in a a way you intend it)
a solution for you would be: generate thumbnails from your videos via an off-pd script (choose your favourite tool) use one of the tcl/tk image-loading externals (don't ask me for a specific library; i don't know it, but most likely there are several of them (iemgui being one of them; no idea where to get a compiled version for osx (and whether it works on osx at all))) to load the thumbnails into your patch; depending on the object it might react on clicks or you have to put a [bng] below it...
of course this is rather non-dynamic.
btw: always reply to the pd-list and not just to me in private.
mfga.sdr .IOhannes
Javier GarcÃa wrote:
and for windows this is also the solution?
with Gem it is (and also for linux and freeBSD ;-))
afaik, the only video-lib for Pd that renders into the patch is framestein (and afaik this is dead for several years) and this would be required for what you want to do.
mfg.asdr. IOhannes
On Mon, 4 Sep 2006, IOhannes m zmoelnig wrote:
Javier García wrote:
and for windows this is also the solution?
with Gem it is (and also for linux and freeBSD ;-)) afaik, the only video-lib for Pd that renders into the patch is framestein (and afaik this is dead for several years) and this would be required for what you want to do.
Hey, GridFlow supports it too. See this:
http://gridflow.ca/gallery/peephole3.png
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
Hi IOhannes,
IOhannes m zmoelnig wrote:
a solution for you would be: generate thumbnails from your videos via an off-pd script (choose your favourite tool) use one of the tcl/tk image-loading externals (don't ask me for a specific library; i don't know it, but most likely there are several of them (iemgui being one of them; no idea where to get a compiled version for osx (and whether it works on osx at all))) to load the thumbnails into your patch; depending on the object it might react on clicks or you have to put a [bng] below it...
of course this is rather non-dynamic.
It could be dynamic if you used [shell] to call "your favorite tool" to generate a thumbnail and then load it with toxy or whatever.
Can anyone recommend a Linux/Unix/OSX script for a "favorite tool" that could dynamically generate thumbnails?
best, d.
derek holzer wrote:
Can anyone recommend a Linux/Unix/OSX script for a "favorite tool" that could dynamically generate thumbnails?
ImageMagick provides 'convert':
convert -resize 160x120 image.jpg image-thumb.png
Note that this preserves aspect ratio, which may or may not be what you want (I haven't worked out how to stretch an image to a precise size with convert yet, if someone knows then please tell me!).
Claude Heiland-Allen wrote:
derek holzer wrote:
Can anyone recommend a Linux/Unix/OSX script for a "favorite tool" that could dynamically generate thumbnails?
ImageMagick provides 'convert':
convert -resize 160x120 image.jpg image-thumb.png
Excellent. Thanks. Maybe I'll cook something up with this for my next workshop.
d.
Hallo, Claude Heiland-Allen hat gesagt: // Claude Heiland-Allen wrote:
derek holzer wrote:
Can anyone recommend a Linux/Unix/OSX script for a "favorite tool" that could dynamically generate thumbnails?
ImageMagick provides 'convert':
convert -resize 160x120 image.jpg image-thumb.png
Note that this preserves aspect ratio, which may or may not be what you want (I haven't worked out how to stretch an image to a precise size with convert yet, if someone knows then please tell me!).
You could also use Python's Image module (PIL) to do thumbnails from within Pd, however thumbnails from videos are a different issue, I guess.
Frank Barknecht _ ______footils.org_ __goto10.org__
ImageMagick provides 'convert':
convert -resize 160x120 image.jpg image-thumb.png
Note that this preserves aspect ratio, which may or may not be what you want (I haven't worked out how to stretch an image to a precise size with convert yet, if someone knows then please tell me!).
You could also use Python's Image module (PIL) to do thumbnails from within Pd, however thumbnails from videos are a different issue, I guess.
for video, you could probably use pymedia to produce thumbnails.
http://pymedia.org/
or just use mplayer to render out a frame.
but, just fyi, you will probably want to use imagemagick's convert for resizing images for thumbnails. It has a few options for it's resampling algo, but I find the default one to be better than GD's or PIL. It's also much slower.
below is a python script for converting images. could be easily modified to use mplayer to render out a frame and resize it using convert.
-august.
from glob import glob import os import Image #PIL
def doConvert(w,h, item, folder, force = False ): path = folder + "/" + item # make a folder to hold all the thumbnails if ( os.path.exists(path) ): print item + " exists in folder: " + folder if (force): print "forcing convert for " + folder + "/" + item command = "convert " + item + " -resize " + str(w) + 'x' + str(h) + " " + folder + "/" + item print command os.system( command ) else: command = "convert " + item + " -resize " + str(w) + 'x' + str(h) + " " + folder + "/" + item print command os.system( command )
def doImage(item, force = False): image = Image.open(item) x,y = image.size msize =648.0 #864 ssize =162.0 #216
mw,mh=10,10
sw,sh=10,10
if (x > y):
sratio = x/ssize
else :
sratio = y/ssize
sw = int( x/sratio )
sh = int( y/sratio )
doConvert(sw,sh,item, "thumbnails", force)
def getList(): return glob("*.jpg") + glob("*.JPG")
# go throught the current directory looking for jpegs and make thumnails for item in jpglist: doImage(item, force)
derek holzer wrote:
Can anyone recommend a Linux/Unix/OSX script for a "favorite tool" that could dynamically generate thumbnails?
Ooops, ignore my other reply to this, forgot we were talking about video files... not enough coffee...
If you upload a video to archive.org - it generates thumbnails. If you look at the log while it is deriving, it tells you what commands it is running. I'll make a note to check the exact command line next time I upload, but in the meantime I'm pretty sure it's an mplayer command that outputs one jpeg image every 100 frames or so, scaled to a small size.