How do I create playlists/different bandwidth wit ffmpeg?
<p>I am trying to create a hls stream out of an .mp4 file. So far I can create a manifest + .ts files, but I don't have a playlist.m3u8 to deside which manfest I should give the users based on their bandwith. How do I do that?</p>

<p>Here is my current command which creates HLS streams (no playlist):</p>

<pre><code>ffmpeg -i test.mp4 -codec copy -vbsf h264_mp4toannexb -map 0 -f segment -segment_list out.m3u8 -segment_time 10 out%03d.ts
</code></pre>

<p>What this creates is out.m3u8:</p>

<pre><code>#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10, 
out.ts
#EXTINF:10, 
out.ts
</code></pre>

<p>What I want to create:</p>

<pre><code>#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=860000
low.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=512000
medium.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=160000
high.m3u8
</code></pre>