This commit is contained in:
Nirvana
2026-02-09 14:28:20 +01:00
parent 919377d05b
commit 99399aa3e6
+9 -8
View File
@@ -742,20 +742,21 @@ class UltimateService:
# Build ffmpeg pipe command
# Map all video (will be just one due to highest_quality_only), all audio, and optional subtitles
ffmpeg_cmd = (
f'ffmpeg -loglevel fatal '
f'-probesize 32 -analyzeduration 0 '
f'-fflags +genpts+discardcorrupt+nobuffer '
f'-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 1 '
f'ffmpeg -loglevel error '
f'-fflags +genpts+igndts+discardcorrupt '
f'-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 2 '
f'-thread_queue_size 512 '
f'-i "{stream_url}" '
f'-map 0:v -map 0:a? '
f'-map 0:v:0 -map 0:a:0? '
f'-c copy '
f'-avoid_negative_ts make_zero '
f'-max_muxing_queue_size 4096 '
f'-f mpegts '
f'-muxdelay 0 '
f'-flush_packets 1 '
f'-use_wallclock_as_timestamps 1 '
f'-muxdelay 0 -muxpreload 0 '
f'-mpegts_flags resend_headers '
f'-mpegts_copyts 1 '
f'-metadata service_name="{channel_name}" '
f'-flush_packets 1 '
f'pipe:1'
)