'Cant get the progress multiple times, just once. laravel-ffmpeg

I am encountering some problems getting the progress percentage for package called - laravel-ffmpeg. It is called just once when the file has finished transcoding. I tried small and big file, got the same result. Here is the code.

FFMpeg::open('test_video.mp4')
    ->export()
    ->onProgress(function ($percentage, $remaining) {
        echo "{$remaining}";
        Asset::where('parent_catalog', '7a42ae6d-872d-4c2c-8e85-832ed9902fac')->update(['proxy_status' => $percentage]);
    })->save("test_output.mp4");

Could it be package issue or my lack of knowledge with PHP?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source