0

I have a script using youtube dl. The script downloads the file and converts it to the mp3 format. I would like to write in the .txt file the status in which the phase is, for example:
- downloading
- converting
- finished

My script:

<?php
$url = 'https://www.youtube.com/watch?v=yU0tnrEk8H4';
exec('youtube-dl --extract-audio --audio-format mp3 '.$url,  $output, $ret)
print_r($output);
print_r($ret);
?>

Do you have any ideas how to do it?

0 Answers0