I have an RTMP server that is outputting a stream as such:
ffmpeg -re -i https://somefile.mp4 -maxrate 5M -crf 24 -bufsize 6000k -c:v libx264 -preset superfast -tune zerolatency -strict -2 -c:a aac -ar 44100 -attempt_recovery 1 -max_recovery_attempts 5 -drop_pkts_on_overflow 1 -max_muxing_queue_size 9999 -f flv rtmp://www.example.com/live/c731d17e-9a6d-41f8-aa0c-52416eb5f6ce
On the receiving server, its transmuted into an HLS with this command
/usr/bin/ffmpeg -y -i rtmp://127.0.0.1:1935/live/c731d17e-9a6d-41f8-aa0c-52416eb5f6ce -c:v copy -maxrate 6000k -bufsize 8000k -c:a copy -f tee -map 0:a? -map 0:v? [hls_time=1:hls_list_size=10:hls_flags=delete_segments:hls_wrap=10]./media/live/c731d17e-9a6d-41f8-aa0c-52416eb5f6ce/index.m3u8
But the conversion is so slow, it makes it impossible to livestream. How can I improve the rtmp to hls conversion?