nuter.blogg.se

Ffmpeg nodejs
Ffmpeg nodejs




ffmpeg nodejs

Send the input-output data to nodejs and export it with ffmpeg as a finished vide.Īt first I wanted to do 1. Meaning, if a single video is used as an input, and split it into smaller parts, it needs to replay from the starting time of the next edited segment, if that makes sense. Set the in-and-out times of the videos from the client, which requires the client to view the video at specific times, and switch the position of the video. 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.I'm trying to make a basic online video editor with nodeJS and ffmpeg. 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.

ffmpeg nodejs

  • 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'

    ffmpeg nodejs

    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).






    Ffmpeg nodejs