I am trying to calculate VMAF
using FFmpeg. for this, I installed ffmepg-python
and used the following code in python.
from ffmpeg_quality_metrics import FfmpegQualityMetrics as ffqm
a=ffqm("E:/6.mp4","E:/6_fast.mp4").calc(["vmaf"])
it produced a dic
and contains PSNR
, SSIM
, and some other things besides VMAF
for each frame. but I just need to have VMAF. I have a folder of mp4
files and I need to calculate VMAF
for each of these videos( and their reference videos) and then save a text file for each of them that contains VMAF
value for each frame. before, I used the following python code for calculating PSNR and I need something like this for VMAF
, but I could not find anything. could you please help me with this issue? Thanks
subprocess.call(['ffmpeg.exe', '-i', pname1, '-i', pname2, '-lavfi', f'psnr=stats_file={n}', '-f', 'null', '-'])
how can I save these VMAF
values in a dic into a text file? It also time consuming. is it reasonalbe?