
To run FFmpeg you have to have a build that is compatible with the Lambda environment. You will have to give necessary permissions to execute FFmpeg from /tmp folder.Copy the FFmpeg to the /tmp folder when you are going to execute it because you can’t execute anything from anywhere other than /tmp folder in Lambda.Need to find an executable Which works on the Lambda server.In that case, you will face some problems, What if you want to run FFmpeg from a Lambda function? When you have a requirement to do something on video/ audio files, the tool of choice would be FFmpeg which is free and open source. I'm sure there's probably some fundamental video streaming knowledge I'm missing, so I'm just looking for any sort of guidance on how I can get my canvas to stream at a "realtime" speed, or whatever I could be missing here.Okay, no drama. I'll stop there, but tl dr I've tried a whole bunch of different combinations of -re, -framerate, -fps_mode, -r ffmpeg args, and some other techniques in the code like continuing to use setImmediate to send frames, but use a date comparison to actually send a frame at an FPS rate. Timer increases about twice as fast as expected, then gets hung on one second for a bit, and then starts increasing again at same rate.Takes about 10 seconds to load once opened in VLC.fps starts out high, around 28, and over the next minute or so drops down to 16.ffmpeg takes a few seconds to start streaming.


Here's the paths I've gone down so far Render canvas and send input in continuous interval import from 'canvas'

I've tried a bunch of different combinations of techniques and ffmpeg params to get a consistent framerate and a stream at "realtime" speed, but can't figure it out.

The standard way to stream to RTMP seems to be ffmpeg, so I'm using that, spawned as a child process from within NodeJS. My goal is to render a canvas in Node, and stream that canvas to an RTMP server (Twitch ultimately, but for now I'm testing on a local RTMP server).
