ffmpeg -v verbose -i rtsp://127.0.0.1:8080/test.sdp \ -vcodec libx264 -acodec aac -ac 1 -strict -2 -crf 18 \ -profile:v baseline -maxrate 400k -bufsize 1835k \ -pix_fmt yuv420p -flags -global_header \ -hls_time 10 -hls_list_size 3 -hls_wrap 4 -hls_flags delete_segments \ -start_number 1 /usr/local/apache-tomcat-7.0.53/webapps/ROOT/hls/index1.m3u8 \ -vcodec libx264 -acodec aac -ac 1 -strict -2 -crf 18 \ -profile:v baseline -maxrate 700k -bufsize 1835k \ -pix_fmt yuv420p -flags -global_header \ -hls_time 10 -hls_list_size 3 -hls_wrap 4 -hls_flags delete_segments \ -start_number 1 /usr/local/apache-tomcat-7.0.53/webapps/ROOT/hls/index2.m3u8
и создайте index.m3u8, указывающий на потоки выше:
#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000 hls/index1.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=700000 hls/index2.m3u8