I'm not sure if here is the best place for asking, but let me try.
I've created a stack on AWS for live streaming with subtitles, based on this template: https://github.com/awslabs/live-streaming-with-automated-multi-language-subtitling
To be able to test it I need a valid m3u8 url as input.
So I started looking around to find an easy way to broadcast myself and get a m3u8 link, Twitch appeared to be the simplest way to get it.
Cool, but how do I get the m3u8 link? After searching a bit I found a python script
Tried it...and failed, reading the comments I found a way to change the code and make it work... apparently
Cool, now I got my url
Added it to AWS, didn't work, this player failed to load with an error message: The media could not be loaded, either because the server or network failed or because the format is not supported.
After some attempts, restarting channels and so... somehow it started working, cool, maybe I just had to wait a bit? No idea how it started working.
Ok, tested a bit and it was working nicely, apart from a bit of lag So, I decided to create another CloudFormation stack, now including CloudFront.
Did the same proceedings, and kept the working one as a fallback
But can't make it work again, in any of these
I re-ran the script to get the new twtich link, didn't work I have tried to get any live streaming from youtube and extract it using youtube-dl
Got a certificate error: ERROR: Unable to download webpage: (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),))
Tried a python utility called livestramer Got another error: Unable to open URL: https://api.twitch.tv/api/channels/mychannel/access_token.json (400 Client Error: Bad Request for url: https://api.twitch.tv/api/channels/mychannel/access_token.json?as3=t)
Tried a bunch of solutions, adding client-id header, didn't work
Anyway, the former script seems to work and give me a m3u8 link, but it doesn't work at all now
Adding the no-cloudfront link, it seems that it is loaded, but I only get a black screen. The Cloudfront one fails even to load, giving the same error as before
Does anyone know how to fix it? Or maybe another website that I can easily broadcast myself and retrieve the m3u8 urls?
I'have used streamlink instead and it works like charm
How to use to retrieve the m3u8 url:
streamlink --stream-url https://www.twitch.tv/username best