Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set the framerate of converted output file using ffmpeg-python

I have the following line to convert a .mp4 file to a .gif file using ffmpeg-python:

ffmpeg.input('test.mp4').trim(start=0, duration=3).output('output.gif').run()

It works well, but I wanted to reduce the frame rate. At this link, I could not find a way to do this. Does somebody know how to do it ?

like image 378
abdullah celik Avatar asked Nov 14 '25 22:11

abdullah celik


1 Answers

ffmpeg
    .input('test.mp4')
    .trim(start=0, duration=3)
    .filter('fps', fps=25, round='up')
    .output('output.mp4')
    .run()
like image 72
Anshul Borawake Avatar answered Nov 17 '25 21:11

Anshul Borawake



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!