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
This commit is contained in:
Michael committed 2026-01-01 15:48:01 +01:00
1 parent f5093e8d0e
commit 9da60f2141
1 file changed
+3 -3
+3 -3
View File
@@ -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,