title: Java, serve HLS live video streams
body: <p>I know the topic is not an easy one, but I am looking for a Java class to send an HLS stream from the server to the client. </p>
  
  <p>I have files being generated greater and greater: </p>
  
  <pre><code>out.m3u8
  out0.ts
  out1.ts
  out2.ts
  out3.ts
  out4.ts
  out5.ts
  out6.ts
  </code></pre>
  
  <p>This is generated using ffmpeg from an original source: </p>
  
  <pre><code>ffmpeg -i http://sourceurl.com:9981/stream/channel/1232131 out.m3u8
  </code></pre>
  
  <p>I can play it using VLC. </p>
  
  <p>Somehow, I need to stream this <strong>live</strong> to the clients. </p>
  
  <p>At this point, I do not really care about different bit rates, i just want live streaming to work, in mobile browsers and on desktop browsers. </p>
  
  <p>I found this class: </p>
  
  <pre><code>https://github.com/Red5/red5-hls-plugin/blob/master/plugin/src/main/java/org/red5/stream/http/servlet/PlayList.java
  </code></pre>
  
  <p>Which might be doing something like that. </p>
  
  <p>I have pulled in hls.js into my application in hopes of using it for desktops. </p>
  
  <p>HLS should however work IOS devices without hls.js right now. </p>
  
  <p>How should one serve HLS content from the server? It's very difficult to find any good and simple example to do that. </p>
  
  <p><strong>Anyone knows of the steps needed to do that ?</strong> </p>
  
  <p>I've looked into Wowza and Red5 just a little bit, but unsure what they can provide for me at this stage and seems to be overly complicated to setup just to serve some files. But please explain to me why that's not the case. </p>