Page 1 of 1

Display aspect ratio 16:9 but rotation 90° in metadata

Posted: Thu Oct 24, 2019 8:08 pm
by linuxuser
I have got a video, probably from a mobile phone. With all my video players it is displayed in portrait mode and with handbrake too, while it was taken in landscape mode.

Is there a simple way to rotate it?

Code: Select all

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings                          : 1 Ref Frames
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : M=1, N=30
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 11 min 11 s
Source duration                          : 11 min 11 s
Bit rate                                 : 10.5 Mb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Rotation                                 : 90°
Frame rate mode                          : Variable
Frame rate                               : 28.964 FPS
Minimum frame rate                       : 15.000 FPS
Maximum frame rate                       : 31.579 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.395
Stream size                              : 844 MiB (99%)
Source stream size                       : 845 MiB (99%)
Title                                    : Core Media Video
Encoded date                             : UTC 2012-11-19 15:56:32
Tagged date                              : UTC 2012-11-19 15:56:45
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Re: Display aspect ratio 16:9 but rotation 90° in metadata

Posted: Fri Oct 25, 2019 12:17 am
by Woodstock
Using the GUI, select the rotation value from the filters page.

If you are using the command line interface, --help shows:

Code: Select all

   --rotate[=string]       Rotate image or flip its axes.
                           angle rotates clockwise, can be one of:
                               0, 90, 180, 270
                           hflip=1 flips the image on the x axis (horizontally).
                           Custom Format:
                               angle=a:hflip=h:disable=d
                           Default:
                               angle=180:hflip=0

Re: Display aspect ratio 16:9 but rotation 90° in metadata

Posted: Fri Oct 25, 2019 12:38 am
by linuxuser
Thanks a lot, the strange thing is, that the preview in the filemanager (Thunar) is correct.

Re: Display aspect ratio 16:9 but rotation 90° in metadata

Posted: Fri Oct 25, 2019 12:36 pm
by Woodstock
Some players will use the rotation flag, while others ignore it. Handbrake has not automatically used it, but I think that's one of the changes in the Nightly builds, coming up for version 1.3.x.

Frankly, it's been a while since it came up, and my memory is foggy on whether or not the automatic use was implemented yet...