2

I am able to rotate video but facing issue in rotating as per documentation.

I tried to hardcode filter as following.

FFmpegFrameFilter frameFilter = new FFmpegFrameFilter("transpose=cclock", 
previewWidth, previewHeight); 

According to documentation, transpose=cclock filter should rotate video counter clockwise 90degree. but it is rotating video for 180 degree.

I also tried to use transpose=0/1/2/3

  • 0 = 90CounterCLockwise and Vertical Flip (default) (this does nothing)
  • 1 = 90Clockwise (even this is also does nothing)
  • 2 = 90CounterClockwise (this is rotating video at 180 degree)
  • 3 = 90Clockwise and Vertical Flip (this behaves same as value2 : 120 degree rotation)

For example

FFmpegFrameFilter frameFilter = new FFmpegFrameFilter("transpose=2", previewWidth, previewHeight);

This accepted answer is also not working.

In short All i want, is rotate video 90 degree counter clockwise. which I am not able to achieve.

GitHub issue

Library used for JavaCV : https://github.com/bytedeco/javacv

Aks4125
  • 4,522
  • 4
  • 32
  • 48

0 Answers0