stb-proxy's Issues
Why there is a considerable delay for any stream to start compared to using STB portal directly
When switching channels using STB-Proxy, it takes about 4 or 5 seconds for channel to start working, this compared to when I'm using the STB portal directly, the channel switching takes less than 1 second.
It's probably my lack of understanding of this project, but I thought this was just a proxy that will redirect the original stream and that's all, if it's only doing that, I don't see why there is such delay in starting a stream. But then again I see FFmpeg as a dependency and I'm now wondering whether STB-proxy is doing any transcoding that is causing the dalay, if that's the case, can't you just server the streaming link exactly as you receive it from the STB portal?
is it possible to get the VOD m3u?
Yes and no. Unless somebody knows the URL to get all vods in one request I would have to get each "page" individually, which is about 14 vods at a time. Since a lot of servers have 500 pages or sometimes many more, that is a lot of requests to make which takes minutes to complete. If I run them all in parallel I found some providers would ban me.
Without knowing all of the different portal requests (I only know the ones other apps use by looking at wireshark), its difficult to know what the options are.
I can rework things like the webui so that each page, search etc is a separate request, but remember I am not a programmer and it looked way more complicated. I'd rather keep it as simple as possible. Besides that would be a lot of work and I don't care for vods.
Originally posted by @Chris230291 in #18 (comment)
It seems to be the right way to go though, a Kodi plugin written in Python that adds the ability to watch IPTV from MAC address based providers (Stalker Middleware) also goes through all the pages for VOD;
I also don't come across anything like a "get_all_channels" for VOD online.... The webpage below gives a lot of examples of requests & answers that can be sent;
https://www.quassi.nl/2020/03/23/the-wonderful-world-of-stalker-iptv-2
Hope that with both links I have helped you further with the goal of STB proxy to be a complete STB portal -> m3u proxy, I must agree with you there is limited explanation online about how the communication works ๐
Can the proxy run on a Raspberry Pi and/or on a decoder?
I'm struggling with docker on my raspberry pi to run the program:
"WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error"
Is it me that hasn't yet understood how docker works, or it just can't work on arm?
Thanks
Channel list loading; doesn't play
Channels list is loading but channels don't play on /player or /playlist
log file below
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi result = await app(self.scope, self.receive, self.send) File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 208, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 181, in __call__ raise exc from None File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__ raise exc from None File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 580, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 241, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 52, in app response = await func(request) File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 161, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "/usr/local/lib/python3.8/dist-packages/starlette/concurrency.py", line 40, in run_in_threadpool return await loop.run_in_executor(None, func, *args) File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "app.py", line 448, in channel return RedirectResponse(link) UnboundLocalError: local variable 'link' referenced before assignment
LICENSE
Under which licence do you want to publish your code?
I think it is important that you put a "LICENSE" file in the project.
I would recommend GPLv3 or a BSD licence if you want it to be even more liberal.
http://comag.rip:8000/c/
Format or MIME Type not found
Unlimited amount?
Allows you to share the same Stalker portal account on unlimited amount?
Flask crash when saving ! [BUG] [CRITICAL]
I assume there is a issue with some naming on the channels. when parsed to the paylist.
here is the logs.
- [25/Feb/2022 18:23:01] "POST /editor/save HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/flask/app.py", line 2091, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/lib/python3.9/site-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/app/app.py", line 261, in editorSave
portals[portal]["enabled channels"].append(channelId)
KeyError: None
i can share with you some access to the stb portal so you can test.
Installation method Docker.
Streams are not terminated properly with ffmpeg
In conjunction with ffmpeg, I often encounter the problem that streams continue to run even though the client has disconnected or switched to another channel. This leads to many connections being blocked over time.
Inside the shell of the docker container in which stb-proxy is running you can see the multiple ffmpeg processes and have to kill them manually.
@Chris230291 Are you aware of this behavior? Is there a fix to cleanly detect that the client has terminated the connection?
Reduce CPU usage of Stream
Hello,
I found out that CPU usage can be greatly reduced by changing the function to read and give back the ffmpeg result. Currently, it uses readline() function which searches the whole stream for the linebreak character (but in a stream linebreaks are more or less random and don't have a meaning) and probably creates rather small chunks. Thus I suggest du change the callback function in app.py from
for chunk in iter(ffmpeg_sb.stdout.readline, ""):
yield chunk
if ffmpeg_sb.poll() is not None:
break
to
chunk = ffmpeg_sb.stdout.read(10240)
if len(chunk) == 0:
break
yield chunk
to always read in large 10 kilobytes chunks.
On my small linux server this reduced the cpu usage of the python process from about 25% to 10%.
Streams not working
I have a question. My portal don't work. It makes connection I can see the playlist, epg but the streams don't work, can you help me?
I need help
I'm just a beginner and don't know how to run it. Can somebody help me?
Need Help
MAC lock in feature
Automatic testing (was: Cannot connect to a certain portal)
Thanks for opening this repo!
I cannot connect to this: http://iptv-line.com:7899/c/live4u
I'll try to dig into it asap, but if this helps for your development, please have a look at it
Expire in the Add portal is not there
There is no way to add anything under the expire column in the portal Add section. And because of that, the code fails.
File "app.py", line 146, in add
portals.append({"name": name, "url": url, "mac": mac, "proxy": proxy, "format": format, "expires": getExpires(
File "app.py", line 103, in getExpires
return expire
UnboundLocalError: local variable 'expire' referenced before assignment
Question on next steps for development
Hi,
I'm working on the tests.
During this, I might need to refactor some code to make it testable.
Concerning this, I have the following questions:
- May I rewrite your code in an object-oriented, strongly typed code? The methods itself will stay 99% as they are, but the surronding will be different
- I would like to modify the tool so that it connects directly to a portal when it is started and can be switched to another portal via the HTML interface, which can be selected from a list in the config file. This would have the advantage that the whole thing could be integrated as Docker in an automated, cloud-native environment.
- What do you think about us - in the medium term - installing an HTML5 video player as a web interface that can display the streams from /playlist directly in the browser?
Http proxy With auth support
Hi any Chance to add support for Proxy With user:pass ?
how is it working exactly cant find a doku
lets say eG 1
One Portal 3 macs. How to use for each Mac 11 Stream With 3 proxy
eg2
More macs than proxy use them twice and local ip ?
INFO: STBEMU authentication method on fire tv
I posted it in the other project but he referred me to this one.
Here is the info I collected on the stbemu app running on firetv on how to connect to my portal (glotv.me) and get the profile.
[https://github.com/erkexzcx/stalkerhek/issues/28](Stalkerhex link)
is it possible to get the VOD m3u?
Is it possible to get the vod part of the stalker portal in m3u?
Extract EPG from STB proxy
How do I get a xmltv link from the proxy server? I can make a m3u file but also want to add EPG.
add "on and off" toggle for each portal
Would be great to have an "on" and "off" toggle for each portal. Any chance you add it?
Not work
My problem:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/STBpNew/app.py", line 214, in editorSave
portals[portal]["enabled channels"].append(channelId)
KeyError: None
i'm click the save button to channel list and not work :\
M3U playlist instead of MAC
Hello, is possible to have something similar but instead of use MAC Address, we can use m3u playlist but sometimes provider only allow 1 connection and use fallback channel with ffmpeg to decide which line is free to tuner?. Thanks.
[Feature Request] Add Adult channels + some reverse and debugging on stalker portal code.
Hello @Chris230291 it will be nice to get the Adult channels as you can get it by requesting directly the genre, i use a proxy so i could watch the requests URL and this is the request parameters.
Error for playing some channels
`UnboundLocalError
UnboundLocalError: local variable 'cmd' referenced before assignment
Traceback (most recent call last)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/root/STB-Proxy/app.py", line 535, in channel
if "http://localhost/" in cmd:
UnboundLocalError: local variable 'cmd' referenced before assignment`
Facing this problem for few channels while all others are streaming well.
Check directories instead of single channels and autofallback based on channel name?
Just a request/suggestion
It would be very handy to have the chance to select and activate directly the directories containing the channels, instead of having to do it by hand.
( eg: UK, Sport, Germany, etc. )
It would be also nice to have a kind of "auto fallback" when the channels of different acconts/servers have the same name.
Do you think it would be possible?
Thanks!
filter channel by genre id and avoid update all playlist.
Hello, now the script when you add a new portal, its load the full channel list, and then in the editor you can filter what channel you want to display in the playlist.m3u, but does not delete the channel from been update again when one channel is requests, or playlist update, or when loading editor again, this makes that takes a little more time to requests channel or edit.
Is there a way by using portal.php?type=itv&action=get_ordered_list&genre=genreids&force_ch_link_check=&fav=0&sortby=number&hd=0&p=1&JsHttpRequest=1-xml
you can avoid update the channels that are filter off in the editor page?, this allow to the script only update or requests the genre id or group of channels that only the user wants. and reduce the respond time for play the channel, etc.
could be cool. Thanks.
Fallback channel
Could be possible activate a fallback channel when url main stream get 401 code or 503 code?
Thanks.
Please upload to docker the old version!!!
The new version doesn't work for me... :(
Is there a way to select all the channels in one shot?
I would like to import all the channels of the playlists, but I can select 100 in a row max. Any chanche to select them all directly?
Thank you!
None of the accounts tested OK
Iโm trying to connect to 737380b0lab.connect.co.cr:25461/c/ but Iโm getting an error when trying to add the portal. Portal works ok in STBEmu. Any guidance on how to fix it?
Set fallback channels
Set fallback channels means? sorry for my ignorance.
Thanks.
Vod?
Hello!
Can vod movies be made that way too? :)
Playlist editor lags out on very large playlist
Browsing the playlist editor in the browser lags out with portals that has thousands of channels in it. Also affects searching and exporting the playlist (not so much on playlist export, but still).
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
Previous script was working fine. New script gives this error while trying to run locally (not docker).
Traceback (most recent call last): File "app.py", line 33, in <module> retries = Retry(total=5, backoff_factor=0.2, status_forcelist=[500, 502, 503, 504], allowed_m ods=frozenset(['GET', 'POST'])) TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
Channel sorting
Can we get channel sorting feature, or at least an option to keep the channel order from original list.
Here's the deal.
If I have source list like this:
#EXTM3U
#EXTINF:-1 tvg-id="id-0000001" tvg-chno="0000001" group-title="GroupName",Channel B
#EXTINF:-1 tvg-id="id-0000002" tvg-chno="0000002" group-title="GroupName",Channel D
#EXTINF:-1 tvg-id="id-0000003" tvg-chno="0000003" group-title="GroupName",Channel A
#EXTINF:-1 tvg-id="id-0000004" tvg-chno="0000004" group-title="GroupName",Channel C
Once I run your proxy as a result this same list would give me end result like this:
#EXTM3U
#EXTINF:-1 tvg-id="id-0000003" tvg-chno="0000003" group-title="GroupName",Channel A
#EXTINF:-1 tvg-id="id-0000001" tvg-chno="0000001" group-title="GroupName",Channel B
#EXTINF:-1 tvg-id="id-0000004" tvg-chno="0000004" group-title="GroupName",Channel C
#EXTINF:-1 tvg-id="id-0000002" tvg-chno="0000002" group-title="GroupName",Channel D
So instead of keeping list sorted by channel number, all of the sudden we're getting list sorted by channel name.
Why is that a problem you might ask, well if I'm getting a list from my provider that is sorted is some meaningful order like:
- language 1
-- news channel A
-- news channel B
-- news ...
-- movie channel A
-- movie channel B
-- movie ...
-- sport channel A
-- sport channel B
-- sport ...
- language 2
-- ...
this right here makes perfect sense (to me).
However once you order those channels by name, all hell breaks loose. All of the sudden I have a list with all of the channel types mixed together without any meaningful order.
In the end, I have to reorder list manually, no matter how good or bad the source list is. Which can be tiresome for bigger lists
In TiviMate (which I'm using) there is an option to sort channel within group by different parameters
- by order in playlist
- by name (which is now basically obsolete since you already reordered list by name so this does the same thing like first option)
- some other options - but no ordering by channel number :(
I did try to manually update "enabled channels": []
prop within config.json
+ restart docker container, however that did not have any effect.
Other than that, great work with this repo. It's super easy to setup and most important works awesome.
Keep up the good work :D
HD Homerun for Plex
does not work. Plex do not find it
Media stops after start
Hello, I configured all settings and it was success to play channel all night, But after the next day, when I want play channels it show me the first 2 sec and then stop. I didnt change anything. just happend. I trying re installing but the same error, I tried in other docker server and the same issue, I changed some iptv providers and nothing work. When I play with stalker player on pc or tv these channel works perfect.
But why it worked for the first time pretty well?
thanks and have a good day.,
Problems with Plex channel / EPG ID length
Using STBPROXY as HDHomeRun with Plex have problems with EPG ID / channel id which is 38 characters, this causes the inability to manage favorite channels preventing them from being added or removed. (look at the attached images, the heart symbol is not visible for channels coming from STBProxy)
Another problem to report is in playback which both from PLEX and directly from the STBPROXY web interface often interrupts the streaming while for the same MAC from application like SFVIP the streaming has no interruptions. I tried modifying FFMpeg Command by adding
-drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 -attempt_recovery bool 1 -max_recovery_attempts 0 but nothing changes
Any idea to fix this proble? Is there a way to set a parameter to always repeat playback? thanks for your attention.
[request] Compressing video
As ffmpeg is involved, can you put an option to compress livestream to 480p or similar size for slower data speed connection?
[Feature Request OR Bug maybe?] Allow multiples occupations on mac.
Hello, in your previous code it was possible to add multiple occupations using same Mac could you, manage adding a way to allow multiple occupations again please, designed by parameters (5,10,20,unlimited) ?
And a way to terminate directly a stream/occupation also will be nice.
Session refresh
Stalkerhek has a watchdog, that calls a certain portal url every two minutes.
Is this needed? Will we ween that, too?
Need configurations instructions
What should I enter in Proxy and MAC
I am trying to configure glotv.me
Serial Number -- Authentication Failures
Certain providers appear to be using additional fields ... serial number and/or device IDs. Is there support? Perhaps they go into the cookies? Unclear on protocol or how to configure ... thanks!
Not playing to channels.
Hello i'm install this script and add my URL and MAC and generate /playlist.
I'm add this playlist to VLC but not work the channels :(
EPG not in xlmtv
hi sometimes the epg will not shown in /xmltv is this a known issue ?
feature idea
It would be good if the MAC addresses were automatically sorted by availability. The MAC addresses where no connection can be established after X attempts are automatically deleted. Is this easy to implement?
is there a way to watch multiple streams at the same time?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.