Hi,
when Germany switched to DVB T 2, I didn't want to buy new hardware and tried to use IPTV as my tvheadend network. In the following post I want to provide some tips, so that other people run into the same issues.
I assume you have installed tvheadend and added an IPTV network in configuration --> networks. If not, simply click "add" and choose "IPTV automatic network".
Getting the stream to work
What I did was to create a mux xyz_stream for each channel and then add a service xyz for each mux. The hard part was to get the live-stream url into the mux configuration. To do this I used a firefox addon called "Movie Download Helper", which can extract stream-urls from a website. I visited the websites which offered livestreams, startet the stream and extracted the url. I highly reccomend you find a way to get livestream-urls yourself because they change from time to time.
My idea was to use the extracted url and paste it into the url field in the mux basic settings. That worked fine but there was a catch.
The offset-problem
When I did my first recording I noticed that the timing was off by 30 minutes. It turned out that at the time German livestreams like ARD und ZDF were able to be delayed by 30 minutes on the website. For some reason programs like vlc played the stream at the current time but tvheadend started at the beginning of the stream, which was 30 minutes in the past. While looking for a workaround I looked at alternative stream urls and noticed that some urls had a dw=0 parameter added to the url. I added this parameter to my url and it worked! Tvheadend correctly used the end of the stream (current time). Don't ask me why, though...
(If you are not familiar with url parameters: The first parameter is added to a url by adding a ? and subsequent parameters are added using & so you will find both strings ?dw=0 and &dw=0 in the urls.)
The offset-problem again
After one year with my iptv livestream the German channel ARD allowed their livestream to be delayed by up to 2 hours. This also caused my dw=0 parameter to stop working, I assume because they changed the fundamental service. This was a tough nut to crack. In the tvheadend forum I read the suggestion to pipe the stream through ffmpeg. So I installed the package tools.ffmpeg-tools and piped the stream through ffmpeg as follows:
pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i <STREAM_URL> -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=<CHANNEL_NAME> -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
replace <STREAM_URL> and <CHANNEL_NAME> with your values.
This solved my offset problem and also fixes issues when vlc is able to play a url but tvheadend is not. So I highly recommend this method.
My config
The following list contains the channel-name, the url I extracted from the website and the string I used in the url field of the mux-config
#3Sat
Stream-URL: https://zdfhls18-i.akamaihd.net/hls/live/744751-b/dach/3/3.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://zdfhls18-i.akamaihd.net/hls/live/744751-b/dach/3/3.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=3Sat -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
#ARD Alpha
Stream-URL: http://livestreams.br.de/i/bralpha_germany@119899/master.m3u8
MUX-Config-URL: http://livestreams.br.de/i/bralpha_germany@119899/master.m3u8?dw=0
#ARD
Stream-URL: https://mcdn.daserste.de/daserste/de/master_3744.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://mcdn.daserste.de/daserste/de/master_3744.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=Das\ Erste -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
#ARTE
Stream-URL: http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_1_av-b.m3u8?sd=10&rebase=on
MUX-Config-URL: http://artelive-lh.akamaihd.net/i/artelive_de@393591/index_1_av-b.m3u8?sd=10&rebase=on&dw=0
#BR3
Stream-URL: http://livestreams.br.de/i/bfssued_germany@119890/master.m3u8
MUX-Config-URL: http://livestreams.br.de/i/bfssued_germany@119890/master.m3u8?dw=0
#KIKA
Stream-URL: https://kikade-lh.akamaihd.net/i/livetvkika_de@450035/index_3776_av-b.m3u8?sd=10&rebase=on
MUX-Config-URL: https://kikade-lh.akamaihd.net/i/livetvkika_de@450035/index_3776_av-b.m3u8?sd=10&rebase=on&dw=0
#MDR
Stream-URL: https://mdrsahls-lh.akamaihd.net/i/livetvmdrsachsenanhalt_de@513999/index_3776_av-b.m3u8?sd=10&rebase=on
MUX-Config-URL: https://mdrsahls-lh.akamaihd.net/i/livetvmdrsachsenanhalt_de@513999/index_3776_av-b.m3u8?sd=10&rebase=on&dw=0
#NDR
Stream-URL: https://ndrfs-lh.akamaihd.net/i/ndrfs_nds@430233/index_3776_av-b.m3u8?sd=10&rebase=on&id=
MUX-Config-URL: https://ndrfs-lh.akamaihd.net/i/ndrfs_nds@430233/index_3776_av-b.m3u8?sd=10&rebase=on&id=&dw=0
#Phoenix
Stream-URL: https://zdfhls19-i.akamaihd.net/hls/live/744752-b/de/5/5.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://zdfhls19-i.akamaihd.net/hls/live/744752-b/de/5/5.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=Phoenix -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
#RBB
Stream-URL: https://rbblive-lh.akamaihd.net/i/rbb_berlin@144674/index_5_av-p.m3u8?sd=10&rebase=on
MUX-Config-URL: https://rbblive-lh.akamaihd.net/i/rbb_berlin@144674/index_5_av-p.m3u8?sd=10&rebase=on&dw=0
#SWR
Stream-URL: https://swrbwhls-i.akamaihd.net/hls/live/667638-b/swrbwd/master_3776.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://swrbwhls-i.akamaihd.net/hls/live/667638-b/swrbwd/master_3776.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=SWR -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
#Tagesschau 24
Stream-URL: http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/index_3776_av-b.m3u8?sd=10&rebase=on
MUX-Config-URL: http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/index_3776_av-b.m3u8?sd=10&rebase=on&dw=0
#WDR
Stream-URL: http://wdr_fs-lh.akamaihd.net/i/wdrfs_weltweit@112033/index_3776_av-b.m3u8?sd=10&rebase=on
MUX-Config-URL: http://wdr_fs-lh.akamaihd.net/i/wdrfs_weltweit@112033/index_3776_av-b.m3u8?sd=10&dw=0&rebase=on
#ZDF
Stream-URL: https://zdf-hls-01.akamaized.net/hls/live/2002460-b/de/d5816a34295a1ca0decb1b56b697de53/5/5.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://zdf-hls-01.akamaized.net/hls/live/2002460-b/de/d5816a34295a1ca0decb1b56b697de53/5/5.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=ZDF -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
#ZDF Info
Stream-URL: https://zdfhls17-i.akamaihd.net/hls/live/744750-b/de/5/5.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://zdfhls17-i.akamaihd.net/hls/live/744750-b/de/5/5.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=ZDF\ Info -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
# ZDF Neo
Stream-URL: https://zdf-hls-02.akamaized.net/hls/live/2002461-b/de/a2d062bd57fe2bcc886bd8faf6a8ad0e/5/5.m3u8
MUX-Config-URL: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -re -i https://zdf-hls-02.akamaized.net/hls/live/2002461-b/de/a2d062bd57fe2bcc886bd8faf6a8ad0e/5/5.m3u8 -vcodec copy -acodec copy -metadata service_provider=Streams -metadata service_name=ZDF\ Neo -mpegts_service_type advanced_codec_digital_sdtv -f mpegts pipe:1
Display More