Skip to content

plugins.mixcloud: new plugin #5096

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

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Conversation

mkbloke
Copy link
Member

@mkbloke mkbloke commented Jan 16, 2023

$ streamlink https://www.mixcloud.com/live/UrbanVybez best
[cli][info] Found matching plugin mixcloud for URL https://www.mixcloud.com/live/UrbanVybez
[cli][info] Available streams: 720p (worst, best)
[cli][info] Opening stream: 720p (hls)
[cli][info] Starting player: mpv
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

$ streamlink -j 'https://www.mixcloud.com/live/EnjoyableRadio/' | jq .metadata
{
  "id": "VXNlcjo0NDc5MzA0MA==",
  "author": "Enjoyable Radio",
  "category": null,
  "title": "'80s REWIND LIVE with Kev, Matt, and Grace : Playing Hits of the Eighties"
}

$ streamlink https://www.mixcloud.com/live/BeachyHeadRadio/
[cli][info] Found matching plugin mixcloud for URL https://www.mixcloud.com/live/BeachyHeadRadio/
[plugins.mixcloud][info] This stream has ended
error: No playable streams found on this URL: https://www.mixcloud.com/live/BeachyHeadRadio/

$ streamlink https://www.mixcloud.com/live/not-a-user
[cli][info] Found matching plugin mixcloud for URL https://www.mixcloud.com/live/not-a-user
[plugins.mixcloud][error] User not found
error: No playable streams found on this URL: https://www.mixcloud.com/live/not-a-user

closes #5080

Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looking good.
I had one of the streams refresh on their site though, so I don't know if there's some kind of expiration timeout of the HLS playlist.

@bastimeyer
Copy link
Member

I believe the stream I mentioned refreshed, because the channel is usually a 24h "radio" channel with occasional live mixes, so the author might have restarted the stream for that event. Been running the stream for half an hour now, and it seems fine.

@mkbloke
Copy link
Member Author

mkbloke commented Jan 17, 2023

Thanks.

I'll make the above changes and give it a longer running test also, then push if all is well.

@mkbloke
Copy link
Member Author

mkbloke commented Jan 17, 2023

I managed to get a little over an hour until the stream was ended by the streamer:

$ time streamlink 'https://www.mixcloud.com/live/evideonstudio/' best
[cli][info] Found matching plugin mixcloud for URL https://www.mixcloud.com/live/evideonstudio/
[cli][info] Available streams: 720p (worst, best)
[cli][info] Opening stream: 720p (hls)
[cli][info] Starting player: mpv
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (404 Client Error: Not Found for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (404 Client Error: Not Found for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (404 Client Error: Not Found for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (404 Client Error: Not Found for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (404 Client Error: Not Found for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (504 Server Error: Gateway Time-out for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8 (504 Server Error: Gateway Time-out for url: https://live-fsn1-hez.mixcloud.com/hls/10E248A8D180/1674161780/5PvmujPx52V3lvLGGHApCQ/a0721682-c012-4a20-8c73-185ed5c621bd/index-720p.m3u8)
[cli][info] Stream ended
error: Error when reading from stream: Read timeout, exiting
[cli][info] Closing currently open stream...

real	63m23.964s
user	6m4.081s
sys	5m20.957s

@bastimeyer
Copy link
Member

bastimeyer commented Jan 17, 2023

I had a stream running from 21:33 till 23:31 until the playlist turned into a 404 response. I was AFK though, so I don't know what happened.

@bastimeyer bastimeyer merged commit 7484f76 into streamlink:master Jan 18, 2023
@bastimeyer
Copy link
Member

Thanks

@mkbloke
Copy link
Member Author

mkbloke commented Jan 18, 2023

Thanks for merging.

I got a little over 5 hours on a stream I left running overnight. I notice though that the web client makes a GQL call every 10 seconds, which contains the stream URL in the returned data. I'll look into adding that to the plugin and submit another PR if it works better.

@mkbloke mkbloke deleted the mixcloud branch January 18, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixcloud Live
2 participants