简体   繁体   English

使用 ffmpeg-python 设置转换输出文件的帧率

[英]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-python.mp4文件转换为.gif文件:

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()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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