ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 11598|回复: 0

[Windows] ffmpeg压缩码率问题

[复制链接]
发表于 2020-4-30 17:18:55 | 显示全部楼层 |阅读模式
大师兄看看我~~

我使用python调用ffmpeg做视频批处理压缩的命令函数是
def convert_mp4_960x540_format(ffmpeg_dir,invid,outvid):
    command = ffmpeg_dir + " -i  " + invid + " -v 0 -acodec aac -ar 48k -ab 128k -ac 1 "  \
             + "-vf \"zscale=960x540:filter=spline36:range=full,vaguedenoiser=threshold=4,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.5\" "  \
             + "-c:v libx264  -profile:v high -level 4.1 -preset:v slower -r 15 -keyint_min 15 -g 15 -sc_threshold 40 -strict_gop 1 -bf 1 -rc cbr_ld_hq  "  \
             + " -b:v 800k -minrate:v 800k -maxrate:v 950k -bufsize:v 1000k  -tune psnr -pix_fmt yuv420p -f mp4 -y "  \
             + outvid    #animation
    os.system(command)
问题是:我明明设置了cbr、-b:v、和minrate、maxrate、还有-bufsize,为什么还是会出现个别视频数据速率低于800k呢?

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-19 14:18 , Processed in 0.067240 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表