From 9da60f214144531a61d139dd46f9e13d035c8010 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Thu, 1 Jan 2026 15:48:01 +0100 Subject: [PATCH] fix(live): optimize FFmpeg streaming for faster start with reliable audio - Add -fflags +nobuffer+fastseek+genpts for instant stream start - Keep probesize at 5MB for reliable audio detection - Set analyzeduration to 3s for balanced speed/reliability --- bin/api/streaming_handler.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/api/streaming_handler.dart b/bin/api/streaming_handler.dart index 2c1548f..b65239b 100644 --- a/bin/api/streaming_handler.dart +++ b/bin/api/streaming_handler.dart @@ -136,9 +136,9 @@ Handler createLiveStreamHandler( '-reconnect_streamed', '1', '-reconnect_delay_max', '5', '-rw_timeout', '15000000', - '-fflags', '+nobuffer+fastseek', // Disable buffering for instant start - '-analyzeduration', '1000000', // 1s probe (was 5s) - '-probesize', '1000000', // 1MB probe (was 5MB) + '-fflags', '+nobuffer+fastseek+genpts', // Fast start + fix timestamps + '-analyzeduration', '3000000', // 3s probe (reliable detection) + '-probesize', '5000000', // 5MB probe (original - ensures audio) '-i', targetUrl,