title: How do you display closed caption format of HLS video stream from an m3u8 URL
body: <p>I'm working on a Roku and TVOS app that is going to play HLS videos (VOD and live) as well as MP4.  According to the <a href="https://sdkdocs.roku.com/display/sdkdoc/Closed+Caption+Support" rel="nofollow noreferrer">Roku docs</a> EIA-608 is supported on both and should also work on TVOS.</p>
  
  <p>My question is, given URL to the <code>m3u8</code> how can I tell what specific format (EIA-608,WebVTT etc) of closed captioning is being used in each stream?</p>
  
  <p>Contents of the main <code>m3u8</code> (note 1st stream says no CC, but it really does have it):</p>
  
  <pre><code>#EXTM3U
  #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=380000,RESOLUTION=400x228,CODECS="avc1.66.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
  http://d.com/i/video/2426832/2426832_,350,640,1000,2000,.mp4.csmil/index_0_av.m3u8
  #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=750000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2",CLOSED-CAPTIONS=NONE
  http://d.com/i/video/2426832/2426832_,350,640,1000,2000,.mp4.csmil/index_1_av.m3u8
  #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1044000,RESOLUTION=1280x720,CODECS="avc1.64001f, mp4a.40.2",CLOSED-CAPTIONS=NONE
  http://d.com/i/video/2426832/2426832_,350,640,1000,2000,.mp4.csmil/index_2_av.m3u8
  #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2127000,RESOLUTION=1280x720,CODECS="avc1.64001f, mp4a.40.2",CLOSED-CAPTIONS=NONE
  http://d.com/i/video/2426832/2426832_,350,640,1000,2000,.mp4.csmil/index_3_av.m3u8
  </code></pre>
  
  <p>Contents of the 1st stream's <code>m3u8</code></p>
  
  <pre><code>#EXTM3U
  #EXT-X-TARGETDURATION:4
  #EXT-X-ALLOW-CACHE:YES
  #EXT-X-PLAYLIST-TYPE:VOD
  #EXT-X-VERSION:3
  #EXT-X-MEDIA-SEQUENCE:1
  #EXTINF:4.000,
  http://d.com/i/video/2426832/2426832_,350,640,1000,2000,.mp4.csmil/segment1_0_av.ts
  ...
  </code></pre>
  
  <p>I can use <code>ffprobe -hide_banner</code> to show the 1st program's stream has closed captioning.  Ex:</p>
  
  <pre><code>Duration: 00:02:36.76, start: 0.100511, bitrate: 0 kb/s
    Program 0
      Metadata:
        variant_bitrate : 380000
      Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 400x228 [SAR 1:1 DAR 100:57], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
      Metadata:
        variant_bitrate : 380000
      Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp, 48 kb/s
      Metadata:
        variant_bitrate : 380000
  </code></pre>
  
  <p>However, as you can see, Program 0 > Stream 0 just says that is has <code>Closed captions</code> - it does not list the type/spec of closed captioning technology being used.  </p>
  
  <p>How do I display the format of the <code>Closed Captions</code>?</p>