Closed Count-MHM closed 6 months ago
Going back to the stable 6.1.1 also fixes the issue.
Could you please run the following command with old and new ffmpeg:
ffmpeg -f lavfi -i color=c=black:s=320x240:d=1 -f lavfi -i color=c=white:s=320x240:d=1 -lavfi [0:v][1:v]psnr:stats_file='-' -f null -
The command calculates PSNR over two generated videos (black and white). It is printing per frame values and at the very end -- per file value. The per file value is displayed by ffmetrics.
My current output in linux:
I assume that per file value format is changed in the latest FFMpeg (I will check it out when back to windows), this is why FFMetrics shows N/A.
Checked it out.
Old ffmpeg:
StdOut: n:636 mse_avg:18.99 mse_y:21.86 mse_u:10.32 mse_v:16.22 psnr_avg:35.34 psnr_y:34.74 psnr_u:38.00 psnr_v:36.03
StdErr: frame= 648 fps=280 q=-0.0 Lsize=N/A time=00:00:12.99 bitrate=N/A speed=5.62x
StdErr: video:299kB audio:7308kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
StdErr: [Parsed_psnr_4 @ 000001e27a7c9100] PSNR y:36.233649 u:38.270248 v:38.479232 average:36.836851 min:33.577308 max:39.757382
New ffmpeg: StdOut: n:636 mse_avg:18.99 mse_y:21.86 mse_u:10.32 mse_v:16.22 psnr_avg:35.34 psnr_y:34.74 psnr_u:38.00 psnr_v:36.03 StdErr: [Parsed_psnr_4 @ 000001c794e0f2c0] PSNR y:36.233649 u:38.270248 v:38.479232 average:36.836851 min:33.577308 max:39.757382 StdErr: [out#0/null @ 000001c7941400c0] video:304KiB audio:7308KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown StdErr: frame= 648 fps=342 q=-0.0 Lsize=N/A time=00:00:12.96 bitrate=N/A speed=6.84x
The output format did not change. However, in the new ffmpeg I see the information about the latest frame (648 in my case) is following AFTER the information about overall file was returned. I have not expected it and this is causing the issue. Will think how to fix it. Thanks for the bug report.
Thanks!
Confirming that out of order lines returned by ffmpeg in stderr is exactly the cause of the issue. There is something else really strange with the new version: it is also returning many repeated lines in stderr. I think this is a bug in ffmpeg and I hope they will fix it soon.
Nevertheless, I've already made changes so FFMetrics will use some smarts and not expect that the very last line in stderr contains information about file metric.
Should be fixed in 1.4.9 beta 1 (could you check it please?)
Can confirm that 1.4.9 beta 1 works with ffmpeg-2024-02-04-git-7375a6ca7b-full_build
and the newer ffmpeg-2024-02-15-git-a2cfd6062c-full_build
. Thanks
I was using an old build of FFMPEG. (ffmpeg-2022-08-10-git-8fc7f0fdec-full_build) And updated it to the newest one for better AV1 support. (ffmpeg-2024-02-04-git-7375a6ca7b-full_build)
But after updating FFMPEG, FFMetrics' PSNR and SSIM always show "N/A" even though it has calculated them.
ffmpeg-2022-08-10-git-8fc7f0fdec-full_build:![2024-02-09 01_05_38-FFMetrics v1 3 1 (1 files)](https://github.com/fifonik/FFMetrics/assets/71083058/eb42bb8a-96bd-4e4d-bfe2-cece07a63ea8)
ffmpeg-2024-02-04-git-7375a6ca7b-full_build:![2024-02-09 01_10_53-FFMetrics v1 3 1 (1 files)](https://github.com/fifonik/FFMetrics/assets/71083058/d6fac015-7aa3-4a04-ad2c-2e40ae6af984)
with ffmpeg-2022-08-10-git-8fc7f0fdec-full_build:
with fmpeg-2024-02-04-git-7375a6ca7b-full_build:
returning to the old version fixes the problem.