Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2163 closed defect (invalid)

vf filter 'rotate' also flips the image vertically

Reported by: yuri@… Owned by: reimar
Priority: normal Component: vf
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

"-vf-add rotate" rotates the video CW, but also flips it, so I have to add "-vf-add mirror" to achieve pure rotation by 90 degrees.

mplayer-1.1.r20130308

Attachments (1)

video.mp4 (308.4 KB) - added by yuri@… 6 years ago.
testcase video

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by reimar

  • Resolution set to invalid
  • Status changed from new to closed

-vf rotate rotates CCW, not CW. I think you want -vf rotate=3
Also, -vf flip,rotate would be much more efficient than -vf rotate,mirror

Changed 6 years ago by yuri@…

testcase video

comment:2 Changed 6 years ago by yuri@…

I am attaching the short video like this. See it with 'mplayer -vf rotate video.mp4' and you will see that it is flipped.

comment:3 Changed 6 years ago by reimar

Ok, I admit the default is a bit questionable (and I gave the wrong example), but to not flip use -vf rotate=1 (CCW) or -vf rotate=2 (CW)

comment:4 Changed 6 years ago by yuri@…

My main problem is why flip is included into rotate? I don't think this is reasonable.

-vf rotate does CW+flip, but -vf rotate=1 just does CW. This isn't intuitive. rotate=1 is what I originally wanted.

comment:5 Changed 6 years ago by reimar

My main problem is why flip is included into rotate?

Because it's cheap and efficient to do them together (vastly more than doing them separately, essentially free).
Also rotating 270 degress is flip+rotate90+flip, thus the filter already implements the flips (for efficiency it actually does not implement rotate at all, it only implements transpose - which when combined with exactly one flip makes a rotate).
Doesn't make it intuitive but entirely reasonable from an implementation point. Probably the default should at least be one of the cases without flip though, but I don't think it is a good idea to change the numbering and possibly break everyone's scripts.

Note: See TracTickets for help on using tickets.