大师兄看看我~~
我使用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呢?
|