Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Getting the filename

  • Getting the filename

    Posted by Beorn Leonard on June 17, 2005 at 5:43 am

    Is there anyway of using an expression to get the filename (or, even better the timestamp) of a frame from an image sequence on a given frame of a timeline?
    This has to be robust enough to deal with time stretched and time rematched sequences.

    Seems like a tall order, but can it be done?

    Any help would be gratefully received.

    ————————-
    The Dark Side of the Moo

    Beorn Leonard replied 19 years, 7 months ago 3 Members · 7 Replies
  • 7 Replies
  • Mylenium

    June 17, 2005 at 7:06 am

    You can get the name using thisComp.layer(“X”).source.name, its inPoint and outPoint and the rest would be just math. I doubt that you can compensate for time remapping, though. It would be rather difficult to re-create and find the exact values at any given time for B

  • Beorn Leonard

    June 17, 2005 at 10:19 am

    Yep, that’s a good start, however…
    …it only delivers me the name of the sequence, not the name of the actual file displayed on the current frame.

    The search continues…

    ————————-
    The Dark Side of the Moo

  • Mylenium

    June 17, 2005 at 11:01 am

    yepp it does, but since you know with which file your sequence starts, it should be simple to calculate the currently displayed file number as the frame number using for instance start_frame+timeToFrames(time). Other than that there is no way, since expressions don’t have acces to the physical file structure, only the imported references in the project window or composition.

    Mylenium

    [Pour Myl

  • Filip Vandueren

    June 17, 2005 at 11:03 am

    Can’t be done with a simple expression.
    But here are two recipes for a workaround:

    create a script, that looks in the folder you imported from, and then creates an invisible text-layer with every filename on a different line.
    Then you can use an expression to calculate what framenumber of the imagesequence is being displayed.
    The name of the picture is in the text-layer on the line of that same number.

    without a script:

    re-import the image sequence as a folder of images.
    Make a comp of them, with sequenced layers of length 1 frame.

    With an expression, look inside that comp and figure out which layer is visible at a certain time.

  • Filip Vandueren

    June 17, 2005 at 9:40 pm

    I’m assuming you’re files are not simply called picture000.tif – picture999.tif.
    But that there’s a bunch of images with different file-names, that are imported as “force alphabetical order”‘

    If it’s the former case, it’s as Mylenium said, just a case of putting the current frame-number inside a string, and my solutions would be massive overkill 😉

  • Beorn Leonard

    June 19, 2005 at 5:55 am

    Thanks for everyone’s help.

    I’m on my way now. Basically I’m trying to create a clock that that is fairly accurate to some timelapse footage. The footage is an image sequence with the time and date of each frame as part of the frame name.
    For the graphics I’m generating, the footage is always being time stretched (rarely remapped) and edited, so the inpoint is always different.

    Bit of a challenge, but I think it might be possible…

    Thanks again…

    ————————-
    To err is human. To moo is bovine.

  • Beorn Leonard

    June 22, 2005 at 2:10 am

    You said:
    “create a script, that looks in the folder you imported from, and then creates an invisible text-layer with every filename on a different line.”

    Ummm, having a little trouble creating a script that can list the files in a directory. This is now the key to solving the problem. If I can list the nth file in a directory, I’d be there. How’s this done?

    ————————-
    To err is human. To moo is bovine.

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