how to use ffmpeg to convert mp4 video to hls

Can I convert my MP4 video with original 1080P quality to HLS using FFMPG so that the HLS results have quality from 1080p to 360p?

and how can I detect my video source when I enter a 720P quality video, so it only produces 720P quality or below?

I’ve tried looking for a way but can’t find it,

currently i am using this command

ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

but the results are not multi resolution 🙁

Please help

Read more here: Source link