Solved by Abhijith_M in post #2 
              
              
                The two frames in video not having the same size. 
diff = cv2.absdiff(curr_frame, prev_frame) 
this operation only performs when the two frames having same size.