[FFmpeg-user] change frame rate
thljcl
jiachielee at live.com
Sun Jul 21 16:41:55 CEST 2013
The frame rate of your source may be constant or variable. If frame rate of
your source is constant,
You can just type the following:
ffmpeg -r "60" -i "input.avi" -vcodec "copy" "output.avi"
Here I assume that that the input video is with the file name of “input.avi”
and output video is with the file name of “output.avi”; this video does not
have an audio track.Basically, frame rate as an input option will make
ffmpeg ignores the original frame rate of the video and use the designated
frame rate without adding or dropping frames.If the frame rate of your
source is variable, the above method may work but the video may speed up or
slow down intermittently due to variable nature of the frame rate. In other
words, if you change the frame rate from one to another by adding/dropping
frames without changing the playback speed or the length of the video, the
video may be out of sync with the audio. One way of mitigating the effect of
variable frame rate is to re-encode the video to constant frame rate.Say the
average frame rate of the source is 30 FPS; the frame rate is variable.
Lossy encoding will inevitably result in “generation loss”. To reduce the
quality loss, you can use lossless encoding in the process; then choose the
lossy encoding of appropriate level instead of choosing lossy encoding while
editing the videos.Basically, converting video to a series of image sequence
will force the frame rate to be constant.
mkdir "frames"
ffmpeg -i "input.avi" -r "30" "frames\f_%%1d.png"
ffmpeg -r "60" -i "frames\f_%%1d.png" -vcodec "libx264" -crf "0"
"output-crf0.mkv"
rmdir /s /q "frames"
“output-crf0.mkv” is of lossless encoding. You can choose the appropriate
compression level you see fit.
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/change-frame-rate-tp939542p4660111.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
More information about the ffmpeg-user
mailing list