jit.qt.record and write $1.mov message

b00kwheat's icon

Hello,

Does anyone know how to or could point me to the correct tutorial on how to specify a folder location of where you want a file to be written using the [jit.qt.record] object and write message?

Max Patch
Copy patch and select New From Clipboard in Max.

regards

seejayjames's icon

look at "path" message to [thispatcher], or the [sprintf] help file for filepath formatting. You can't use $1 inside a string in a message, it's for individual values. [sprintf] will let you format filepaths and a whole lot more, and deals with spaces etc...

b00kwheat's icon

Thanks for the response seejayjames. Will have a look at those objects.

Max Patch
Copy patch and select New From Clipboard in Max.

I have used this set up in a previous project to record 10 seconds and write the movie file to disk and later autoread the files. I'm trying to create an auto-mated system at the moment where the files capture video automatically and playback automatically using umenu.

b00kwheat's icon

here's a screen grab just in case. :-)

b00kwheat's icon

my apologies, let's try this again. my first time to try uploading here.

379.patch.tiff
tiff
seejayjames's icon

that's cool! though do have a look at [sprintf], it will let you do whatever naming system you want, like having timestamps with [date] for your files:

my_movie_05-10-2010_recording_1.mov

where that "1" and the date couldn't be created via $1 $2 etc., it has to be in [sprintf] which gets around the typical text/message conventions. It's an extremely handy object for all sorts of stuff, but getting filepath stuff working takes some fiddling. Especially take note of the "symout" argument which can manage any spaces in your path, like the pesky "Documents and Settings" if you're on Windows. Same goes for any symbols with spaces, use quotes to keep it all together so your receiving objects don't read your messages as multiple pieces.

b00kwheat's icon

Hi seejayjames,
I took a look at those objects you suggested but still can't figure out how to set/specify the folder path to where I want the file to be saved to. Perhaps it's something simple I'm just overlooking. Would you mind posting a sample patch on how to do this?
I'm programming in OS X and creating a standalone app to run on Win XP.

cheers!

seejayjames's icon

Can't for a few days, maybe someone else will chime in? :)

or try:

sprintf symout %s%s
|
prepend save (or open, write, read, etc.)
|
your object

first %s is the filepath, second is the filename. No space between them in the sprintf.

b00kwheat's icon

anyone out there to chime in, please? -:)

b00kwheat's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Ok, I found this in the forums and modified for movie files. This patch appears to able to set the patch using the path message and thispatcher object and create a unique file name.
My biggest confusion is how to incorporate this in to my current patch above using the jit.qt.record and having it playback movie files randomly?

b00kwheat's icon

Ok, some progress made. I'm able to patch sprintf in to jit.qt.record and have it write a file. but now the file size is huge with no compression.

my next question is how to set the FPS, codec and quality?
Normally, I would use the message write $1.mov 30. jpeg normal in to jit.qt.record.

UPDATE:

Max Patch
Copy patch and select New From Clipboard in Max.

solution was using append. -:)