Quartz Crystal / get parameters (dimensions, fps, duration) from published outputs

Quartz Crystal lets me enter values for published inputs of the 'root' patch, which is great. I would like to be able to set output parameters (such as the output dimensions, fps and duration) to values that are published outputs of the root patch.

Use case:

I am using Quartz Crystal to run a complex set of Core Image kernels on a series of (large!) mov files. I can select the mov file to use using a published input, it would be great if the qc patch could communicate back the duration of the selected movie, so the composition gets rendered at the correct duration (and fps & dimensions).

gtoledo3's picture
Re: Quartz Crystal / get parameters (dimensions, fps, ...

ahoeben wrote:
Quartz Crystal lets me enter values for published inputs of the 'root' patch, which is great. I would like to be able to set output parameters (such as the output dimensions, fps and duration) to values that are published outputs of the root patch.

Use case:

I am using Quartz Crystal to run a complex set of Core Image kernels on a series of (large!) mov files. I can select the mov file to use using a published input, it would be great if the qc patch could communicate back the duration of the selected movie, so the composition gets rendered at the correct duration (and fps & dimensions).

Well, one problem is that you are asking for something that cannot actually be published outputs... for example, the duration of a movie. You can't publish that as an output. It's not in the QC paradigm. You could hook that value up to an image in string, then to a sprite, then publish the enable on the sprite. That would allow you to monitor things like that, then flick off the sprites, then hit render.

You could do something similar with your dimensions, then just use the "custom" setting to set your render size.

Also "correct fps and dimensions" is a VERY hairy term to use in this scenario. One man's correct is another's malfunction, etc. There are times when you may want to run at different fps or dimensions than whatever the orig movie file is.

If you are simply looking for a good work flow, I encourage setting up a template like I described... hook up the values you want to "see" in your QCrystal preview to image in string, then to sprites, then publish the sprite enables so you can turn them off after you make the necessary adjustments, and before you hit render.

I usually just check the file manually, and set accordingly, but what I'm describing works, and I've done it many times.

Hopefully that make sense to you, let me know if it doesn't.

cwright's picture
Re: Quartz Crystal / get parameters (dimensions, fps, ...

QuickTime movies don't have a "correct" framerate -- each frame has a potentially unique duration.

Dimension-wise, it's not really practical -- in order to render a frame, dimensions have to be set, and you can't change dimensions on the fly (well, you sorta can, but it's icky and will lead to more problems).

Sounds like you're better off writing a thin tool that parses enough QT movie information to give you size/duration info, and then feed that to QuartzCrystal. I personally have zero interest in making more provisions for QuickTime's horrifically broken API (most of which is hopefully getting tossed out the window in the next 6-9 months with Snow Leopard anyway).

ahoeben's picture
Re: Quartz Crystal / get parameters (dimensions, fps, ...

gtoledo3 wrote:
Well, one problem is that you are asking for something that cannot actually be published outputs... for example, the duration of a movie. You can't publish that as an output.
Erm... Sure I can. The Movie Loader patch has a Movie Duration output, which can be published. It has an image output, and I can attach an Image Dimensions patch to that and publish those outputs. I am not talking about the duration/size/fps of the composition as a whole.

gtoledo3 wrote:
Also "correct fps and dimensions" is a VERY hairy term to use in this scenario. One man's correct is another's malfunction, etc.
I am not saying that Quartz Crystal should not have the options that it has now to manually set the FPS/dimensions/duration. I was just suggesting that it could be useful, in some workflows (like mine ;-) ), to be able to get the parameters from published outputs.

cwright wrote:
I personally have zero interest in making more provisions for QuickTime's horrifically broken API (most of which is hopefully getting tossed out the window in the next 6-9 months with Snow Leopard anyway).
Good point.