PHP-FFmpeg-video-streaming icon indicating copy to clipboard operation
PHP-FFmpeg-video-streaming copied to clipboard

The count of side value array must be the same as the count of kilo bitrate array

Open wimil opened this issue 5 years ago • 1 comments

Describe the bug I'm trying to add kilobitrates to Auto Generated Representations and I'm getting this error: The count of the side value array should be the same as the count of the kilo bitrate array

To Reproduce Steps to reproduce the behavior:

  1. Go to '/../AutoReps.php'
  2. On Line '109'
  3. The code:
$ffmpeg->open($video_path)
            ->hls()
            ->x264()
            ->autoGenerateRepresentations(
                [1080, 720, 360],
                [6000, 4000, 1000]
            )
            //->addRepresentations($rep)
            ->save(storage_path('app/videos/test2/test.m3u8'));
  1. See error: The count of side value array must be the same as the count of kilo bitrate array

Desktop/Server (please complete the following information):

  • OS: Centos
  • Version 7
  • FFmpeg vesion: 4.3

wimil avatar Oct 18 '20 18:10 wimil

You are right! The exception throws when one or more values in the array are greater than the original height and then it will be filtered by the sideFilter method. After that, the count of the height values is not the same as the count of the kilobit rate values.

I will try to find a valid solution in the next release.

aminyazdanpanah avatar Oct 25 '20 15:10 aminyazdanpanah