0
我用這個代碼從一個MP4文件創建實時流:如何使低延遲且具有良好的品質爲HLS即時串流
ffmpeg -re -i input.mp4
-c:a aac -c:v libx264 -s uhd2160 -f hls -hls_list_size 0 2160p/out.m3u8
-c:a aac -c:v libx264 -s 2560x1440 -f hls -hls_list_size 0 1440p/out.m3u8
-c:a aac -c:v libx264 -s hd1080 -f hls -hls_list_size 0 1080p/out.m3u8
-c:a aac -c:v libx264 -s hd720 -f hls -hls_list_size 0 720p/out.m3u8
-c:a aac -c:v libx264 -s hd480 -f hls -hls_list_size 0 480p/out.m3u8
-c:a aac -c:v libx264 -s nhd -f hls -hls_list_size 0 360p/out.m3u8
-c:a aac -c:v libx264 -s cga -f hls -hls_list_size 0 200p/out.m3u8
但流的時候,也有極延遲。
看起來,這個延遲存在於質量非常高的流式視頻中,就像我用於livestream的視頻(4k)一樣。
我該如何減少這個延遲和減少內存使用率爲?
用於實時方法的HLS不是一個好的解決方案。在我的測試中,每次至少延遲5秒。 – Hokusai
@ Hokusai,你能告訴我你的建議嗎? – parsa
您可以通過使用[tee muxer](http://ffmpeg.org/ffmpeg-formats.html#tee)爲所有輸出對音頻編碼一次而不是單獨編碼相同的流倍。 – LordNeckbeard