-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for wasd.tv #2636
Comments
I attempted to do it myself and it was easier than I expected until I got to HLS part. |
Found stream with multiple resolution choices. And it works great, streamlink detects everything.
I expected to see multiple TL;DR: Plugin works better than I expected and no changes needed. |
On line 131 and 139 wasd.py need replace to be work (on python 2.7): |
closes #2636 Co-authored-by: back-to <backto@protonmail.ch>
closes streamlink#2636 Co-authored-by: back-to <backto@protonmail.ch>
closes streamlink#2636 Co-authored-by: back-to <backto@protonmail.ch>
closes streamlink#2636 Co-authored-by: back-to <backto@protonmail.ch>
There is 2 type of links. For example:
https://wasd.tv/channel/86692/videos/269793
https://wasd.tv/channel/86692
Both of them can be live stream or replay of past stream.
What I will say next is not confirmed by any documentation or anything its just how I think this website working.
For example user call streamlink for URL https://wasd.tv/channel/86692
Then we request
https://wasd.tv/api/media-containers?media_container_status=RUNNING&limit=1&offset=0&channel_id=86692&media_container_type=SINGLE,COOP
Response is in JSON format.
*I replaced
media_container_status=STOPPED,RUNNING
to justRUNNING
. I think if user calls streamlink without /videos/ part in URL he wants live stream. Not past record.If there is no live stream then response will be
{"result":[]}
From response we need
json["result"][0]["user_id"]
. For example this channel'suser_id=179599
Then we look into array
json["result"][0]["media_container_streams"]
and search for element wherejson["result"][0]["media_container_streams"][i]["user_id"]
is equals to channel'suser_id=179599
Then inside that element of array we get another element
json["result"][0]["media_container_streams"][i]["stream_media"]
which has different streams with different quality. For example:json["result"][0]["media_container_streams"][0]["stream_media"][0]["media_type"]="HLS"
json["result"][0]["media_container_streams"][0]["stream_media"][0]["media_status"]="RUNNING"
json["result"][0]["media_container_streams"][0]["stream_media"][0]["media_meta"]["media_current_resolution"]="1280x720"
json["result"][0]["media_container_streams"][0]["stream_media"][0]["media_meta"]["media_url"]="https://cdn.wasd.tv/live/179599/index.m3u8"
Now if user call streamlink for URL https://wasd.tv/channel/86692/videos/269793
We request https://wasd.tv/api/media-containers/269793
And its basically same response and we need to do same job here.
If this is live stream then in
json["result"][0]["media_container_streams"][0]["stream_media"]
array will be element withmedia_status="RUNNING"
If this is replay of past stream then in
json["result"][0]["media_container_streams"][0]["stream_media"]
array will be element withmedia_status="STOPPED"
And instead of
media_url
we need to getmedia_archive_url
which will be.m3u8
file.I have checked other plugins code and its too hard for me to make it myself.
I hope somebody will be able to do it with results of my "investigation".
The text was updated successfully, but these errors were encountered: