title: Retrieving m3u8 links for testing AWS streaming/subtitles
body: <p>I'm not sure if here is the best place for asking, but let me try.</p>
  
  <p>I've created a stack on AWS for live streaming with subtitles, based on this template: <a href="https://github.com/awslabs/live-streaming-with-automated-multi-language-subtitling" rel="nofollow noreferrer">https://github.com/awslabs/live-streaming-with-automated-multi-language-subtitling</a></p>
  
  <p>To be able to test it I need a valid m3u8 url as input.</p>
  
  <p>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.</p>
  
  <p>Cool, but how do I get the m3u8 link?
  After searching a bit I found a <a href="https://gist.github.com/baderj/8593472" rel="nofollow noreferrer">python script</a></p>
  
  <p>Tried it...and failed, reading the comments I found a way to change the code and make it work... apparently</p>
  
  <p>Cool, now I got my url</p>
  
  <p>Added it to AWS, didn't work, this <a href="https://videojs.github.io/http-streaming/" rel="nofollow noreferrer">player</a> failed to load with an error message: <strong>The media could not be loaded, either because the server or network failed or because the format is not supported.</strong></p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Did the same proceedings, and kept the working one as a fallback</p>
  
  <p>But can't make it work again, in any of these</p>
  
  <p>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 <strong>youtube-dl</strong></p>
  
  <p>Got a certificate error: ERROR: Unable to download webpage:  (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),))</p>
  
  <p>Tried a python utility called <a href="http://docs.livestreamer.io/plugin_matrix.html" rel="nofollow noreferrer">livestramer</a>
  Got another error: <strong>Unable to open URL: <a href="https://api.twitch.tv/api/channels/mychannel/access_token.json" rel="nofollow noreferrer">https://api.twitch.tv/api/channels/mychannel/access_token.json</a> (400 Client Error: Bad Request for url: <a href="https://api.twitch.tv/api/channels/mychannel/access_token.json?as3=t" rel="nofollow noreferrer">https://api.twitch.tv/api/channels/mychannel/access_token.json?as3=t</a>)</strong></p>
  
  <p>Tried a bunch of solutions, adding client-id header, didn't work</p>
  
  <p>Anyway, the former script seems to work and give me a m3u8 link, but it doesn't work at all now</p>
  
  <p>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</p>
  
  <p>Does anyone know how to fix it? Or maybe another website that I can easily broadcast myself and retrieve the m3u8 urls?</p>