fifonik / FFMetrics

Visualizes Video Quality Metrics (PSNR, SSIM & VMAF) calculated by ffmpeg.exe
572 stars 22 forks source link

Width and height of input videos must be same #6

Closed fu-hsi closed 3 years ago

fu-hsi commented 3 years ago

Hi. Can you implement downscaling/upscaling reference file to specified resolution? It is impossible to compare reference file 2k to FHD output files without encoding reference file. It's possible that you can change resolution on the fly with proper filter. I tested this command but without success.

ffmpeg -i final.mp4 -i original.mp4 -filter_complex "[1:v]scale=1920:1080[final];[final][0:v]libvmaf" -f null -

ut model at /usr/local/share/model/vmaf_v0.6.1.pkl cannot be read successfully. Caught VmafException: Error loading model (.pkl): Trouble reading the file:/usr/local/share/model/vmaf_v0.6.1.pkl [Parsed_libvmaf_1 @ 00000238ea9f4e80] libvmaf encountered an error, check log for details Error while filtering: Invalid argument Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0 Conversion failed!

Therefore I will not provide a ready-made solution.

fifonik commented 3 years ago

Not sure why you closed this as it makes sense. I thought that if ref & main are in different resolutions the ffmpeg will resize one automatically before processing (sorry, I never checked this). If this is not the case, resizing should be added.

fu-hsi commented 3 years ago

I thought that if ref & main are in different resolutions the ffmpeg will resize one automatically before processing (sorry, I never checked this).

No... but I solved this problem after many hours of reading and learning. Can I edit FFMetrics.conf.example and does the application use it at all? I will probably make the application to my requirements, so I closed this "issue".

fifonik commented 3 years ago

Program should use conf, but currently you cannot provide additional resize parameters.

P.S I'd resize "final", not "original" as you do in your fist message. Also, the error was not about resizing, but about finding model.

fu-hsi commented 3 years ago

Yes. I found this info on https://netflixtechblog.com/vmaf-the-journey-continues-44b51ee9ed12. I fixed model path in Windows too :)