How can we transcode live rtmp stream to live hls stream using ffmpeg?

后端 未结 4 825
花落未央
花落未央 2020-12-07 09:03

I am trying to convert a live rtmp stream to hls stream on real time.

I got some idea after reading

http://sonnati.wordpress.com/2011/08/30/ffmpeg-%E2%80%93-

4条回答
  •  天命终不由人
    2020-12-07 09:37

    Try this RTMP to HLS command line settings:

    ffmpeg -v verbose -i rtmp://:/ -c:v libx264 -c:a 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 6 -hls_wrap 10 -start_number 1 /.m3u8
    

    There might be some delay in the HLS feed. However, it'll work.

提交回复
热议问题