title: How to get ffmpeg to output hls with multiple resolutions?
body: <p>I'm trying to switch my ffmpeg command from outputting a single mp4 to outputting hls files for 1080p, 2k, and 4k.</p>
  <p>Here's the mp4 command that currently works:<br />
  <code>ffmpeg.exe -y -framerate 50 -i 1.%09d.jpg.blurred.png -framerate 50 -i 2.%09d.jpg.blurred.png -i input.mp4  -filter_complex &quot;[0:v]v360=equirect:equirect:yaw=180 [s1],[1:v]v360=equirect:equirect:yaw=90 [s2],[s1][s2]overlay [ovr1],[ovr1]scale=3840:1920 [ovr2],[2:v]scale=3840:1920 [ovr3],[ovr3][ovr2]overlay&quot; -c:v libx264 -crf 17 -r 50 -profile:v high -level 5.1 -pix_fmt yuv420p -preset faster -g 100 -movflags faststart -c:a copy output.mp4
  </code></p>
  <p>I've tinkered around over and over again, but I can't seem to get it to work.  I'm still quite confused by <code>-map</code> and <code>-var_stream_map</code>.  Here's what I have currently:
  <br /><br />
  <code>ffmpeg.exe -y -framerate 50 -i 1.%09d.jpg.blurred.png -framerate 50 -i 2.%09d.jpg.blurred.png -i input.mp4 -filter_complex &quot;[0:v]v360=equirect:equirect:yaw=180 [s1],[1:v]v360=equirect:equirect:yaw=90 [s2],[s1][s2]overlay [ovr1],[ovr1]scale=3840:1920 [ovr2],[2:v]scale=3840:1920 [ovr3],[ovr3][ovr2]overlay [src],[src]split=2[v1][v2],[v1]scale=1920x1080 [v1out],[v2]scale=2560x1440 [v2out]&quot; -map [v1out] -c:v:0 libx264 -crf 17 -r 50 -preset veryfast -g 100 -sc_threshold 0 -keyint_min 100 -map [v2out] -c:v:0 libx264 -crf 17 -r 50 -preset veryfast -g 100 -sc_threshold 0 -keyint_min 100 -map [src] -c:v:0 libx264 -crf 17 -r 50 -preset veryfast -g 100 -sc_threshold 0 -keyint_min 100 -map 2:a:0 -c copy -f hls -hls_time 2 -hls_playlist_type vod -hls_flags independent_segments -hls_segment_type mpegts -hls_segment_filename stream_%v/data%02d.ts -master_pl_name master.m3u8 -var_stream_map “v:0,a:0 v:1,a:0 v:2,a:0” stream_%v/stream.m3u8
  </code></p>
  <p>Any chance anyone can help me out?  Basically I need to take &quot;src&quot; (the stream named that in the command) and produce hls output for it at 1080p, 2k, 4k resolutions.</p>