-1

I have a bunch of videos at various frame rates, some with variable frame rate.

  1. First, I wish to play back every frame only once, at 24 fps, no exceptions. I do not want any extra frames or dropped frames. I know that the play length may well change, and audio is unimportant.

  2. Next, I wish to do the above after having thrown out all duplicate frames.

Here's what I've been using in a Windows batch file. It almost always works, but for some videos I've caught it dropping a frame:

for %%i in (*.mp4) do ffmpeg -y -i "%%i" -an -c copy -f h264 "%%i.h264"

for %%i in (*.h264) do ffmpeg -y -r 24 -i "%%i" -c copy "%%i.R.mp4"

for %%i in (*.R.mp4) do ffmpeg -y -i "%%i"  -b:v 40M -vf mpdecimate,setpts=N/24/TB "MPD%%i.mp4"

What am I doing wrong?

greybeard
  • 2,249
  • 8
  • 30
  • 66
Wei Hong
  • 13
  • 5

1 Answers1

0

The mpdecimate filter drops frames that do not differ greatly from the previous frame, that may be the reason why the frames are dropping.

FFmpegEnthusiast
  • 193
  • 1
  • 10