HLS 流优化

HLS 流优化

我有这个命令来创建 HLS 流。有什么方法可以优化它吗?我知道更改 CRF 和预设会提高编码速度,但我正在寻找另一种调整方法。谢谢回复。

ffmpeg -i /app/test.mp4 
-c:v libx264 -crf 23 -c:a aac -preset slow 
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:a:0 
-filter:v:0 scale=w=-2:h=180 -maxrate:v:0 300k -bufsize:v:0 300k -b:a 64k 
-filter:v:1 scale=w=-2:h=270 -maxrate:v:1 500k -bufsize:v:1 500k -b:a 128k 
-filter:v:2 scale=w=-2:h=360 -maxrate:v:2 700k -bufsize:v:2 700k -b:a 128k 
-filter:v:3 scale=w=-2:h=540 -maxrate:v:3 900k -bufsize:v:3 900k -b:a 160k 
-filter:v:4 scale=w=-2:h=720 -maxrate:v:4 1500k -bufsize:v:4 1500k -b:a 160k 
-c:a aac -b:a:5 256k -f hls -hls_time 4 -hls_segment_filename %v/%02d.ts 
-hls_playlist_type vod -master_pl_name master.m3u8 
-var_stream_map "v:0,a:0,name:180p v:1,a:1,name:270p v:2,a:2,name:360p v:3,a:3,name:540p v:4,a:4,name:720p a:5,name:audio" 
-threads 10 
-movflags faststart /app/test/%v/playlist.m3u8 -y

相关内容