I use this FFmpeg command to compare 2 videos:
ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v][1:v]blend=difference,blackframe=1:10" -f null -'
The command compares the same frame in each video.
I want to compare different frames from each video. For example, start at frame 0 of video1 but frame 5 of video2.
I tried to use the following command, but it simply started the compare of both videos at frame 5:
'ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v]select=gte(n\,0)[video1]; [1:v]select=gte(n\,5)[video2]; [video1][video2]blend=difference,blackframe=1:10" -f null -'
Is what I'm trying to do possible with Ffmpeg?
Note that I tried other approaches that didn't work:
Comparing images generated from frames (create image from a frame, compare, go to next frame) but that was extremely time consuming and impractical for long clips.
Cutting and reencoding is also not an option due to the loss of quality and time required.
-ss 0.2before input (0.2 = 5 frames/25 fps) – Баяр Гончикжапов Jun 18 '23 at 04:08VMAFfilter, which will give you a score for the quality of the output. In any case, you will still need to make sure that your frames are aligned and in sync for both inputs, and you can do this by usingtriminstead ofselect(assuming the framerate for both is equal). – programmar Jun 22 '23 at 22:04