Thanks for the replies.
Just for reference, I'm running HTS Tvheadend 4.1.2415 ~ LibreELEC Tvh-addon v8.1.109
I tried the bash script but could not get the stream to start even without the wget.
I put the script here:
/storage/.kodi/userdata/addon_data/service.tvheadend42/scripts/ESPN.sh
I changed the permissions to 755.
ESPN.sh looks like this:
#/bin/bash
/usr/bin/ffmpeg -loglevel fatal -i http://192.168.1.200:54479/directvnow-354a29a9b1f3da2dd0d49e93644ffdd5/main.m3u8 -c copy -flags +global_header -strict -2 -metadata service_provider=ESPN -metadata service_name=ESPN -f mpegts pipe:1
In Configuration >> DVB inputs >> Muxes I have the following for URL.
URL: pipe:///storage/.kodi/userdata/addon_data/service.tvheadend42/scripts/ESPN.sh
Is there anything additional I need to do?
-------------------------------------------
I tried all three of the timeouts but none of them worked.
-timeout would only work if the stream already existed. I opened the channel once and it would fail but the second time it would succeed.
Here is the log when I try -stimeout
2017-04-13 18:38:08.597 mpegts: ESPN2 in IPTV Automatic Network - tuning on IPTV
2017-04-13 18:38:08.603 subscription: 000C: "192.168.1.200 [ | Kodi Media Center ]" subscribing on channel "HGTV_ServiceName", weight: 150, adapter: "IPTV", network: "IPTV Automatic Network", mux: "ESPN2", service: "ESPN2_ServiceName", profile="htsp", hostname="192.168.1.200", username="192.168.1.200", client="Kodi Media Center"
2017-04-13 18:38:08.603 spawn: Executing "/usr/bin/ffmpeg"
2017-04-13 18:38:08.711 spawn: Option stimeout not found.
2017-04-13 18:38:08.715 iptv: stdin pipe unexpectedly closed: No data
2017-04-13 18:38:18.597 subscription: 000C: service instance is bad, reason: No input detected
-listen_timeout would only work if the stream already existed. Same result as -timeout.