After Effects: Countdown Timer Tutorial (Quick Easy Timer)
ฝัง
- เผยแพร่เมื่อ 2 ต.ค. 2024
- How to create a countdown or count up timer in Adobe After Effects CC and CS6 using an easy method. Animation timer in After Effects or AE timer is really easy to create and control. This Adobe After Effects Tutorial will show you how to create a countdown or count up timer using a simple and easy expression.
I'm unable to add the expression due to brackets so here's a notepad download
Expression: bit.ly/3ZK20i8
🔔 Stay Updated ➤ bit.ly/1Lr3EXM
🖥️ My Setup 🖱️ ▸ www.amazon.co....
〓 GET ADOBE APPS ▾
--- --- --- ---
✅ Photoshop ➧ prf.hn/l/20Bd3Lj
✅ After Effects ➧ prf.hn/l/OVxMyzj
✅ Premiere Pro ➧ prf.hn/l/DRPwkEZ
🔵 All Adobe Apps ➧ prf.hn/l/LbkejMN
--- --- --- ---
〓 PLAYLISTS ▾
---
Uploads ▸ bit.ly/1O7YbLQ
Photoshop ➥ bit.ly/1Hd8CfQ
Sony Vegas ➥ bit.ly/1OWjDoc
After Effects ➥ bit.ly/1MZkLkq
---
〓 LINKS ▾
---
🐦 Twitter ▸ / verticdesigns
📷 Instagram ▸ / verticdesigns
🌄 Free Stock Photos ▸ pexels.com/@ge...
---
#ae #timer - แนวปฏิบัติและการใช้ชีวิต
✅ *After Effects* ➧ prf.hn/l/OVxMyzj
Big thanks to @TvoyaZavarka for fixing the hours timer expression!
------------------------------------------------------------------------------------------------------------
⏰ *Minutes Timer Expression (**00:00**):*
------------------------------------------------------------------------------------------------------------
slider = Math.round(effect("Slider Control")("Slider"))
sec = slider%60
min = Math.floor(slider/60)
function addZero(n){ if (n
How would you add hours to this formula?
@@beanlordy for that you'd type this
slider = Math.round(effect("Slider Control")
("Slider"))
sec = slider%60
x = Math.floor(slider/60)
min= x%60
hour = Math.floor(slider/3600) function addZero(n){ if (n
@@VerticDesigns there is an error in 11 line
hour = Math.floor(slider/3600) function addZero(n){ if (n
@@rimantasukneviciusnebulamo1166 I'll have a look and check it out
slider = Math.round(effect("Slider Control")("Slider"))
sec = slider%60
x = Math.floor(slider/60)
min= x%60
hour = Math.floor(slider/3600)
function addZero(n){ if (n
doesn't work in AE 2024
I am sorry, but this solution is over complicated. You shouldn't change the expression engine to make something simple like this work. Also Your expression is an overkill. so many lines of code, but you need only one line:
timeToTimecode(effect("Slider Control")("Slider")).substr(3,5);
This line does exactly what you need and you don't have to change any preferences. It would work no matter which expression engine is on...
oh. And if you need it with hours then just do this version:
timeToTimecode(effect("Slider Control")("Slider")).substr(0,8);
hello, what does error at line 0 in property slider of layer 1 mean?? thank you for your help
@@peachypers I am not sure what exactly you're trying to do, but I think you copied and pasted this expression on the slider control, but this expression written to be used on the text layer SourceText property. It returns String value and slider control expects numeric value, so you get an error message.
Wow this works beautifully. Are you a programmer by trade? I don't understand how people understand the expressions in AE so well.
no. I am working in post production. Kinda like generalist, but mostly do compositor's work. Guess just have been doing it for a very long time (over 25 yers). Plus I always liked programming. It's fun and saves time :)
@@cellstunts
Thanks man, saved me a whole other google search for why his version was giving me errors lol
When I did everything in this video, it still showed an error. Namely, it said "invalid result (divide by zero?) and it was referring to the very first line of code for the expression. If you can give me a solution to this issue that would be amazing, as this is driving me crazy...
same...anyone could found a solution to this?
I'm getting an error showing on function addZero(n){ if (n
Is there a way to adjust kerning and baseline shift once the expression has been added?
Thank you! Easy to follow and exactly what I was after. 🙌🏻
Is there a way to make the black background transparent, so when I export I will have only the timer? (This is my first time using AE) Great video!
You need to export with an alpha layer. Don't add a background with your countdown timer and export in these settings: Format-Quicktime ; Format Options-ProRes 4444 ; Channels-RGB+Alpha
This will give you a transparent background in an mov format and you can drop it on any video. We do this all the time at my job and its a lifesaver!
Great, but how do you align it / fix it so that you get equal space of digits at all times?
You need to use a mono space font, otherwise, the font itself has different spaces for each digit, so you can't align it.
How do you keep the digits to stay in a constrained position so that the colon doesn't shuffle left and right as the countdown goes? Similar to a digital alarm clock positioning.
I also would like to know
No need to change the prefs use this:
slider = Math.round(effect("Slider Control")("Slider"));
sec = slider%60 ;
min = Math.floor(slider/60);
addZero = function(n){
if (n
thank you so much sir
The expressions and scripts preference is not available in Adobe After Effects CC 2023, so this is not a solution just yet.
Yes it is. It's in Project Settings. Not in Preferences.
i think i found it
left side of the screen in project (above the timeline) > there's 6 buttons, click the 5th one (or the one that says "8 bpc", "16 bpc" or "32 bpc" and then go to expressions
How would I remove the zero that is placed by the line of code here:
function addZero(n){ if (n
Remove addZero on "min" for the last string:
slider = Math.round(effect("Slider Control")("Slider"))
sec = slider%60
min = Math.floor(slider/60)
function addZero(n){ if (n
thank you so much! this is exactly what I needed.
thanks for keeping the video short and showing what to do straight away! I'll definitely use this trick all the time now
You're welcome and glad to hear that 😀
sheer brilliance
😁👌
hey, h0w can i add miiseconds to this? thanks for the tutorial
great tutorial! But why the timecode effect is incapable of letting you use a custom font is just ridiculous. It's 2024 and we're paying Adobe for this software, we shouldn't be required to write our own countdowns just so we can use a custom font.
Update on that expression- plus you don't need to change it to the legacy in the expressions engine (tested on AE 2024)...
slider = Math.round(effect("Slider Control")("Slider"));
sec = slider%60;
min = Math.floor(slider/60) ;
function addZero(n){ if (n
@@WireWax-v4u oh cool thanks for sharing! I'll have to check it out
muchísimas gracias Crack! Saludos desde México
If it doesn't work try to paste code into source text, not into slider tool............... I did this mistake
Thanks, this was incredibly helpful, to add to it;
If you want to make an automatic "Time elapsed" timer out of this for a song for example (my current use case):
For "01:23 / 03:21" format:
-----
slider = Math.round(effect("Slider Control")("Slider"));
function addZero(n){return (n < 10 ? "0" : "") + n}
et = Math.round(outPoint);
sec = et%60;
min = Math.floor(et/60);
endtime = addZero(min) + ":" + addZero(sec);
sec = slider%60;
min = Math.floor(slider/60);
addZero(min) + ":" + addZero(sec) + " / " + endtime
-----
For "01:23" format:
-----
slider = Math.round(effect("Slider Control")("Slider")) //Treat slider numbers as rounded up;
sec = slider%60 //When the slider hits 60;
min = Math.floor(slider/60) //reset and add a number to the minute counter;
function addZero(n){ if (n
@@BlockVentures thanks for updating it and sharing with everyone:)
Hi, i've used it in a project it worked, and i just reopened it and after effects says there is an error in the expression. It says "syntax error : unexpected token 'else' "
switching to the legacy expression engine fixed it
The expression don't work (always a error code) after change setting projects...
expression:
slider = Math.round(effect("Slider Control")("Slider"))
sec = slider%60
min = Math.floor(slider/60)
function addZero(n){ if (n
there is better script for after effect I have been using which is Counter Pro , its official script form aescript. so checp but really time saving
Im subscribing just for the accent
there is better script for after effect I have been using which is Counter Pro , its official script form aescript. so checp but really time saving
Thanks for the tutorial. One Question; why does it only show the first digits of 10, 20, 30, 40, 50, etc and is there a way to change it?
like and subscribe, thank you!
Hello what to do to add zero for hours to this?
Excellent tutorial!
Para los que tengan el programa en español, deben cambiar "slider" por "deslizador" en la fórmula tantas veces como aparezca y "Slider control" por "Controlador del deslizador"✅✅
deslizador = Math.round(effect("Control del deslizador")("Deslizador"))
sec = deslizador%60
min = Math.floor(deslizador/60)
function addZero(n){ if (n
Sabes si hay alguna forma de evitar el movimiento de los números? si te fijas cuando avanza el contador los números de la derecha se desplazan, ¿hay alguna forma de que esto no pase?
@@fernandoangel7254 No sé sea la solución adecuada pero yo lo hice con el texto alineado al centro, así se desplaza de forma pareja a la derecha y a la izquierda. Si ves en el tutorial él tiene el texto alineado a la izquierda y por ello los números de la izquierda permanecen fijos en el origen
@@fernandoangel7254 Hay dos formas, una sería haciendo dos elementos que funcionen por separado y alinear ambos a la derecha, o lo otro es que utilices una tipografía de ancho fijo, que cada número ocupe el mismo espacio
se entiende?
@@wehearttrends pues lo voy a probar, estoy haciendo algunas cuentas regresivas con fuentes muy especificas, es decir, que la idea de usar otra fuente la descarto, pero lo de usar dos elementos por separados no se me había ocurrido, gracias por la idea camarada se entendió perfectamente.
te quiero muchas gracias
thank you SO MUCH
there is better script for after effect I have been using which is Counter Pro , its official script form aescript. so checp but really time saving
Great video! Just one question, do you know how can i keep the decimals after the seconds?
Remove Math.floor
Big Thanks Broooo
there is better script for after effect I have been using which is Counter Pro , its official script form aescript. so checp but really time saving
Thank you so much for the tutorial! Very easy to follow :)
glad to hear that and no problem
Please. Where is code
@@ongduong442 in description and pinned comment
Thank you! this is the only timer i could find that worked with the latest version of ae
Thank you! this is just what I was looking for 😊
En español este me funcionó:
Deslizador = Math.round(effect("Control del deslizador")("Deslizador"))
sec = Deslizador%60
min = Math.floor(Deslizador/60)
function addZero(n){ if (n
Mil gracias!! me estaba mandando error al escribirlo en inglés!
your function doesnt work, come on man
Did you switch expression engine?
amazing stuff... i give this video a 10/10
Thank you sir! I just found your channel. Everything worked. Now this is something else I can add to my Ae tricks.
No problem and I'm really glad to hear that! Also welcome to my channel
hey, even tho I set the the settings to the one you said, the error doesnt go away?
Double check the expression and make sure there's no gaps, random empty spaces or just reboot ae
I need to place a semicolon here, otherwise it won't work for me either: function addZero(n){ if (n
Thanks for this! Coincidentally, I needed a 5 minute timer. This was perfect.
It was meant to be then haha and no worries
How did you modify the expression for 5 minutes/less than 10 minutes?
@@vincentsansevero7590 do you mean like re-edit the expression or creating the expression?
@@VerticDesigns Yes, how to make the timer < 10 mins? I changed the last line to '(min) + ":" + addZero(sec)', and it is displaying properly, but the counter is counting "slower" than "normal" time
@@vincentsansevero7590 oh right just make sure to also update your project to 10 min and to change the timer speed you move the keyframes closer together
Thank you!
This worked good for a genaric clock where time dose not need to correct but to get it to be correct time (is was in a 23.98 project that might be why) I had to swap
slider = Math.round(effect("Slider Control")("Slider"))
with
slider = Math.floor(effect("Slider Control")("Slider"))
Also to help reduced the the jumping around because the kerning on 1 I build the Sec and Min as different layers by themselves and had ( : ) also be its own layer. Used at temp 00:00 layer as a template for spacing.
After all that found a font the has the Kerning the same for all Number (Digital-7 Mono) then went back to the one layer version
Thank you
Great Video man!! Btw, do u know how to put it backwards? I mean, like a countdown timer?
nvm I figure it out xD
oh nice glad you've sorted it haha
What do you mean by "home"?? is it windows key?
the home key on a standard keyboard right above the end key
10q man)
Why 300? In the slider
I think the slider operates by frames so I believe that would be the amount of frames that you'd need for a 5 min timer. Not 100% sure on that one
The error of expression keeps apearing
Did you switch to that legacy expression engine?
Also just double check the code because the littlest mistakes causes the errors aha
correct code is here:
slider = Math.round(effect("Slider Control")("Slider"));
sec = slider % 60;
x = Math.floor(slider / 60);
min = x % 60;
hour = Math.floor(slider / 3600);
function addZero(n) {
if (n < 10) {
return "0" + n;
} else {
return n;
}
}
addZero(hour) + ":" + addZero(min) + ":" + addZero(sec);
Thank you sooo much !!!!
this didnt work for me but then I just asked chatgpt to write it and that did work in way less time.
timeToDisplay = Math.min(time, 5);
formattedTime = timeToDisplay.toFixed(2);
formattedTime;
@@nickverzilli3181 oh fair enough if that short version works the same then even better
hey man! I'm using AE 2015 and can't find any expression setting over there... If you know what to do... I'd be very thankful to you!
oh! I did something and its actually started working lol xd! anyways thanks for your such a beautiful tutorial!
oh right well im glad it' working now
@@unseenninja130what did u do? im having the same problem :)
@@gojosheart no shot brhh💀... literally did it 3 months ago and I don't remember anything bout it now! but luckily I got the project file if you want it?
thanks, very appreciated
No problem
how do you keep the timer from moving / shifting along the baseline?
If you keep the anchor point center align in the middle of the text box and center align your text box it auto center align the timer
Use a monospaced font. Like roboto or arial
Great tutorial! TY 👍
Np 👌
Thank you. This helped!
No problem glad it did
legend!
Super useful! Big thanks!
Happy it helped:)
Thank you very mutch♥♥♥♥
No problem :)
Thank you so much!
No problem
💛💛💛Thank U!!!💛💛💛
Np :)
thanks!
No problem
Appreciate bro 💪
No problem 👍
thank you
no problem
thanks!
no problem
thank you, so to the point and helpful! I make pomodoro timers for my videos and learned how to do that watching your tutorial.
Oh right that's really cool and I'm glad my video was helpful :)