I have an avi file.i am converting avi file to .mp4 codec H.264 and ain second case to .mp4 file codec H.265.Now i want to calculate the PSNR/MSE/MSAD between the ref file(avi file) and the converted mp4 file using ffmpeg.Came across ffmpeg command line filters for PSNR and SSIM calculation but it gives the average PSNR value not the PSNR value frame by frame.Also i want to do it using code and not using command line.Read several examples in demuxing.c it is separating the whole file into frames in av_read_frame before calling decode but how can i convert pkt to frame and able to calculate PSNR or MSE values.
Regards Mayank
答案 0 :(得分:2)
FFmpeg有psnr video filter,它会为每帧PSNR提供每帧元数据。您可能希望使用此功能,因为它还允许简单地扩展代码以添加SSIM(使用ssim filter),而无需花费太多精力。
您应该能够找到有关使用已解码的AVFrame连接libavfilter而不需要太多努力的文档。