Trying to export a video file and automatically open it and play it back

Apr 26, 2010 at 9:06pm

Trying to export a video file and automatically open it and play it back

Hi, I'm trying to set up a patch that will export a 1 second, 0-keyframe video clip from a webcam, and then open that file and play it back, and continue doing this process indefinitely. I can't get the write.grabfile.mov command to work with more parameters than just the default, such as kframe amounts, and I'm also trying to figure out what the best codec would be to use for this.

Attached is my patch so far. This is the first thing I've ever done in Jitter/Max/MSP

[attachment=130962,449]

Attachments:
  1. Picture_213.png
#50013
Apr 27, 2010 at 9:09pm

few things.
first, when asking questions of the forum, please post the actual patch code, not an image:

http://cycling74.com/forums/topic.php?id=26095

second, if your intention is to record a buffer of video and then process that buffer in your patch, you are probably better off using the jit.matrixset object, instead of trying to write to disk, and immediately read from disk.
search the forum, tutorials, help file, and jitter-examples for information on how to use jit.matrixset.

lastly, the best quicktime codecs for jitter are usually photo-jpeg, apple intermediate, or animation (if you need an alpha channel).

#179524
Apr 27, 2010 at 11:14pm

Thanks for the info! Here’s my patch-

– Pasted Max Patch, click to expand. –

reading about jit.matrixset, it seems like it might work, but can you control the amount of keyframes the video has when using exportmovie?

#179525
Apr 28, 2010 at 10:24pm

i’m not really sure what this kframe message is all about. according to the help file, it’s not supported.

what are you trying to achieve?

#179526
Apr 29, 2010 at 3:40pm

I’m trying to “data-mosh” live footage from a camera in as close to real time as possible. The abstract pixellated effect is a result of dropped keyframes.

#179527
Apr 29, 2010 at 4:50pm

Proper “datamoshing” involves a number of fairly process intensive steps (encoding to DivX, removing I frames, and then saving/reading), which doesn’t really lend itself to realtime work. Even if you were to get something writing and reading properly, your framerates would probably not be anywhere near realtime. Also, you probably wouldn’t be able to get what you really want out of the standard Jitter objects, since they are built on Quicktime, which is a bit too smart for “data-moshing”. It’s possible that someone could build a third-party movie player object that did the job, but the frame calculations required to play back a temporally compressed movie without keyframes will likely grind your patch to a halt in short order.
Another approach might be to think about what specific aesthetic aspects of data-moshing you are attracted to and consider ways to replicate that using realtime-friendly processes.

#179528
Apr 29, 2010 at 10:49pm

I’m pretty familiar with the data-moshing process, but yeah I’m kinda realizing that utilizing compression as part of this process won’t really work, so I am now experimenting with other methods of distorting the image in a somewhat reflexive way. Thanks again for the feedback

#179529

You must be logged in to reply to this topic.