You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

FFmpeg多HLS输出中如何单独设置hls_list_size属性?

Fixing -hls_list_size for Multiple HLS Outputs with FFmpeg tee Muxer

Got it, I see the issue here—when using the tee muxer to output multiple HLS streams, global HLS-specific parameters like -hls_list_size don't automatically propagate to each individual HLS branch. You need to specify this parameter per output within the tee URL syntax.

Here's the corrected command:

ffmpeg -i kata.mp4 \
-filter_complex "[0:v]split=4[s0][s1][s2][s3]; [s0]scale=hd720[v0];[s1]scale=hd480[v1];[s2]scale=nhd[v2];[s3]scale=cga[v3]" \
-map [v0] -map [v1] -map [v2] -map [v3] -map 0:a \
-c:v libx264 -c:a aac \
-f tee \
"[select='v:0,a':f=hls:hls_list_size=0]out.m3u8| \
 [select='v:1,a':f=hls:hls_list_size=0]out-480.m3u8| \
 [select='v:2,a':f=hls:hls_list_size=0]out-360.m3u8| \
 [select='v:3,a':f=hls:hls_list_size=0]out-200.m3u8"

Key changes explained:

  • Removed the global -hls_list_size 0 parameter—it won't work with tee for individual HLS outputs.
  • Added :hls_list_size=0 to each HLS output definition in the tee string. This is how you pass format-specific parameters to each branch of the tee muxer.
  • The syntax f=hls:param1=value1:param2=value2 lets you set multiple HLS options per output if needed (e.g., you could even set different hls_time values for each stream if wanted).

This way, each HLS playlist will respect the hls_list_size=0 setting (which disables playlist truncation, keeping all segments in the playlist).

内容的提问来源于stack exchange,提问作者Parsa Saei

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:47:57