FantasyJXF
FantasyJXF

Reputation: 984

How does FFMPEG change fps without dropping frames?

Here I got a video which has the FPS 30, duration 10s, and has 300 frames. How could I turn the video to 25FPS without dropping frames.

I suppose the -r or fps=fps=25 is kind of resampling method or not working.

My commands are like:

ffmpeg -i input.flv -vf "scale=800:450, fps=25" output1.flv

or

ffmpeg -i intput.flv -filter:v fps=fps=25 -c:v libx264 -c:a copy -pix_fmt yuv420p -profile:v high -f mp4 -vf scale=800:450 output2.mp4

The result is that output1.flv dropped frames, and output2.mp4 didn't work.

Upvotes: 2

Views: 8076

Answers (1)

Gyan
Gyan

Reputation: 93008

If you're re-encoding the video stream, then

ffmpeg -r 25 -i input.flv ...

If there's audio, you'll have to adjust its tempo as well by adding

-af atempo=0.834

where 0.834 is 25/30.

Upvotes: 4

Related Questions