This may not even be related to tvheadend but it's been frustrating the hell out of me for days so figured I'd post it here anyway just in case someone else has run into this problem.
When I open an HD stream remotely outside my network using the tvheadend web interface and watch it with VLC, I'm only getting about 400-500 KB/s upload speed from my tvheadend server at home so it barely plays and is choppy as hell. SD streams are usually fine but they hover between 300-500 KB/s anyway. I can log into my router and view the statistics as it streams. My ISP is Spectrum in the US and my plan is 400 Mb/s down and 20 Mb/s up, when doing a speed test I get about 480 Mb/s down and 25 Mb/s up. Now if I just watch a video from my home NAS server remotely and monitor my router I'm able to max out the upload speed provided by my ISP, about 3000 KB/s. It's only the tvheadend stream that is a problem (HTSP). My remote connection is 200Mb/s down and 100 Mb/s up.
When streaming from tvheadend WITHIN my network, everything works fine, HD comes in nice and clear even over WiFi, monitoring the router traffic the data stream is where it should be as far as throughput. From these tests it seems to rule out any issues between my tvheadend server and my router.
My tvheadend server is running as a backend to kodi on a rockhip 3288 board with 4GB of RAM. I'v just bought a second router to see if that's the problem. Original router was an ASUS RT-AC3200, I then upgraded to an ASUS RT-AX88U router, same problem. Now I've bought a Linksys WRT3200ACM thinking maybe if I changed brands that would solve it. Same issue.
Please if anyone has any input I'd love to hear it.
Edit: Also when I look at system information within libreelec on kodi as the stream is playing, everything looks good. There's no CPU or memory issues.
2nd Edit: I forgot to mention, the same type of throttling behavior happens when streaming a prerecorded HD broadcast remotely as well.