Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMpeg - Trimming out the video after removing duplicate frames

I removed many duplicate frames from video (and completely removed audio) by this command

ffmpeg -i scene.mkv -vf mpdecimate,setpts=N/FRAME_RATE/TB -map:v 0  scene3.mp4

(by an Mulvya's answer, thanks again).

The resulting video is OK but the total duration will not change - the last frame of original video is frozen to fill the remaining time (when playing back the video).

Is there some way to trim the video so that it will finish at this last frame?

like image 428
MarianD Avatar asked Mar 09 '23 14:03

MarianD


1 Answers

The map syntax should be

ffmpeg -i scene.mkv -vf mpdecimate,setpts=N/FRAME_RATE/TB -map 0:v scene3.mp4
like image 119
Gyan Avatar answered Apr 26 '23 12:04

Gyan