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
first, when asking questions of the forum, please post the actual patch code, not an image:
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).
Thanks for the info! Here’s my patch-
----------begin_max5_patcher---------- 1215.3oc2YkzabaCE97L+JHD5gVfIthaZomRiMJZN0hFzjCAAFZFQKy.sEIJ a2Fj+6kKRimYxrncf5CVFjThy26iO98d7wutbg05rmXkVfeA7QvhEec4hE5t Tcrnt8Bqjfm1DGTpeMqzpj0rBqUlgtKKUTx+WlZHH5J65tkuDOMlIzeB74Ny pDM8hp6MOPr4ddZzsErMBCP7wxIBPMOsUOQxmfOU+ElIQ7O4LyqawSEVq.Vq CRir19V7PMbyV+4Wg82EtoAI5Oz5WK3AwVpA91xkpGqZIEjvJKChXMSpf8jF 3Vg2Ec6lr3rhjrPVWXHzQYH3YXHhhU7Q5mZFB5cNF53zh23RKorGkS62wJ4E 50mg5uXeZ1vwApcRvZOFL467X1wnQtyiuPVNKcRcAHtd50cp1I.61Sm.DYd3 iMwYkS6dBJzvAFECreeID73RHelKtJ+QdZX1iVmyaWtIgUj2K8Rj1imB0lL1 1Qa4tNm0zWcJyG0Wi7t7xnJ9jFX.o2f6B0a28Lqy8zLgyh1GWLFgJOqSud6O hnWzQtWNX4woC6YgNDfMwrfokQbflLF7zDCAeYFwfoiQKP+YJBISFsHDDjq9 2z5uXTGpYGeud5u.G4TGpRXoUWvvUXpNS0sP53JoBVhYZeSEOV7JdJf+Ndz8 BqixV3yDi0QSPXjlsf1sOWzSJ7.mo7O3o4UBvO.m1bPbnFMX6mSXuGgbgNyC m7PH6A9F1TyJXrwqgp2pYbg5CqPmGVIhIzNKw7Rwz5s34tMyjgvKjWLwpHFO kwIVE9+CRxRS3l2e8e9W+A32uA7iPaOaN09mTpkqTONbLmiOlKxN+LCgn+79 SJ387PV11Nd6au4ZvuwKXeP92Ai82u6Mld.Wqnh5Q205ZWniFQfwLzAZ1DDT JkSudfq9bKPeidPeOAKD9RKIMLx3sX3mdmjl2Kii3zvFDuAcDG2YgMJjfgAZ 19.5UfUXm0ZHlR.ZpGHDQaAEcNgFmYgpT0L3KhqhJBVCjp1xzCrAu9AUoSAH vqqR4eohAfSa8DpUmqKxLtEhzRTeaRfnf+zIouQNuMQVTTLyZT1K0rIxuwPa SLoiYijQzQHgIJx.nIMVChZpYjioRYW1vO8kIztUW8mZEySO71UzfS0+9DUY VUwlle7l5PBdFfgrRYZ5ABdV5NuDcu24ddXHKc2hkmvCyyjqg0XfhbthJ82g lLMwvss.e5nqmsErpaX4hfUceCcAsCDSRULoPx4gj51.5BjHTphxPlBQ53Zu s0.Aq5PMWj.UmStSn0ud41DP.YJLroElnCjRTEMdnXG1Fr2QWUhGdGrCMWIX C1g5wv9NCF6HTKvNBN6NtvKQm9cjNsQFWUc.OG4pdSqY.rppK2evRQvwBrG. jSPsdcUT0fOO3v2I0FYTXG0rpWrwFQehq61VCEsdS.ZGJlbm.czghIzDnONT L0lrKN.3WdeKo12xtIBSSqQPj4hfE2MvhIFMPro1aFvpaMCf0smXEZpozysF HV8l.ufABo1rAddSjrMolgmUDQaQP24UiaBNrBxw1jAHYuCqPFdV.jwGrp61 XRNYUqRttu4V6tGXcmmSwP62gXpqVQMXQCOnBsMY92QsOy4Bw3CQmrw2V9e. +05lm -----------end_max5_patcher-----------
reading about jit.matrixset, it seems like it might work, but can you control the amount of keyframes the video has when using exportmovie?
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?
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.
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.
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