Using FFmpeg -lavfi to calculate the SSIM of each frame
You have to perform all filtering in a single filtergraph.

ffmpeg -i .\a.mp4 -i .\a.mp4 -filter_complex "[0:v]setpts=N/FR/TB[v0];[1:v]select=gte(n\,1),setpts=N/FR/TB[v1];[0v][1v]ssim=f=stats.log" -f null -