Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

79
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda