Hi all,
I'm working on a project that I'd like some technical input on in order to make it more efficient than I have it. For reference I'm working with PD-Extended on Ubuntu 10.4.
I have a digital camera taking jpeg images at regular (2 or 3 second) intervals which download automatically to a directory on my laptop (connected via usb using gphoto2). I want to load those images into pd using gem for display onscreen as well as some other analysis.
Now the way I have it right now, each time an image is downloaded a hook script converts it to 1 frame of mpeg2 video and gets concatenated to the end of a cumulative mpeg video file. In pd, I load the video with pix_film and display it. This works reasonably well, however, I need to load the same video again in order to get the most recent images and that reload makes video playback stutter (not bad but enough to notice). Does anyone have any suggestions on other ways I could go about this? Some thoughts I have so far:
newest frames? 2) maybe there's a way to play it as if it's a streaming video and just load the newest frames as they come? 3) maybe pix_image is more what I'm looking for? Forget the encoding to video and just load each image individually to a buffer? I think this can be problematic since there will be hundreds of images and loading them all to RAM will get too big for my paltry 2gb.
I'm grateful for any of your suggestions.
Cheers, -martin
Le mardi 24 août 2010 à 19:32 -0400, Martin Eckart a écrit :
Hi all,
I'm working on a project that I'd like some technical input on in order to make it more efficient than I have it. For reference I'm working with PD-Extended on Ubuntu 10.4.
I have a digital camera taking jpeg images at regular (2 or 3 second) intervals which download automatically to a directory on my laptop (connected via usb using gphoto2). I want to load those images into pd using gem for display onscreen as well as some other analysis.
Now the way I have it right now, each time an image is downloaded a hook script converts it to 1 frame of mpeg2 video and gets concatenated to the end of a cumulative mpeg video file. In pd, I load the video with pix_film and display it. This works reasonably well, however, I need to load the same video again in order to get the most recent images and that reload makes video playback stutter (not bad but enough to notice). Does anyone have any suggestions on other ways I could go about this? Some thoughts I have so far:
- maybe pix_film has a 'reload' or similar option to just load the
newest frames? 2) maybe there's a way to play it as if it's a streaming video and just load the newest frames as they come? 3) maybe pix_image is more what I'm looking for? Forget the encoding to video and just load each image individually to a buffer? I think this can be problematic since there will be hundreds of images and loading them all to RAM will get too big for my paltry 2gb.
For me the 3) is the simplest way to achieve what you are looking for. Use [pix_video], [pix_buffer], [pix_buffer_read], [pix_buffer_write]. An example is attached. ++
Jack
I'm grateful for any of your suggestions.
Cheers, -martin
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list