1 http client requests https://127.0.0.1:8008/watch?v=foobar 2 http server runs server side script with v=foobar 3 server side script runs youtube-dl with https://www.youtube.com/watch?v=foobar to get video and audio URLs 4 server side script runs ffmpeg with video and audio URLs to concatenate the streams 5 server side script returns concatenated streams to http server 6 http server returns concatenated streams to http client 7 when http client closes connection to http server, process should stop even if concatenation isn't done.