I was struggling with this problem today, as im new to tvheadend im setuping it now for a week, fine-tuning everything (replacing mythtv)
My problem was just the same, missing sound caching all time etc.. and WORSEST putting recording on and watch it same time it make tvheadend crash!!
I came across this software called streamlink, it suppose to make hls streams usable with any software and it supports pipe.
Also i was struggling how to get it working but finally after reading and researching i found an answer.
first install the software, if you have newest ubuntu 18 just use
sudo apt install streamlink
create a script (you need do this, it will not work direct):
nano /opt/streamlink.sh
#!/bin/bash
streamlink --stdout --hds-segment-threads 3 "$1" best
After edit use command
chmod 755 nano /opt/streamlink.sh
Go to the mux and *replace the pipe command with pipe:///opt/streamlink.sh http://your_url.m3u*
Be aware, setup those settings well on your system. read documents of streamlink. you might take look of threads and "best" what they mean.. tuning streamlink will improve the quality of stream but it will need more bandwidth..
to check if it work open TOP and see if streamlink is there when you select the channel on live-tv. Recording works also. done test record over one hour without any problems...
Reason why im answering this post, is spend many hours looking for answer on this problem, hope this help others as well.
So if ppl have breaking up streams or buffering problems, you can try pipeing to other software what is meant to that specific stream. you can do this to other types of streams as well as long they work on linux, they can put work on tvheadend some way..