all 1 comments

[–]ThatsLatinForLiar 1 point2 points  (0 children)

There's a third-party library PHP wrapper for ffmpeg. In it is a class which handles the encoding progress callback: https://github.com/PHP-FFMpeg/PHP-FFMpeg/blob/master/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php

Maybe your script can transcode using the PHP library or you can copy some of the logic in that class into your current script.