HLSFilterV2   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 1
dl 0
loc 27
rs 10
c 1
b 1
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A streamFilter() 0 2 1
1
<?php
2
3
/**
4
 * This file is part of the PHP-FFmpeg-video-streaming package.
5
 *
6
 * (c) Amin Yazdanpanah <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Streaming\Filters;
13
14
use Streaming\StreamInterface;
15
16
class HLSFilterV2 extends FormatFilter
17
{
18
    /**
19
     * This is a new version of HLSFilter that the master playlist will be created by FFmpeg
20
     *
21
     *
22
     *
23
     * ffmpeg ^
24
     * -i path/to/video ^
25
     * -i path/to/video  ^
26
     * -i path/to/video  ^
27
     * -c:v libx264 -c:a copy ^
28
     * -s:v:0 1920x1080 -b:v:0 4096k -s:v:1 1280x720 -b:v:1 2048k -s:v:2 854x480 -b:v:2 750k ^
29
     * -map 0:a -map 0:v -map 1:v -map 2:v ^
30
     * -var_stream_map "a:0,agroup:audio v:0,agroup:audio v:1,agroup:audio v:2,agroup:audio" ^
31
     * -f hls -hls_segment_type mpegts -hls_list_size 0 -hls_time 5 -hls_allow_cache 0 -master_pl_name master-playlist.m3u8 -y playlist%v.m3u8
32
     *
33
     *
34
     *
35
     * */
36
37
    /**
38
     * @param StreamInterface $stream
39
     * @return mixed
40
     */
41
    public function streamFilter(StreamInterface $stream): void
42
    {
43
        // TODO: Implement streamFilter() method.
44
        // add Mapping audio and video stream #60
45
    }
46
}