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

CommandBuilder build logic issue (no hls_list_size = 0 in command)

Open akopytovlocals opened this issue 11 months ago • 0 comments

Describe the bug In CommandBuilder->build is that part of code foreach ($this->filters as $filter) { $commands = array_merge($this->getInputOptions(), $filter->apply($this->media->baseMedia(), $format)); }

In the case of 2 elements in the FiltersCollection, the last one will overwrite the results from the previous.

To Reproduce Steps to reproduce the behavior:

  1. Open Media with > 1 Filters, in my case I have HLSFilter and PadFilter
  2. Run build command
  3. Debug the output

Expected behavior Commans array has to merge data from each Filter

Screenshots Commans after the first HLSFilter

Image

Commans after the second PadFilter

Image

Desktop/Server (please complete the following information):

  • OS: Debian GNU/Linux 11 (bullseye)
  • Version 11
  • ffmpeg version 4.3.7-0+deb11u1 Copyright (c) 2000-2024 the FFmpeg developers

Additional context As a result, I have only 5 last .ts element in my .m3u8 file, like this (it deleted chunks 0-10) #EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:8 #EXT-X-MEDIA-SEQUENCE:11 #EXTINF:8.333244, **test_video_key_240p11.ts** #EXTINF:8.333256, test_video_key_240p12.ts #EXTINF:8.333244, test_video_key_240p13.ts #EXTINF:8.333256, test_video_key_240p14.ts #EXTINF:2.066667, test_video_key_240p15.ts #EXT-X-ENDLIST

akopytovlocals avatar Dec 20 '24 15:12 akopytovlocals