title: Can I use ffmpeg to encode a procedurally generated video for livestream?
body: <p>I have a python script that continuously generates images (frames of a video).</p>
  
  <p>I would normally save these images to files and then convert them to a video with ffmpeg using the command line. What additional steps are required to adapt this workflow for livestreaming?</p>
  
  <p>Instead of saving the frames to files I would like to stream them to, say, YouTube, and my script could potentially run indefinitely generating frames of the video.</p>
  
  <p>I'm looking for general guidelines so I can Google more details myself. I assume video platforms like YouTube have some API where I can send data for livestreaming. I have no idea what type of data format such API would expect, but I assume that just sending every single frame to the API is not how this is done.</p>
  
  <p>Would I need to encode my frames in memory using some library? Can I use ffmpeg for that?</p>