Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Weird marker behavior

  • Weird marker behavior

    Posted by Alejandro Pérez blanco on December 7, 2025 at 5:04 pm

    Hi folks, I’m trying to assemble every frame marked with a marker in a video layer via time remap. Frame 0 shows the frame marked with marker 1, frame 1 shows marker 2, etc.

    try{
    myFrame=time/thisComp.frameDuration+1;
    myMarker=thisLayer.marker.key(myFrame).time;
    }catch(err1){
    value
    }

    Now, weird things started happening beyond the 100 markers. Sometimes frames are repeated, sometimes frames are skipped. As a test, I used a 10.000 frame video and put a marker in every frame towards the end. Almost 50% of the frames are wrong.

    When I put that code in an expression control effect without the try safety measure, those frames get AE to slow down significantly and end up showing an expression error. Variable myFrame always gets the right results.When I switch to marker.key.index, it also seems to be unreliable.

    While searching, I found this unanswered question from years ago and I think the source of the problem may be similar.
    https://creativecow.net/forums/thread/tiny-bug-in-after-effects-marker-time/

    Is this a known bug? Are there ways to get similar results in a more trustworthy way?

    Brie Clayton
    replied 5 months ago
    3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    December 7, 2025 at 5:48 pm

    Does it make any difference if instead of this:

    myFrame=time/thisComp.frameDuration+1;

    you use this:

    myFrame=timeToFrames(time)+1;
  • Alejandro Pérez blanco

    December 7, 2025 at 7:32 pm

    It works! Bravo!

    I’ll do additional testing tomorrow. It looks great so far. I guess there was some rounding error regarding time.

    Thanks, Dan. Once again, you’ve saved the day.

  • Brie Clayton

    December 13, 2025 at 11:41 pm

    Thanks for this solve, Dan!

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