Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

354
Visualizações
how to define overlay video position and size ffmpeg electronJS?
function overlayMaker(){
    
    ffmpeg()
    .on('end', onEnd )
    .on('progress', onProgress)
    .on('error', onError)
    .input(`${QuizicorderDir}/screen.webm`)
    .input(  `${QuizicorderDir}/webcam.webm`)
    .complexFilter([
        "[0:V]scale=1920:-4,pad=0:1080:0:(oh-ih)/2[vid];[vid][1:V]overlay"
    ])
    .outputFps(30)
    .output('./output-video.mp4')
    .run();
}

I am using this function to create an overlay of the webcam video on top of the screen recorder video. I have defined the input file path to be the temp folder in windows as i am saving the recording there temperory. The following image is the desired output Desired Output For Similar to it

and the output that i am getting is the following The output that i get

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The overlay filter only specifies where to place the overlaid video and not its size. So, if it is not in the desired dimension, you need to pre-scale it explicitly. Try

"[0:v]scale=1920:-4,pad=0:1080:0:(oh-ih)/2[vid];
 [1:v]scale=w:h[ovly];
 [vid][ovly]overlay=x:y"

Substitute w,h,x, & y with desired width, height, and (x,y) upper-left placement of the overlay video.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda