title: Gstreamer HLSSink Pipeline Displays Black Frames in Safari
body: <p><strong>This <code>get-launch-1.0</code> command line pipeline</strong>: <code>gst-launch-1.0 videotestsrc num-buffers=680 ! x264enc ! mpegtsmux ! hlssink location=junk2.%05d.ts playlist-location=junk2.m3u8</code></p>
  
  <p><strong>This server</strong>: <code>python -m SimpleHTTPServer 8000</code></p>
  
  <p><strong>This local url on Mac OS X Safari</strong>: <a href="http://localhost:8000/junk2.m3u8" rel="nofollow noreferrer">http://localhost:8000/junk2.m3u8</a></p>
  
  <p>Appears to play in local Safari browser, but displays black frames. Why?</p>
  
  <p>Note: python console output looks pretty happy, so all the paths are correct:</p>
  
  <pre><code>$ python -m SimpleHTTPServer 8000
  Serving HTTP on 0.0.0.0 port 8000 ...
  127.0.0.1 - - [25/Apr/2018 11:40:34] "GET /junk2.m3u8 HTTP/1.1" 200 -
  127.0.0.1 - - [25/Apr/2018 11:40:34] "GET /junk2.m3u8 HTTP/1.1" 200 -
  127.0.0.1 - - [25/Apr/2018 11:40:34] "GET /junk2.00001.ts HTTP/1.1" 200 -
  127.0.0.1 - - [25/Apr/2018 11:40:34] "GET /junk2.00000.ts HTTP/1.1" 200 -
  </code></pre>
  
  <p>Note: Also tried various options to the hlssink plugin without changes in behavior:</p>
  
  <ul>
  <li><code>target-duration=2</code></li>
  <li><code>max-files=0</code></li>
  <li><code>playlist-length=0</code></li>
  </ul>
  
  <p><strong>Other Players</strong>: Plays and displays correctly in VLC:
  <a href="https://i.stack.imgur.com/Ajynq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ajynq.png" alt="VLC Playback"></a></p>