Passed
Push — master ( ac0e9d...b23da5 )
by Amin
04:21
created

HLSFilterV2   A

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
use Streaming\File;
16
use Streaming\Representation;
17
use Streaming\Utiles;
18
19
class HLSFilterV2 extends StreamFilter
20
{
21
    /**
22
     * This is a new version of HLSFilter that the master playlist will be created by FFmpeg
23
     *
24
     *
25
     *
26
    ffmpeg ^
27
    -i path/to/video ^
28
    -i path/to/video  ^
29
    -i path/to/video  ^
30
    -c:v libx264 -c:a copy ^
31
    -s:v:0 1920x1080-b:v:0 4096k -s:v:1 1280x720 -b:v:1 2048k -s:v:2 854x480 -b:v:2 750k ^
32
    -map 0:a -map 0:v -map 1:v -map 2:v ^
33
    -var_stream_map "a:0,agroup:audio v:0,agroup:audio v:1,agroup:audio v:2,agroup:audio" ^
34
    -f hls -hls_segment_type mpegts -hls_list_size 0 -hls_time 10 -hls_allow_cache 1 -master_pl_name master-playlist.m3u8 -y playlist%v.m3u8
35
     *
36
     *
37
     *
38
     * */
39
40
    /**
41
     * @param StreamInterface $stream
42
     * @return mixed
43
     */
44
    public function streamFilter(StreamInterface $stream): void
45
    {
46
        // TODO: Implement streamFilter() method.
47
    }
48
}