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

82
Visualizações
How to precisely trim a video

Using code below I tried to trim a video clip:

const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path
const ffmpeg = require('fluent-ffmpeg')
ffmpeg.setFfmpegPath(ffmpegPath)

const video_path = `${root}/views/app/files/sources/videos/`;

ffmpeg(video_path + 'Frozen 2013.mp4')
  .setStartTime('5:20.994')
  .setDuration('0:19.352')

  .output(video_path + 'video_out_high.mp4')
  .on('end', function(err) {
    if(!err) { console.log('conversion Done..') }
  })
  .on('error', function(err){
    console.log('error: ', err)
  }).run()

But there is this issues :

the output video seems to be jerky at start, like there are some frames lost at the very beginning. or there is a frame at start and suddenly some frames removed then normal frames playing

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

0

Both of the issues likely stem from just copying the frames. The initial jerkiness comes from the first requested frame is not a keyframe, and an mp4 video may require to end with a keyframe (not 100%). So, you have a choice of (1) reencode or (2) pick start and end times according to the keyframes of the input 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