ffmpeg-cli-wrapper icon indicating copy to clipboard operation
ffmpeg-cli-wrapper copied to clipboard

I would like to create an HLS MP4 file with 3 different qualities

Open GdavidPaella opened this issue 4 years ago • 5 comments
trafficstars

The question I would like to take a given MP4 file and then create a new HLS file with 3 different qualities (I think this is how it's called: HLS). The first quality should be the same as the original video, and then 2 more lower qualities. Is that possible?

What you have tried I don't even know where to start from, to be honest.

GdavidPaella avatar Sep 30 '21 11:09 GdavidPaella

@GdavidPaella you can use below command for you purpose as of now ffmpeg-cli-wrapper does not provide support for hls file creation.

ffmpeg -i <INPUT FILE PATH> -preset slow -g 48 -sc_threshold 0 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -s:v:0 1920*1080 -b:v:0 1800k -s:v:1 1280*720 -b:v:1 1200k -s:v:2 858*480 -b:v:2 750k -s:v:3 630*360 -b:v:3 550k -s:v:4 426*240 -b:v:4 400k -s:v:5 256*144 -b:v:5 200k -c:a copy -var_stream_map "v:0,a:0,name:1080p v:1,a:1,name:720p v:2,a:2,name:480p v:3,a:3,name:360p v:4,a:4,name:240p v:5,a:5,name:144p" -master_pl_name master.m3u8 -f hls -hls_time 10 -hls_playlist_type vod -hls_list_size 0 -hls_segment_filename "<OUTPUT PATH FOR SEGEMENT FILES>/%v/segment%d.ts" <OUTPUT PATH FOR SEGEMENT FILES>/%v/index.m3u8

hariomaurya avatar Mar 03 '22 04:03 hariomaurya

@bramp Hi Can i work on this issue or is it already assigned?

hariomaurya avatar Mar 03 '22 05:03 hariomaurya

Absolutely, I would welcome pull requests

bramp avatar Mar 03 '22 05:03 bramp

what if we have multiple audios and subtitles? How can we add those in each of 3 video streams in which it must contain all the audio and subtitles ?

VishalSinggh avatar Apr 22 '22 05:04 VishalSinggh

Hi @VishalSinggh Can you please share the input video sample and description about the desired output in detail?

harrymaurya05 avatar May 01 '22 15:05 harrymaurya05