Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hls single file #60

Open
ghost opened this issue May 20, 2020 · 0 comments
Open

hls single file #60

ghost opened this issue May 20, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented May 20, 2020

trying to make this work:

ffmpeg -threads 0 -i test.mp4 -r 24 -g 48 -keyint_min 48 -sc_threshold 0 -c:v libx264^
 -s:v:0 1920x1080 -b:v:0 5200k -maxrate:v:0 5720k -bufsize:v:0 5200k^
 -s:v:1 1280x720 -b:v:1 3100k -maxrate:v:1 3410k -bufsize:v:1 3100k^
 -b:a 128k -ar 44100 -ac 2^
 -map 0:v -map 0:v -map 0:a^
 -f hls -var_stream_map "v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio"^
 -hls_flags single_file -hls_segment_type fmp4 -hls_list_size 0 -hls_time 6  -master_pl_name master.m3u8 -y test%v.m3u8

so i edited the HLSFilter.php file:

    private function initArgs(Representation $rep): array
    {
        return [
            "-s:v", $rep->getResize(),
            "-crf", "20",
            "-r", "24",
            "-sc_threshold", "0",
            "-g", "48",
            "-keyint_min", "48",
            "-f", "hls",
            "-b:v", $rep->getKiloBitrate() . "k",
            "-maxrate", intval($rep->getKiloBitrate() * 1.2) . "k",
            "-hls_flags", "single_file",
            "-hls_segment_type", $this->hls->getHlsSegmentType(),
            "-hls_list_size", $this->hls->getHlsListSize(),
            "-hls_time", $this->hls->getHlsTime(),
            "-master_pl_name", $this->getInitFilename(),
            "-y", $this->getInitFilename()
        ];
    }

not sure if this is good or not? any other way to do that better? not sure also how to map the audios

aminyazdanpanah added a commit that referenced this issue Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant