Auto-Rotate doesn't produce rotated video

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
larsen
Posts: 17
Joined: Fri Mar 13, 2009 12:07 pm

Auto-Rotate doesn't produce rotated video

Post by larsen »

Description of problem or question:
I have a video that has been recorded vertically. MediaInfo shows a rotation of 90°.
I want to resize and rotate this video, but the output (though different in file size) is not rotated (played in MediaPlayer Classic Home Cinema).
The activity log reads "Auto-Rotating video 270 degrees".

Steps to reproduce the problem (If Applicable):
Batch file using HandBrake CLI:
https://pastebin.com/kqvBGZXG

Video file:
https://mega.nz/file/pl1mVCqb#6V0dfS6yJ ... WzNYoTbrM0

HandBrake version (e.g., 1.0.0):
CLI 1.5.0

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 10, 21H1

HandBrake Activity Log ***required*** :
https://pastebin.com/m1NYdM3q
User avatar
Ritsuka
HandBrake Team
Posts: 1357
Joined: Fri Jan 12, 2007 11:29 am

Re: Auto-Rotate doesn't produce rotated video

Post by Ritsuka »

HandBrake reads the rotation info and rotate it automatically. The output won't have a rotation info anymore because HandBrake rotates the actual video before encoding it.
larsen
Posts: 17
Joined: Fri Mar 13, 2009 12:07 pm

Re: Auto-Rotate doesn't produce rotated video

Post by larsen »

Then I don't understand why it's still vertical after encoding.
User avatar
Ritsuka
HandBrake Team
Posts: 1357
Joined: Fri Jan 12, 2007 11:29 am

Re: Auto-Rotate doesn't produce rotated video

Post by Ritsuka »

Let me check.
User avatar
Ritsuka
HandBrake Team
Posts: 1357
Joined: Fri Jan 12, 2007 11:29 am

Re: Auto-Rotate doesn't produce rotated video

Post by Ritsuka »

It's horizontal if I use --rotate=angle=270, are you sure the rotate option is being passed properly to the cli?
larsen
Posts: 17
Joined: Fri Mar 13, 2009 12:07 pm

Re: Auto-Rotate doesn't produce rotated video

Post by larsen »

https://www.youtube.com/watch?v=OCmuATH2yzo
Had a typo in my batch: "set ROTATE==--rotate=angle=270"

Now, the video is rotated correctly when I use "--rotate=angle=270", but with "--rotate" it get's rotated 180°.
Log from 270: https://pastebin.com/kZSDRPVa
Log from auto: https://pastebin.com/ATyXjZr9
Removed the time stamps so it can easily be diffed.
larsen
Posts: 17
Joined: Fri Mar 13, 2009 12:07 pm

Re: Auto-Rotate doesn't produce rotated video

Post by larsen »

btw: Noticed two minor things that probably shouldn't be that way:

1)

Code: Select all

libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open file VIDEO_TS.IFO.
Printed on stdout as it is not redirected to the activity log with "2> activity.log". Should probably be on stderr, too.

2)

Code: Select all

Encoding: task 1 of 1, 100.00 %
On stdout

Code: Select all

Scanning title 1 of 1, preview 1, 10.00 %
On stderr, should probably be on stdout, too.
larsen
Posts: 17
Joined: Fri Mar 13, 2009 12:07 pm

Re: Auto-Rotate doesn't produce rotated video

Post by larsen »

larsen wrote: Tue Jan 11, 2022 9:54 am Now, the video is rotated correctly when I use "--rotate=angle=270", but with "--rotate" it get's rotated 180°.
Log from 270: https://pastebin.com/kZSDRPVa
Log from auto: https://pastebin.com/ATyXjZr9
Removed the time stamps so it can easily be diffed.
@Ritsuka: Can you reproduce this?
Post Reply