quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg
https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff
MIT License
506 stars 115 forks source link

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

Open wimil opened 3 years ago

wimil commented 3 years ago

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'));
  4. 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):

aminyazdanpanah commented 3 years ago

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.