Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Trying to build an expression that will output to a file outside AE..

  • Trying to build an expression that will output to a file outside AE..

    Posted by David Field on June 18, 2014 at 6:12 am

    Hey Y’all, I’m trying to take a video and put it on my own fairly large tri-colour LED array.

    To do this, i need to get a pixel point in the video and grab its RGB values (easy enough) but instead of outputting the data that sampleImage() gets as a layer in AE and placing it in video, I need sampleImage()to spit out the values as a text file outside of After Effects.

    The ultimate idea is to take in a video and spit out a series of 2D arrays as a text file so I can load them into an Arduino (imagine an array of frames, where each frame is a 2D array of RGB values mapped to the spacing and position of the LED array’s pixels.)

    Any thoughts? Hopefully without resorting to the AE SDK?

    Kevin Camp replied 12 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 18, 2014 at 6:57 am

    Well, not the SDK, but maybe the Scripting Guide (and the JavaScript Tools Guide). You could use a script to apply, and harvest the result of your sampleImage() expessions. Scripting has a fairly robust file I/O implementation (expressions do not), so writing a text file would be pretty straightforward. Sampling all the pixels of a video might take a while though…

    Dan

  • Kevin Camp

    June 19, 2014 at 6:12 pm

    if writing a simple(r) parsing script might be more up your alley (it would be for me), if you convert you sampleImage() expression to keyframes, then select the keyframes and copy them, you can then paste that data into a text file — i haven’t actually done this for a color property (i have for position), but i assume you’ll get rgba values for every keyframe.

    at that point you’d need to write a script that will parse that file up and write a file with the data in the order that you need.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy