1

As ffmpeg calculates ssim score by a frame-by-frame comparision,
how do I exactly align the reference video (say ref.mp4) with the video stream, so that only the corresponding frames (ith frame of both the videos, for all i) are compared by ffmpeg ? Please help.

sumanth232
  • 587
  • 7
  • 20
  • One way is to convert your video to YCbCr using `ffmpeg -i input.mp4 out.yuv'` (you'll most likely get yuv420 format) Then you can align the streams manually by removing frames/extracting them or whatever you feel like doing. Then you can use my python utility to calculate the [SSIM values](https://github.com/figgis/yuv-tools) – Fredrik Pihl Mar 22 '16 at 14:11
  • @FredrikPihl, pls forgive me for my ignorance as I am new to all of this. May I know the benefits of your python utility to calculate SSIM scores, as ffmpeg can also calculate SSIM scores – sumanth232 Mar 22 '16 at 17:18
  • @FredrikPihl, how do I extract say from the nth frame in both videos. What are the ways to accurately fix a point to be extracted from. – sumanth232 Mar 22 '16 at 17:40

0 Answers0