norfair
norfair copied to clipboard
MOV video output is flipped verticaly
I recorded a video using an iPhone in MOV format and the output was flipped vertically.
The minimum code to reproduce the error is the following:
from norfair import Video
video = Video(input_path='demo.mov')
for frame in video:
video.write(frame)
The information in the video is the following:
Does it happen consistently with every MOV video whether it's filmed vertically or horizontally?
Only when it's filmed vertically
After some research, this is a problem of OpenCV.
The video in question has a tag displaymatrix: rotation of -90.00 degrees (use ffprobe to see the tags) which means that the original video is horizontal and this tag tells you should rotate it but.. OpenCV rotates it in the wrong direction so it ends up flipped.
The problem is already fixed in this PR merged on Jun 13th but the last release is from the 7th.
We just need to upgrade to the latest version of OpenCV once that's released