November 6, 2014 at 8:07 am #58813
I’m wondering if there’s any possibility of something like Syphon Recorder being built as a Max object. I’d like to be able to make a long-duration (minimum one hour, say) video buffer, and it seems to me that reading from Hap-encoded video files would be the most efficient way of doing it. I’d like to be able to automatically record the output of GL-based patches into Hap files of an arbitrary length, covering an arbitrary period of time – e.g., set the total buffer length to an hour and the file/chunk size to five minutes. Having something like Syphon Recorder available as a Max object would make it possible to build the rest of the scheduling and file management logic in Max.
Thanks!November 6, 2014 at 10:22 am #58814vadeKeymaster
The whole point of Syphon is that you don’t need to embed functionality into a host app?
Why not run a Syphon Server in your Max Patch and record it with Recorder?November 6, 2014 at 10:23 am #58815vadeKeymaster
Additionally you could BUILD a max patch that records arbitrary Syphon Streams using jit.qt.record and a Syphon Client.November 6, 2014 at 10:36 am #58816
My issue with your first suggestion (sending output from Max to Syphon Recorder) is that I’d like to stop and start recording automatically. I’d like to be able to set the maximum file size of the clips so that it doesn’t take too long to load a given clip into jit.gl.hap (and to be able to adjust this maximum file size to optimize for a given hardware config and patch). Another reason for this chunking approach is that, as I understand it, Hap clips can’t be read into jit.gl.hap until they’re closed (i.e., until one stops recording in Syphon Recorder). For the application I have in mind, it would be good to be able to scrub through a given chunk of recorded video as soon as possible, and to switch between chunks as necessary.
I’m not sure if it clarifies what I want to do, but essentially I’d like to have something like a long-duration loop recording system, similar to what you might have in a traditional video surveillance rig. I’d like to be able to pull up and scrub through any region of video that happened within the past half hour. I realize that there are some likely technical problems with the chunking solution I’m proposing (e.g. missing video during the time it takes to close one file and start writing to the next, as well as the inability to scrub smoothly through a region of interest that spans multiple files), but it’s a point of departure – would be happy to hear alternate suggestions.
I could certainly build a patch routing Syphon Streams to jit.qt.record, but I was under the impression that since jit.qt.record is a CPU-side object this would be more computationally expensive than whatever method Syphon Recorder is using (even using some of your optimization methods, like switching to UYVY for the readback operation). Do I understand you correctly in saying that recording Hap via jit.qt.record would be equally efficient to using Syphon Recorder, though?
Thanks for your time, Vade – I’m heavily indebted to you for making much of my work possible.November 6, 2014 at 10:59 am #58817
Another thought – is there any possibility of adding OSC control to Syphon Recorder, so that one could send out start and stop messages from within Max? Basically I’m just hoping to avoid some sort of Automator-based mouse-movement-recording solution – “go over here, click start, wait five minutes, go over here, click stop, click start right away, wait five minutes, go over here, click stop…” enh. 😀
(edit – I see that OSC control came up back in 2011, but can’t find any other news about the idea… apologies if I’m missing something)
November 6, 2014 at 11:11 am #58819bangnoiseKeymaster
- This reply was modified 6 years, 4 months ago by syrinx.
I’m with vade – build it in Max and see if that works well enough for you – don’t discard the simple solution just because a more complicated one exists… and if you’re not sure if something will work, TRY IT.
Using movies if you want a video sampler is never going to be perfect – yes it will enable otherwise impossible durations but, as you note, you’ll never be able to scrub to and from the present, as the currently recording movie will be unplayable.
If you want to automate it, Syphon Recorder responds to cmd-alt-R to start/stop recording even when it isn’t frontmost, so if you can generate that keystroke (other threads here describe ways to do that, or perhaps there’s a Max object to generate keystrokes?) then you can automate Recorder. I have done custom OSC-enabled builds for people before – get in touch if that’s of interest, but do try to build your own solution first – it might work better.November 6, 2014 at 11:18 am #58823
Thanks for the rapid response, bangnoise! Yep, I just saw mention of the cmd-alt-R-from-anywhere solution in the other thread – sorry, I should have RTFM. Currently looking into options for generating keypresses in Max (options found so far on maxobjects.com are either deprecated/AWOL or Windows only) – will post a compressed patcher here to sum up when I find a working solution.
The implementation for this project isn’t a sampler (in the instrument sense) but an installation, so truly rapid scrubbing may not be necessary. In the end, rather than a continuous loop, it may be the case that recording is only triggered by presence detection, resulting in auto-recording a library of clips when there’s activity in the space. In any case, the keyboard shortcut solution seems like it should do it.
When I’m on a less garbage-y computer I’ll try a shootout between jit.qt.record and Syphon Recorder and post results.
Thanks again for all your guidance and your superlative software! I missed you guys at the SAT in Montreal this Spring, but next time you’re up here, feel free to collect the beer I owe you…November 6, 2014 at 12:18 pm #58824
OK, here’s a patch to automate the key combination so that it can be triggered by a bang (requires Masayuki Akamatsu’s aka.keyboard).
Anyone trying this, make sure you have Syphon Recorder open. Watch out, it’ll generate a lot of clips quickly (defaults to one every 10 seconds) and if you have Syphon Recorder set to auto open each new clip Quicktime can start bogging things down PDQ.
----------begin_max5_patcher---------- 1926.3oc4Z88iihiD94z+UXwdOLmTlDvDHvrOMRqzIc5dZGo6k8V0xAbm3oA aVaS2Suq18u8y+.HPBPSRmzs5YyCIAarcUeU4upnL+wMyb1v9FV3.9D3W.yl 8G2LaloIcCyptdlSN5aIYHg41bxwBAZK1YtsOI9aRS6n6QKtG+zFFhmV2YAG KvTIRRXza43Docg7CVsvcNvOLP+ia0WfesZTzxbBMCKMqGrpwMaSXYLNzNCp ae8p.Oy3f1+4omFuVSS0HpGPTn5y54C7u8CiUJUqs7oBrcjNNsELauFIyqVI QxjcD511JnmQy78M515PinE1ZQHoFLis4qebUXMZcGiJonby557eJSHoHv+h inoc.6NJkA4fwwdQ8..546NTBtMLpaSP9cSadpwqa8Ou4F8WyegN.e4ohcLJ 3mwILdJlO+YbBfAVLJD9cpS.D11IHNXTmff2YNAT7iJ49HefBPFgduvoOine u.n6v.nmuE.WagNW6Ow8ifAQ8hf+WLOEQQNCn4UMuijlhoGYOw7JDnBBTimj ge.yEJW4V28LGTQQqlm0ZHZb6qVaU37llHTaSdMMwwOPpGueSqHtBTjJDoja 0muEE5X6TYqtodnMtbtQZLJz23FrJbsAwhh1CY5cDYrj6wos.ek+dAlRns2o 1o6T7cnxL4scfO3hd6u1Yq2NarKelSPYN02xVNIkQ0BQmQpatd4TtCV6ePak wbGTTQOCVnziRwFDWiqaxZuAP4vxXYc6pwTp76QTRNRhkDqvBcalTRdAmPkc VHLEolichDNKKqyTY64gd5IUYsSvORRk6LyUanTc6jhZSfSCFkR1hExtsIQa EcaoS371tgs2P2o8QY26t6dmTV7okKe7wGWPP4HwBTxhuVr7uTg9Wpljk+f5 O2dPN.lYPQJnhJTZANXqN5ik+7X5eAr8OCi+vr9Cx7GYbUCcsT9UgANXAayc 42Frd1H.GyjAsb3yp4wq3Gtdt.BSr9EO35BWPn2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j+9WIx+J59pH3QQGdXFcf6UuktgJBRNajsl WZ+Pu1zVqiF0OD9p.LR11sY3SOP2Yq6A0J8Hpt2nAwNCsbSoTxnmlV9xLwwS POictfU53d7SorGof.Unvl+GY9uRlL+VVT2q5egQmlG+YCEUmMfOLxRGzOVD 9VRCz2qe5KL+21klIxeTu8WjlalwtGLhEHNrDoUvwQkFE1ohmCTVTcNT.ula 5nRhdb4POxvLU4wKdJxS3yHOGdvFdlR7CMO4fhue+U6WnKlFne.+ogntSWCh rmQwppyjY+UWAEXU3DT.yQu.6QA75WA7smxhu8Ub.561b00PCBlpF3McM.5a 0fpi8MZcyUWCMX0T0.2oqAUtOU1f1WcEz.unInAGrW4ZRrLsskvWOhtorKK7 zXIBrDaqqKKa8EWAy6jooOAwuRhglp8Er+hqg24j8Fdc7NOXo5Wdhe0Dm3Kf u4kSZlxNkykHwl.0AuC9ZA4f289Cdu6O9cten22d057m27+QwZqcF -----------end_max5_patcher-----------November 7, 2014 at 4:44 am #58827bangnoiseKeymaster
Glad you got something working – and thanks for sharing.
- You must be logged in to reply to this topic.