-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Suggestion: Allow individual limits per m3u stream. #4
Comments
This is still a WIP but do you mind helping me test the dev build with this image: You should be able to set the maximum stream limits with the M3U_MAX_CONCURRENCY_X (M3U_MAX_CONCURRENCY_1, M3U_MAX_CONCURRENCY_2, etc. corresponding to M3U_URL_X) env variables. There are some breaking changes as well behind the scenes so expect that the databases made by the previous versions won't be compatible anymore. |
Awesome, I will aim to have a look at this before the weekend is over, do you have a discord? might make comms a little easier. |
I have tested it out, setting each stream to have a max concurrency of 1 for the moment, only using streams that support a max of 1 user per m3u. if I load channel A on device A, it works perfectly fine, I then load channel B on device B, but when I do, it behaves almost like it is still trying to play from the same playlist. To help with testing, could you add a log output for what stream number is being selected? I can then confirm for sure if it is only loading from a m3u. |
Can you try |
OK, so I tried this, took a little while longer as it had a log entry for every channel being added, but the final log entries appeared to be a crash. i think there may be a few too many logs being generated now though as they rapidly got lost in a wall of text. Would there be any chance of removing the log entries when adding a url to the database for the moment? |
Try it again now. Added a You should be getting something like |
panic: runtime error: index out of range [1] with length 1 goroutine 12 [running]: This is the error that I received. |
Seems like a bug within the parser. Can you try it again? I did some workarounds that might work. If it still won't work, I'll need to see the format of the problematic line in the m3u file. At that point, it will be better for you to set |
OK, so it would appear that the issue is with an unexpected EOF. |
I added auto-retry when unexpected EOF is detected with |
I've had multiple small releases since |
I have just tried the most recent version and the m3u is now coming back as blank, pr-12 did work but the counters were a bit off, my aim was to update and test further. |
I reverted back to pr-12 and i have a working merged m3u again. |
My bad! I messed up the previous release. The |
Thank you, I have just tested, the m3u works now, but I get the following error when I try to play anything 2024/03/06 22:19:01 Received request from :50128 for URL: /stream/VUsgLSBCQkMgMSBVSEQ=.mp4 |
Another build has been released. The memdb panic should be fixed now. |
Thank you, it seems to be playing now, 2024/03/06 23:01:55 Received request from :46488 for URL: /stream/VUsgLSBCQkMgMSBVSEQ=.mp4 I will keep you posted as i try it out. |
OK so I have 4 playlists configured. Connected first device and started playing, everything seemed ok. 2024/03/06 23:01:55 Received request from :46488 for URL: /stream/VUsgLSBCQkMgMSBVSEQ=.mp4 |
Can you try it with the |
OK, from what I have tried with the dev tag, that seems much better, it seems to be using each playlist accordingly. One thing i did notice initially was that it would always cycle through 4, 3, 2, 1 in that order when selecting the m3u to load from. Say I had a max concurrency of 3 on playlist 4, and a max concurrency of 1 on the other 3 playlists, given the way it cycles, would it be the case that it would use up all 3 streams on playlist 4 before trying the other 3 playlists? The other thing it might be handy to have currenly is a log output at regular timed intervals just printing how many active connections the app believes it has, as I will be able to more accurately test if the counter is working as expected. |
Good catch. That is definitely not by design. I'll have to fix that.
Currently, yes. I was thinking of implementing round robin load balancing but wanted to make sure the concurrency limit feature worked first. I'll have it on the next release.
Sure. I'll add this as another env var option. |
Awesome, thank you, it would also be nice to be able to specify the time for updating the playlist rather than have it happen at a timed interval based on when the container is started, shall i submit a separate suggestion for this? I am more than happy to continue testing too, keep up the awesome work. |
No problem! I'd appreciate it if you create a different issue for each of the suggestions, including the bugs you found (reversed order, etc.) just so I can track things better. On that note, I'll be closing this issue now. |
Can I provide a suggestion? It would be absolutely amazing if you could set a max simultaneous stream limit per playlist.
An example would be the ability to give one of the streams a maximum of 3 users, while another one a maximum of one user, it would then be great to be able to merge those playlists into a single one that can support 4 simultaneous streams, with the 5th attempt to connect either redirecting to some 'catch all' stream, or just refusing to connect entirely. Not sure how easy it would be to implement though to be honest.
The text was updated successfully, but these errors were encountered: