HLS problems with v1.18 (or "How to not get viewer count of a path?") #5764
-
QuestionWith the update to v1.18, the way HLS streams work was modified. It's now requiring a cookie. A while ago, I asked in discussion #2881 how to get the viewer's count, and I was redirected to an issue that said the was no way: #962 (comment). Back then, I made a simple Flask server which acted as a proxy and counted the views by generating random strings appended to the m3u8 files (so, instead of Unfortunately, this broke with v1.18. Not only that, but HLS is being more unfriendly with reverse proxies. That 302 answer is redirecting to the wrong address, ignoring the reverse proxy that redirects the request for The v1.18.0 notes has the following: Here are my questions:
And thank you for creating and making this software available, I've been using it near hassle free for more than 2 years now. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hello, when we plan updates that change something in how protocols are implemented, we first identify existing use cases and evaluate the impact that the update might have on each of them. The new HLS session system was found to be compatible with the great majority of them. The integration you described is way too custom not to be affected by any major or minor server upgrade, and my advice is to replace it with the new HLS session system, which solves the exact problem you were trying to solve with the custom implementation, which is tracking readers. Regarding the 302 redirect issue that arises when hosting the server behind a proxy in a subfolder, MediaMTX always required some criteria to be satisfied by proxies, including changing the If you still want to disable the new HLS session system completely, you can make your proxy to be recognized as a CDN by MediaMTX, by filling the |
Beta Was this translation helpful? Give feedback.
-
|
The approach of the Theoretically, the m3u8 from multiple MediaMTX paths can be added to the master playlist (so each MediaMTX path would be a "variant"), requiring to generate only one file outside and all others would work fine directly from MediaMTX (making everything simpler). It would be master m3u8 (currently generated outside) -> MediaMTX variant (the Unfortunately, because of issues with At this point the problem is more with |
Beta Was this translation helpful? Give feedback.
Hello, when we plan updates that change something in how protocols are implemented, we first identify existing use cases and evaluate the impact that the update might have on each of them. The new HLS session system was found to be compatible with the great majority of them.
The integration you described is way too custom not to be affected by any major or minor server upgrade, and my advice is to replace it with the new HLS session system, which solves the exact problem you were trying to solve with the custom implementation, which is tracking readers.
Regarding the 302 redirect issue that arises when hosting the server behind a proxy in a subfolder, MediaMTX always required some criteri…