Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring Telly & Tvheadend M3U as the source #282

Open
matej86 opened this issue Dec 8, 2020 · 4 comments
Open

Configuring Telly & Tvheadend M3U as the source #282

matej86 opened this issue Dec 8, 2020 · 4 comments

Comments

@matej86
Copy link

matej86 commented Dec 8, 2020

Hello,

I have a problem configuring Telly. The source of both m3u and epg is my tvheadend server. Both Tvheadend and Telly are running on the same machine on my home network.

This is my telly config file:

`
[Discovery]
Device-Auth = "telly123"
Device-ID = 12345678
Device-UUID = ""
Device-Firmware-Name = "hdhomeruntc_atsc"
Device-Firmware-Version = "20150826"
Device-Friendly-Name = "telly"
Device-Manufacturer = "Silicondust"
Device-Model-Number = "HDTC-2US"
SSDP = true

[IPTV]
Streams = 2
Starting-Channel = 10000
XMLTV-Channels = true
FFMpeg = true

[Log]
Level = "info"
Requests = true

[Web]
Base-Address = "192.168.3.3:6077"
Listen-Address = "0.0.0.0:6077"

[[Source]]
Name = ""
Provider = "Custom"
M3U = "http://192.168.3.3:9981/playlist/channels.m3u"
EPG = "http://192.168.3.3:9981/xmltv/channels.xml"

##Filter = "YOUR_FILTER_REGULAR_EXPRESSION"
##FilterKey = "group-title"
##FilterRaw = false
##Sort = "group-title"
`

This is the error I get every time I start telly by issuing the command " ./telly"

INFO[2020-12-08T11:17:50+01:00] telly is preparing to go live (version=1.1.0.8, branch=dev, revision=96424a4719f33de9c1b66d8d2186e0452e45a234) INFO[2020-12-08T11:17:50+01:00] Loading M3U from http://192.168.3.3:9981/playlist/channels.m3u INFO[2020-12-08T11:17:50+01:00] Loading XMLTV from http://192.168.3.3:9981/xmltv/channels.xml ERRO[2020-12-08T11:17:50+01:00] Could not decode xmltv programme error="expected element type <tv> but have <HTML>" ERRO[2020-12-08T11:17:50+01:00] error when parsing EPG error="expected element type <tv> but have <HTML>" ERRO[2020-12-08T11:17:50+01:00] error when preparing provider error="expected element type <tv> but have <HTML>" ERRO[2020-12-08T11:17:50+01:00] error when processing provider error="expected element type <tv> but have <HTML>" INFO[2020-12-08T11:17:50+01:00] telly is live and on the air! INFO[2020-12-08T11:17:50+01:00] Broadcasting from http://192.168.3.3:6077/ INFO[2020-12-08T11:17:50+01:00] EPG URL: http://192.168.3.3:6077/epg.xml INFO[2020-12-08T11:17:50+01:00] Lineup JSON: http://192.168.3.3:6077/lineup.json

@matej86 matej86 changed the title Telly & Tvheadend Configuration - Could not decode xmltv programme error="expected element type <tv> but have <HTML>" Telly & Tvheadend Configuration Dec 8, 2020
@matej86 matej86 changed the title Telly & Tvheadend Configuration Telly & Tvheadend Source Configuration Dec 8, 2020
@matej86 matej86 changed the title Telly & Tvheadend Source Configuration Configuring Telly & Tvheadend as Source Dec 8, 2020
@matej86 matej86 changed the title Configuring Telly & Tvheadend as Source Configuring Telly & Tvheadend as the source Dec 8, 2020
@matej86 matej86 changed the title Configuring Telly & Tvheadend as the source Configuring Telly & Tvheadends M3U as the source Dec 8, 2020
@matej86 matej86 changed the title Configuring Telly & Tvheadends M3U as the source Configuring Telly & Tvheadend M3U as the source Dec 8, 2020
@chazlarson
Copy link
Contributor

chazlarson commented Dec 8, 2020

The problem seems clear: expected element type <tv> but have <HTML>.

What do you get when you retrieve http://192.168.3.3:9981/xmltv/channels.xml? It should be an XML document, but it appears to be an HTML document.

@matej86
Copy link
Author

matej86 commented Dec 9, 2020

Hi,

If I retrive http://192.168.3.3:9981/xmltv/channels.xml I get an error in the browser "400 Bad Request"

Everytime I enter http://192.168.3.3:9981/xmltv and press Enter I get the following page. As you can see, the URL changes into http://192.168.3.3:9981/xmltv/channels

epg01

epg02

Moreover, with the M3u happens something similar: when I enter http://192.168.3.3:9981/playlist browser asks me to download the file "channels" without the extension .m3u and the URL I see is http://192.168.3.3:9981/playlist/channels. Then I need to rename manualy "channels" file into "channels.m3u"

How could I solve this problem?

Thank you

@chazlarson
Copy link
Contributor

chazlarson commented Dec 9, 2020

telly is trying to retrieve http://192.168.3.3:9981/xmltv/channels.xml, and as you're seeing that URL returns an error, probably wrapped in HTML. telly then tries to interpret that HTML as an EPG file, resulting in the error you see. The m3u link is doing the same thing, I imagine. Where did those links come from? Is TVHeadend telling you to use URLs that don't exist?

try replacing this:

M3U = "http://192.168.3.3:9981/playlist/channels.m3u"
EPG = "http://192.168.3.3:9981/xmltv/channels.xml"

with

M3U = "http://192.168.3.3:9981/playlist/channels"
EPG = "http://192.168.3.3:9981/xmltv/channels"

in your config, since those are the URLs that apparently return the data that telly needs.

You may be able to use:

M3U = "http://192.168.3.3:9981/playlist"
EPG = "http://192.168.3.3:9981/xmltv"

but offhand I can't recall if telly will work with the redirect that's apparently happening.

@matej86
Copy link
Author

matej86 commented Dec 10, 2020

Hi,

I modified the config file as per your advice:

matej@server:$ cd telly
matej@server:
/telly$ ls
telly telly.config.toml TV.m3u
matej@server:~/telly$ sudo nano telly.config.toml

`
[Discovery]
Device-Auth = "telly123"
Device-ID = 12345678
Device-UUID = ""
Device-Firmware-Name = "hdhomeruntc_atsc"
Device-Firmware-Version = "20150826"
Device-Friendly-Name = "telly"
Device-Manufacturer = "Silicondust"
Device-Model-Number = "HDTC-2US"
SSDP = true

[IPTV]
Streams = 2
Starting-Channel = 10000
XMLTV-Channels = true
FFMpeg = true

[Log]
Level = "info"
Requests = true

[Web]
Base-Address = "192.168.3.3:6077"
Listen-Address = "0.0.0.0:6077"

[[Source]]
Name = ""
Provider = "Custom"
M3U = "http://192.168.3.3:9981/playlist"
EPG = "http://192.168.3.3:9981/xmltv"

##Filter = "YOUR_FILTER_REGULAR_EXPRESSION"
##FilterKey = "group-title"
##FilterRaw = false
##Sort = "group-title"
`

When I run Telly I get the following log:

matej@server:~/telly$ ./telly
INFO[2020-12-10T10:33:54+01:00] telly is preparing to go live (version=1.1.0.8, branch=dev, revision=96424a4719f33de9c1b66d8d2186e0452e45a234)
INFO[2020-12-10T10:33:54+01:00] Loading M3U from http://192.168.3.3:9981/playlist
Unsolicited response received on idle HTTP channel starting with "HTTP/1.1 302 Found\r\nServer: HTS/tvheadend\r\nCache-Control: no-cache\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\nContent-Length: 143\r\n\r\n\r\n\r\n<TITLE>302 Found</TITLE>\r\n\r\n

302 Found

\r\n\r\n"; err=
INFO[2020-12-10T10:33:54+01:00] Loading XMLTV from http://192.168.3.3:9981/xmltv
Unsolicited response received on idle HTTP channel starting with "HTTP/1.1 302 Found\r\nServer: HTS/tvheadend\r\nCache-Control: no-cache\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\nContent-Length: 143\r\n\r\n\r\n\r\n<TITLE>302 Found</TITLE>\r\n\r\n

302 Found

\r\n\r\n"; err=
INFO[2020-12-10T10:33:54+01:00] Loaded 36 channels into the lineup from
INFO[2020-12-10T10:33:54+01:00] telly is live and on the air!
INFO[2020-12-10T10:33:54+01:00] Broadcasting from http://192.168.3.3:6077/
INFO[2020-12-10T10:33:54+01:00] EPG URL: http://192.168.3.3:6077/epg.xml
INFO[2020-12-10T10:33:54+01:00] Lineup JSON: http://192.168.3.3:6077/lineup.json

Accessing http://192.168.3.3:6077/lineup.json I see the following:

image

Accessing http://192.168.3.3:6077/epg.xml I see the following:

image

Now I can play the channels into VLC but it takes a lot of time in order to start playing. Here is the log. I see some errors... I don't know if they are from telly or ffmpeg

INFO[2020-12-10T11:07:11+01:00] Serving channel number 10001                 
INFO[2020-12-10T11:07:11+01:00] Remuxing stream with ffmpeg                  
INFO[2020-12-10T11:07:11+01:00] ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers 
INFO[2020-12-10T11:07:11+01:00]   built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)  
INFO[2020-12-10T11:07:11+01:00]   configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared 
INFO[2020-12-10T11:07:11+01:00]   libavutil      56. 31.100 / 56. 31.100     
INFO[2020-12-10T11:07:11+01:00]   libavcodec     58. 54.100 / 58. 54.100     
INFO[2020-12-10T11:07:11+01:00]   libavformat    58. 29.100 / 58. 29.100     
INFO[2020-12-10T11:07:11+01:00]   libavdevice    58.  8.100 / 58.  8.100     
INFO[2020-12-10T11:07:11+01:00]   libavfilter     7. 57.100 /  7. 57.100     
INFO[2020-12-10T11:07:11+01:00]   libavresample   4.  0.  0 /  4.  0.  0     
INFO[2020-12-10T11:07:11+01:00]   libswscale      5.  5.100 /  5.  5.100     
INFO[2020-12-10T11:07:11+01:00]   libswresample   3.  5.100 /  3.  5.100     
INFO[2020-12-10T11:07:11+01:00]   libpostproc    55.  5.100 / 55.  5.100     
INFO[2020-12-10T11:07:13+01:00] [h264 @ 0x5643d853b800] SPS unavailable in decode_picture_timing 
INFO[2020-12-10T11:07:13+01:00] [h264 @ 0x5643d853b800] non-existing PPS 0 referenced 
INFO[2020-12-10T11:07:13+01:00] [h264 @ 0x5643d853b800] SPS unavailable in decode_picture_timing 
INFO[2020-12-10T11:07:13+01:00] [h264 @ 0x5643d853b800] non-existing PPS 0 referenced 
INFO[2020-12-10T11:07:13+01:00] [h264 @ 0x5643d853b800] decode_slice_header error 
INFO[2020-12-10T11:07:13+01:00] [h264 @ 0x5643d853b800] no frame!

                       =same log= and then it plays

INFO[2020-12-10T11:07:16+01:00] Input #0, mpegts, from 'http://192.168.3.3:9981/stream/channelid/286806532?ticket=184D9A82E791A2D8E873EB840D9C4B91ED65032E&profile=pass': 
INFO[2020-12-10T11:07:16+01:00]   Duration: N/A, start: 19083.237600, bitrate: N/A 
INFO[2020-12-10T11:07:16+01:00]   Program 3402                               
INFO[2020-12-10T11:07:16+01:00]     Metadata:                                
INFO[2020-12-10T11:07:16+01:00]       service_name    : Rai 2 HD             
INFO[2020-12-10T11:07:16+01:00]       service_provider: Rai                  
INFO[2020-12-10T11:07:16+01:00]     Stream #0:0[0x1f6]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc 
INFO[2020-12-10T11:07:16+01:00]     Stream #0:1[0x25a](ita): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s 
INFO[2020-12-10T11:07:16+01:00]     Stream #0:2[0x264](oth): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 448 kb/s 
INFO[2020-12-10T11:07:16+01:00]     Stream #0:3[0x26e](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s 
INFO[2020-12-10T11:07:16+01:00]     Stream #0:4[0x238](ita,ita,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250 
INFO[2020-12-10T11:07:16+01:00] Output #0, mpegts, to 'pipe:1':              
INFO[2020-12-10T11:07:16+01:00]   Metadata:                                  
INFO[2020-12-10T11:07:16+01:00]     encoder         : Lavf58.29.100          
INFO[2020-12-10T11:07:16+01:00]     Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc 
INFO[2020-12-10T11:07:16+01:00]     Stream #0:1(ita): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s 
INFO[2020-12-10T11:07:16+01:00] Stream mapping:                              
INFO[2020-12-10T11:07:16+01:00]   Stream #0:0 -> #0:0 (copy)                 
INFO[2020-12-10T11:07:16+01:00]   Stream #0:1 -> #0:1 (copy)                 
INFO[2020-12-10T11:07:16+01:00] Press [q] to stop, [?] for help              
INFO[2020-12-10T11:07:17+01:00] frame=   95 fps=0.0 q=-1.0 size=    3907kB time=00:00:05.28 bitrate=6050.9kbits/s speed=9.81x     
INFO[2020-12-10T11:07:17+01:00] frame=  111 fps=101 q=-1.0 size=    4821kB time=00:00:05.92 bitrate=6661.0kbits/s speed=5.38x     
INFO[2020-12-10T11:07:18+01:00] frame=  120 fps= 75 q=-1.0 size=    5646kB time=00:00:06.28 bitrate=7354.7kbits/s speed=3.92x           

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants