Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Framerate vs r vs Filter fps

Tags:

ffmpeg

I'm trying to better understand FFmpeg framerate.

Example: If I wanted to convert a 30 fps video to 23.976 fps.


What are the differences between:

Option
-framerate 24000/1001

Option
-r 24000/1001

Filter
-vf "fps=24000/1001"

x265 params
-x265-params "fps=24000/1001"


What I've read is:

-framerate is image sequence fps (input video fps?)

-vf "fps=" is encoding fps

-r is output fps

However I don't know if that is correct, or if it changes depending on what order you place them in the options.


Questions

  1. -x265-params "fps=" Is it required use it's own fps param? Can it not use default options?

  2. Should multiple Options, Filters ,and Params be combined, or should you only use one?

  3. Input/Output Framerate

    https://ffmpeg.org/ffmpeg.html#toc-Video-Options

    -r[:stream_specifier] fps (input/output,per-stream)

    If in doubt use -framerate instead of the input option -r.

    Is -r input or output? How do you specify, by putting before or after the -i?

like image 699
Matt McManis Avatar asked Jul 02 '18 20:07

Matt McManis


People also ask

What is framerate in ffmpeg?

ffmpeg can be used to change the frame rate of an existing video, such that the output frame rate is lower or higher than the input frame rate. The output duration of the video will stay the same.

What is frame rate in video?

Frame rate or frames per second, commonly put out as FPS, is essentially the number of images, shots, or frames that a camera can take per second. The frame rate is measured in hertz or frames per second, and these frames get animated together or combined to come up with a proper video.

Why is frame rate so important to gamers?

That smoothness of motion is exactly why frame rate is so important to certain gamers. When you play at a lower frame rate, you’re having fewer frames per second output to the screen at any given time, thus your gameplay experience is more sluggish.

How many frames per second (fps) should a video have?

The frames per second determine the smoothness of a video, and the most commonly used frame rate used in films is 24 frames per second. For the internet, it’s 30FPS, and it is this rate that ensures a smooth progression of your videos without any pictures stuttering.

What happens when your frame rate drops to 15 fps?

This means 30 frames of information are sent to the screen every single second. When your frame rate dips down to 15, you only get 15 frames per second, and if you’re on a graphics card that’s not very powerful, you can not only get sluggish results in terms of gameplay because of the low refresh rate.


1 Answers

-framerate is an input per-file option. It is meant for input formats which don't have a framerate or PTS defined, image sequences being an example.

-r can be either an input or output option. As an input option, it retimes input frames at that rate. As an output option, it will duplicate or drop frames to achieve the given rate (note that it won't duplicate frames if output format accepts variable frame rate). Output r is the 'encoding rate' as well. If it is not specified, it is inherited from the input rate, whether that's manually set or altered or an inherent property of the stream.

fps filter allows one to alter a stream's framerate while filtering by dropping or duplicating frames to achieve the given rate. It overrides the input stream rate. Its main use is to manipulate a stream before combining it with other streams, or before filtering it further.

-x265-params fps is a private property of the x265 encoder. Its main purpose is to signal a duration for each frame for the purposes of rate-control. Encoders like x264/5 devote more bits to frames that are shown for longer. It does not actually alter framerate or number of frames or frame duration.

like image 172
Gyan Avatar answered Jan 01 '23 02:01

Gyan