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 0parameter—it won't work withteefor individual HLS outputs. - Added
:hls_list_size=0to each HLS output definition in theteestring. This is how you pass format-specific parameters to each branch of theteemuxer. - The syntax
f=hls:param1=value1:param2=value2lets you set multiple HLS options per output if needed (e.g., you could even set differenthls_timevalues 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
相关产品推荐
相关产品推荐

