Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to make Speedramp effect using extendscript?

  • How to make Speedramp effect using extendscript?

    Posted by Dmitriy Samosenko on April 21, 2021 at 9:12 am

    i need somehow to make speedramp effect using time remapping like on this video:

    https://youtu.be/y7ZsAMbbKN4?t=149var layer = comp.layer(1);
    layer.timeRemapEnabled = true;
    var timeRemapProp = layer.property("ADBE Time Remapping");

    I need to speed up video in the middle of it…

    Any ideas?


    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Dmitriy Samosenko replied 4 years, 2 months ago 2 Members · 8 Replies
  • 8 Replies
  • Filip Vandueren

    April 21, 2021 at 10:46 am

    Try this:

    comp = app.project.activeItem;
    var layer = comp.layer(1);
    layer.timeRemapEnabled = true;
    var timeRemapProp = layer.property("ADBE Time Remapping");
    var ease = new KeyframeEase(0, 97);
    var noEase = new KeyframeEase(0, 0.1);
    timeRemapProp.setTemporalEaseAtKey(1,[noEase],[ease]);
    timeRemapProp.setTemporalEaseAtKey(2,[ease],[noEase]);
  • Dmitriy Samosenko

    April 21, 2021 at 11:21 am

    Thanks, works, but speeding up should be in center of video and video should start with normal speed. (Video length should be decreased)

  • Dmitriy Samosenko

    April 21, 2021 at 11:33 am

    Need to achieve this))

  • Filip Vandueren

    April 21, 2021 at 11:33 am

    I didn’t watch the whole video, but this is exactly what they did at the timestamp you linked…

    How would the script know how much shorter you want the video to be ?

  • Dmitriy Samosenko

    April 21, 2021 at 11:36 am
  • Filip Vandueren

    April 21, 2021 at 11:38 am

    The script needs to know how long that transition should be, exactly where it should occur, how much faster you want the motion to ramp up to…

    It’s definitely easier to do it by eye and hand, unless you have dozens of these to automate.

  • Filip Vandueren

    April 21, 2021 at 12:37 pm

    Here’s an update:

    speedRampLength = 2; // create a speedRamp over 2 seconds
    speedRampSkip= 12; // at the end of the 2sec speedramp, 12 seconds have been skipped.
    speedRampTension = 80; // how much easeOut (0.1-100)

    comp = app.project.activeItem;
    var myLayer = comp.layer(1);
    duration = myLayer.outPoint-myLayer.inPoint;
    // sanity checks
    speedRampSkip = Math.min(speedRampSkip, duration);
    speedRampLength = Math.min(speedRampLength, duration-speedRampLength);

    myLayer.timeRemapEnabled = true;
    var timeRemapProp = myLayer.property("ADBE Time Remapping");
    // remove lastKeyframe
    timeRemapProp.removeKey(2)
    // add new keyframes:
    timeRemapProp.setValuesAtTimes([
    myLayer.inPoint+ (duration - speedRampSkip)/2,
    myLayer.inPoint+ (duration - speedRampSkip)/2 + speedRampLength,
    myLayer.inPoint+ (duration - speedRampSkip + speedRampLength)
    ], [
    (duration - speedRampSkip)/2,
    (duration - speedRampSkip)/2 + speedRampSkip,
    duration
    ])
    myLayer.outPoint = myLayer.inPoint+ (duration - speedRampSkip + speedRampLength);
    var ease = new KeyframeEase(1, speedRampTension);
    var noEase = new KeyframeEase(1, 0.1);
    timeRemapProp.setTemporalEaseAtKey(2,[noEase],[ease]);
    timeRemapProp.setTemporalEaseAtKey(3,[ease],[noEase]);
  • Dmitriy Samosenko

    April 22, 2021 at 8:03 am

    Thank you so much, that helmp, i need to buy you a beer =)

    We have around 40-50 videos to process every day, currently we’re using MLT framework for that purpose, but it’s very limited, so i’m moving now to after effects so videos will be processed without user interaction at all.

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