i recently get a list of iptv channels from a provider but the streams were flaky, they cut off, and drops, audio issues, so i start to investigate and i found that we can pipe the mux with ffmpeg, so i find the most stable tuning for iptv that are flaky and had issues, so i create a command to parse the m3u8 file for us in tvheadend using sed.
sed -i 's#http://.*#pipe:///usr/bin/ffmpeg -hide_banner -loglevel warning -probesize 1M -analyzeduration 1M -reconnect 1 -reconnect_streamed 1 -reconnect_on_network_error 1 -reconnect_on_http_error 1 -reconnect_delay_max 5 -fflags +genpts -err_detect ignore_err -i & -c:v copy -c:a aac -b:a 96k -ac 2 -flush_packets 1 -fflags nobuffer -muxpreload 0 -muxdelay 0 -map 0 -f mpegts pipe:1#' /iptv.m3u
after parsing the list with this comman i add the automatic network and now the streams run flawlessly, maybe this can help someone having issues adding the iptv list.