简体   繁体   中英

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 ?

ffmpeg
    .input('test.mp4')
    .trim(start=0, duration=3)
    .filter('fps', fps=25, round='up')
    .output('output.mp4')
    .run()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM