R
R
Rostislav2021-08-18 21:08:30
fmpeg
Rostislav, 2021-08-18 21:08:30

How to merge frames with different resolution into one ffmpeg node.js video?

A mediaStream comes to the node, which I need to write to a file, for this I use ffmpeg. The problem is that the video from the webcam comes from the client, first at a resolution of 540x540 and after 20 seconds 720x720, at the front I tried to standardize the resolution, but the browser ignores this:

const data = await navigator.mediaDevices.getUserMedia({video: {
        width: { min: 640, ideal: 1280 },
        height: { min: 400, ideal: 720 },
      }})


If you start recording with one resolution and then continue with another, then there will be a green screen, what can you do about it? I tried to write to different files and dine them later, but the

Nod code for writing to a file crashed:

https://gist.github.com/rostikowb/3fc8330b6c2d9826...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2021-08-18
@rostikowb

maybe add a scale filter and bring it to a fixed size?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question