I'm working on a webpage that does the following.
Using youtube-dl to download the youtube file (works fine)
Using ffmpeg to transcode the downloaded file to mp4 (works fine)
Email a video link using PHPMailer to the person (works fine)
However I want to delay the emailing part by like 60 seconds due to the processing time of downloading the the youtube file and transcoding the file to mp4 with ffmpeg, it can take up to 2mins. I want to delay it so that it does send the email. I tried using sleep(60); but it delays the whole script not just where I need it to.
Thoughts? Suggestions?
TIA