Set timer when macro used

I am making recordings of videos on the Internet. I want to stop the recordings at a time that varies with each recording. (Videos of different lengths). Is it possible to set a timer each time the macro is chosen?

macro steps:

Window popup asking to set the time for the timer (in minute s is ok, seconds would be better)
When the timer goes off, the recording program comes to the front.
Shift command button turns off the recording.
Turning off the Internet recording without shutting down the Internet tab.

Sure. Use the Prompt for User Input action to ask for the time to pause, and then use the resulting variable in the Pause action.

Like most numeric fields, the Pause time can be a calculation including variables.

If you need to get a copy of the video from a webpage, then I can recommend the excellent command-line tool youtube-dl.
It support a lot of sites. Not just YouTube.

I have made a macro and you can read about it here:

Thanks Peter.
I see, I can I time the duration of the recording on Camtasia. Unlike the download program that JimmyHartlington suggested, I am system recording since recording is blocked on the website that is broadcasting the video. I am just trying to activate Camtasia stop the recording, and that seems to be a pause function. What Peter suggests looks like what I need.
Ellen Madono