cvb941 / magiogo-iptv-server

Generates .m3u8 playlist and XMLTV guide from Magio GO TV subscription
13 stars 4 forks source link

Does not work on server in local network / public server #17

Closed sveco86 closed 1 year ago

sveco86 commented 1 year ago

Locally on my PC magiogo-iptv-server works, but I cannot make it working on local network server nor public server.

Server has no firewall running.

parameter used: export MAGIO_SERVER_PUBLIC_URL=192.168.0.5:5000

run by command: flask run --host=0.0.0.0

Webserver works, I can download playlist but VLC cannot open stream.

Playlist looks ok:

#EXTM3U
#EXTINF:-1 tvg-id="4099" tvg-logo="https://files.cdn.magio.tv/tv_logos/jednotka-hd.png",Jednotka HD
192.168.0.5:5000/channel/4099
#EXTINF:-1 tvg-id="4146" tvg-logo="https://files.cdn.magio.tv/tv_logos/dvojka-hd.png",Dvojka HD
192.168.0.5:5000/channel/4146
#EXTINF:-1 tvg-id="222002" tvg-logo="https://files.cdn.magio.tv/tv_logos/zaciname-s-voyo.png",Začíname s Voyo
192.168.0.5:5000/channel/222002
....

VLC errors: Your input can't be opened VLC is unable to open the MRL '192168.0.5:5000/channel/4222'. Check the log for details.

Error log:

main debug: VLC media player - 3.0.18 Vetinari
main debug: Copyright © 1996-2022 the VideoLAN team
main debug: revision 3.0.18-0-ge9eceaed4d
main debug: configured with /Users/d-fu/vlc-3.0/extras/package/macosx/../../../configure  '--prefix=/Users/d-fu/vlc-3.0/build-arm64/vlc_install_dir' '--enable-macosx' '--enable-merge-ffmpeg' '--enable-osx-notifications' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-shout' '--enable-ncurses' '--enable-twolame' '--enable-realrtsp' '--enable-libass' '--enable-macosx-avfoundation' '--disable-skins2' '--disable-xcb' '--disable-caca' '--disable-pulse' '--disable-sdl-image' '--disable-vnc' '--build=x86_64-apple-darwin19' '--host=aarch64-apple-darwin19' '--with-macosx-version-min=10.7' '--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' '--with-breakpad=https://mac.crashes.videolan.org' 'build_alias=x86_64-apple-darwin19' 'host_alias=aarch64-apple-darwin19' 'CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'CFLAGS=-g -arch arm64' 'LDFLAGS=-arch arm64' 'CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' 'CXXFLAGS=-g -arch arm64' 'OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'OBJCFLAGS=-g -arch arm64'
main debug: changing item without a request (current 77/120)
main debug: using item 78
main debug: starting playback of new item
main debug: resyncing on JOJ Cinema HD
main debug: JOJ Cinema HD is at 78
main debug: creating new input thread
main debug: Creating an input for 'JOJ Cinema HD'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using default timeshift path
main debug: `192.168.0.5:5000/channel/4237' gives access `192.168.0.5:5000' demux `channel/4237' path `'
main debug: creating demux: access='192.168.0.5:5000' demux='channel/4237' location='' file='(null)'
main debug: looking for access_demux module matching "192.168.0.5:5000": 14 candidates
main debug: no access_demux modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: creating access: 192.168.0.5:5000://
main debug: looking for access module matching "192.168.0.5:5000": 24 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/fetcher
main debug: no access modules matched
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/fetcher
main debug: dead input
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/art
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
main debug: no art finder modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/art
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
main debug: no art finder modules matched
main debug: changing item without a request (current 78/120)
main debug: using item 79
main debug: starting playback of new item
main debug: resyncing on Epic Drama HD
main debug: Epic Drama HD is at 79
main debug: creating new input thread
main debug: Creating an input for 'Epic Drama HD'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using default timeshift path
main debug: `192.168.0.5:5000/channel/4326' gives access `192.168.0.5:5000' demux `channel/4326' path `'
main debug: creating demux: access='192.168.0.5:5000' demux='channel/4326' location='' file='(null)'
main debug: looking for access_demux module matching "192.168.0.5:5000": 14 candidates
main debug: no access_demux modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: creating access: 192.168.0.5:5000://
main debug: looking for access module matching "192.168.0.5:5000": 24 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/fetcher
main debug: no access modules matched
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/fetcher
main debug: dead input
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/art
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
main debug: no art finder modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/art
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
main debug: no art finder modules matched
main debug: changing item without a request (current 79/120)
main debug: using item 80
main debug: starting playback of new item
main debug: resyncing on Filmbox HD
main debug: Filmbox HD is at 80
main debug: creating new input thread
main debug: Creating an input for 'Filmbox HD'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using default timeshift path
main debug: `192.168.0.5:5000/channel/4512' gives access `192.168.0.5:5000' demux `channel/4512' path `'
main debug: creating demux: access='192.168.0.5:5000' demux='channel/4512' location='' file='(null)'
main debug: looking for access_demux module matching "192.168.0.5:5000": 14 candidates
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: no access_demux modules matched
main debug: creating access: 192.168.0.5:5000://
main debug: looking for access module matching "192.168.0.5:5000": 24 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/fetcher
main debug: no access modules matched
main debug: dead input
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/art
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope) /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
main debug: no art finder modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/fetcher
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /Users/marek/Library/Application Support/org.videolan.vlc/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/lua/meta/art
lua debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/art
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/art/03_lastfm.luac
main debug: no art finder modules matched
main debug: changing item without a request (current 80/120)
cvb941 commented 1 year ago

Can you provide the logs from flask run --host=0.0.0.0 command? It may use a different port than 5000 by default. Also, is the 192.168.0.5 the address of the local network server (not the machine running VLC)?

sveco86 commented 1 year ago

192.168.0.5 is my server where is magiogo-iptv-server runing on, 192.168.0.70 is my PC address from where I running VLC.

Logs from server - I opened VLC and opened network stream http://192.168.0.5:5000/magioPlaylist.m3u8:

pi@rpiba:~/magiogo-iptv-server $ export MAGIO_SERVER_PUBLIC_URL=http://192.168.0.5:5000
pi@rpiba:~/magiogo-iptv-server $ flask run --host=0.0.0.0
Stream quality configured to: HIGH (p4)
Logging in to Magio Go TV
Generating .m3u8 playlist
Generating XMLTV guide
Refreshing finished!
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://192.168.0.5:5000
Press CTRL+C to quit
192.168.0.70 - - [18/May/2023 09:39:35] "GET / HTTP/1.1" 200 -
192.168.0.70 - - [18/May/2023 09:39:35] "GET /favicon.ico HTTP/1.1" 200 -
192.168.0.70 - - [18/May/2023 09:39:36] "GET /magioPlaylist.m3u8 HTTP/1.1" 200 -
192.168.0.70 - - [18/May/2023 09:39:50] "GET /magioPlaylist.m3u8 HTTP/1.1" 206 -

Screenshot of VLC: image

I would expect that m3u8 playlist will be expanded / opened to channels.

When I download playlist and open it in VLC as file, everything works as expected.

cvb941 commented 1 year ago

The setup looks fine. The server just redirects the clients to the stream URL, where some sort of protection may be going on Telekom side.

Have a look at xTeVe and set it up on your server, it can buffer the streams and restream it to clients, which should work. I use it like that.

sveco86 commented 1 year ago

with xTeVe everything works as expected, thank you