title: Can I stream a static image feed into a video with Node.js?
body: <p>I want to create a small PoC where I can stream a static image source into a video. The idea behind that is that I have an (old) IP camera that only serves snapshots on an HTTP endpoint. When calling that endpoint, you get a static JPEG picture. Let's say, the URL I want to &quot;convert&quot; is: <a href="http://mycamera.local/live.jpg" rel="nofollow noreferrer">http://mycamera.local/live.jpg</a></p>
  <p>Now, I want to create a script using Node.js to quickly call that URL over and over in order to form some sort of video stream. I'm not an expert into media encoding and stuff, but I guess that the variable refresh rate induced by HTTP latency, the camera's FPS... would make it a bit trickier to pipe images into a video response?</p>
  <p>I thought I'd go with <a href="https://expressjs.com/" rel="nofollow noreferrer">Express</a> and <a href="https://axios-http.com/docs/intro" rel="nofollow noreferrer">Axios</a> to serve and query HTTP content. I've also read that <a href="https://ffmpeg.org/" rel="nofollow noreferrer">FFmpeg</a> could play a role in there. But, I am open to any suggestion. I could even switch languages if that's required. This question is so specific I think, that any response would do.</p>
  <p>A couple of requirements I cannot change:</p>
  <ul>
  <li>The camera can only serve static pictures on a single endpoint.</li>
  <li>I have no other protocol than HTTP on the camera.</li>
  <li>I am not buying or modifying the existing hardware, even though I know there are very cheap units out there.</li>
  <li>My server must serve a live video that could be streamed by VLC for instance.</li>
  </ul>