AutoRotate Video

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************

Please be aware we are now using GitHub for issue tracking and feature requests.

- This forum is now closed to new topics.
- Existing topics will remain open for a short while as the transition over occurs.
*******************************
Registered55
Regular User
Posts: 121
Joined: Thu Apr 14, 2011 4:04 pm

AutoRotate Video

Post by Registered55 » Mon Apr 28, 2014 9:41 pm

Mobile devices usually apply a rotation figure (MediaInfo shows this as Rotation = 90o for example)

is there a way for Handbrake to apply an AutoRotate to the file to automatically apply a Rotate 4 to this kind of file,

or better still, could handbrake preserve this Rotation information field, and when writing the destination file, if this field exists, then apply the field back in the destination file, this way, videos will still play correctly on all devices that read this information. This would be the better choice really as it would account for a much wider audience. Although having an AutoRotate feature in Handbrake would be nice though, but i'm thinking a little more complicated to program.

Thanks.

Smithcraft
Veteran User
Posts: 2691
Joined: Thu Jan 22, 2009 8:04 pm

Re: AutoRotate Video

Post by Smithcraft » Mon Apr 28, 2014 10:00 pm

I believe it's only available in the CLI.

I don't think Handbrake passes it through, but I'm not sure if it would be included in the metadata.

SC

Registered55
Regular User
Posts: 121
Joined: Thu Apr 14, 2011 4:04 pm

Re: AutoRotate Video

Post by Registered55 » Tue Apr 29, 2014 9:51 am

Auto rotation of the video is in the cli..... i would love to know what command line to use for that.

I'm already aware of the "--Rotation=x" command, which i can get the GUI to pass over to the CLI, but getting Handbrake to automatically apply the correct rotation on the video depending on what rotation is in the metadata.... that i didn't know handbrake could do???

how do i do that, i would love to know....thanks.

User avatar
Rodeo
HandBrake Team
Posts: 11907
Joined: Tue Mar 03, 2009 8:55 pm

Re: AutoRotate Video

Post by Rodeo » Tue Apr 29, 2014 4:30 pm

It's on the TO-DO list. Currently waiting for our MP4 demuxer (libavformat) to actually expose that information to us; it's being worked on but may take a while longer to complete.

Pak
Posts: 1
Joined: Sun Apr 17, 2016 7:30 pm

Re: AutoRotate Video

Post by Pak » Sun Apr 17, 2016 7:40 pm

Hi all, I am new to this forum, started using Handbrake a couple weeks ago, and absolutely love it. Thanks for such a great work.
It's on the TO-DO list
I came here to suggest this feature and was very happy to read this. Is this implemented in the latest version of Handbrake using some extra command line, or is still on the TO-DO list?

This auto-rotation is literally the only thing preventing a user from mass-automating the compression all of the domestic videos in a folder.

As far as I understand, when recording in a smartphone, in my case from the iPhone for example, videos are recorded always in the same orientation relative to the camera, but are then given the appropriate orientation when playing them probably using the metadata mentioned above. Nowadays, as far as I can see, most players automatically correct the orientation, so it would be really great if Handbrake could copy this property automatically.

Right now I have to first process-recode the videos using Handbrake, and some of them end up in an incorrect orientation. Since I do not know how to get this meta-data from the original file, I always do this first step to find out, which is a slow method. Then I select one by one the ones that need rotating by 90, -90, or 180, and process them individually with the ", --rotate=X" command.

User avatar
s55
HandBrake Team
Posts: 9167
Joined: Sun Dec 24, 2006 1:05 pm

Re: AutoRotate Video

Post by s55 » Sun Apr 17, 2016 7:42 pm

Still on the todo list.

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Thu Sep 15, 2016 5:06 pm

We need to convert 30fps lens-down shot iPhone films to 24fps.
HandBrake is very good at the 30 to 24 conversion but
as soon as it touches these iphone images, whatever the required operation,
it puts them back into their initial out-of-the sensor state!

This would not be too much of a problem if [, --rotate=3] was still working
but this is not the case on Mac version 0.10.5 ! What can I do?
Last edited by Cantar4 on Thu Sep 15, 2016 5:13 pm, edited 1 time in total.

rollin_eng
Veteran User
Posts: 2813
Joined: Wed May 04, 2011 11:06 pm

Re: AutoRotate Video

Post by rollin_eng » Thu Sep 15, 2016 5:09 pm

Could you please post your logs, instructions can be found here:

viewtopic.php?f=6&t=31236

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Thu Sep 15, 2016 7:13 pm

how can I trigger a log, there is no bug per se.

The problem is that opening iPhone films shot with the lens down the case
instead of at the top, HB generates upside down images, 180°rotated in fact,
that the CLI command of the additional option tab doesn't prevent.

rollin_eng
Veteran User
Posts: 2813
Joined: Wed May 04, 2011 11:06 pm

Re: AutoRotate Video

Post by rollin_eng » Thu Sep 15, 2016 7:23 pm

If the rotate switch is not working, that would be a bug would it not?

Woodstock
Veteran User
Posts: 2654
Joined: Tue Aug 27, 2013 6:39 am

Re: AutoRotate Video

Post by Woodstock » Thu Sep 15, 2016 7:56 pm

The problem is that the handbrake GUI doesn't use the command line program anymore, so there is no "passing the switch" (as mentioned in the original post from 2 years ago) in that way.

The CLI version still handles the switch, but the GUI doesn't call the CLI, so... What's needed is the variation of that magic incantation that gets passed to hb.dll ...

If you were actually using the CLI, "--rotate" defaults to 3, according to the built-in help. And it does work.

mduell
Veteran User
Posts: 6071
Joined: Sat Apr 21, 2007 8:54 pm

Re: AutoRotate Video

Post by mduell » Thu Sep 15, 2016 8:51 pm

Cantar4 wrote:This would not be too much of a problem if [, --rotate=3] was still working
but this is not the case on Mac version 0.10.5 ! What can I do?
Works for me, would need to see the log from the encode you tried to see what you did wrong.

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Thu Sep 15, 2016 9:33 pm

Woodstock wrote:The problem is that the handbrake GUI doesn't use the command line program anymore
What's needed is the variation of that magic incantation that gets passed to hb.dll .
I you could help us find this magic Cli/Gui connected version dated of the precolumbian ages,
you would save us from the sticky spurious ads of the [Removed]-converter. :)
Last edited by s55 on Fri Sep 16, 2016 6:36 pm, edited 2 times in total.
Reason: No advertising please.

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Thu Sep 15, 2016 9:39 pm

[quote=mduell "Works for me, would need to see the log from the encode you tried to see what you did wrong.[/quote]
Would you tell me how to get this log ? I will sent it asap

rollin_eng
Veteran User
Posts: 2813
Joined: Wed May 04, 2011 11:06 pm

Re: AutoRotate Video

Post by rollin_eng » Thu Sep 15, 2016 9:42 pm

rollin_eng wrote:Could you please post your logs, instructions can be found here:

viewtopic.php?f=6&t=31236

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Thu Sep 15, 2016 10:12 pm

i will use the pastebin method later,
Last edited by Cantar4 on Tue Oct 18, 2016 10:52 pm, edited 2 times in total.

User avatar
s55
HandBrake Team
Posts: 9167
Joined: Sun Dec 24, 2006 1:05 pm

Re: AutoRotate Video

Post by s55 » Thu Sep 15, 2016 10:29 pm

[23:58:58] + options: , --rotate=3
Rotate is not a video encoder or advanced option.
The MacGUI is not running the CLI, so you can't pass CLI arguments though the GUI

You either have to use the CLI directly, or use a nightly build that adds rotate as a GUI option.

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Fri Sep 16, 2016 7:11 am

Rodeo » Apr 29, 2014 : It's on the TO-DO list.
s55 » Apr 17, 2016 : Still on the todo list.
mduell » Sep 15, 2016 : Works for me, would need to see the log from the encode you tried
s55 » Sep 16, 2016 : or use a nightly build that adds rotate as a GUI option.


seems I still have long days sipping coktails...

where can we find this nightly build ?
or, knowing that using an iPhone in this manner will always need the same treatment:
" convert video from 29.97 to 23.98fps, convert audio from 44.1 to 48K, rotate 180 ",
would it be possible to get the command line for the Terminal prompt of a Mac?

rollin_eng
Veteran User
Posts: 2813
Joined: Wed May 04, 2011 11:06 pm

Re: AutoRotate Video

Post by rollin_eng » Fri Sep 16, 2016 7:38 am

https://handbrake.fr/nightly.php

As far as I know you can save it in a preset in the GUI

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Fri Sep 16, 2016 8:47 am

I installed Version 20160916022549-e5e1be3-master ,
opened Preset but disn't find any upside-down iPhone in the device list... ;)
I made my own "iPhone rotate" preset.. didn't work

rollin_eng
Veteran User
Posts: 2813
Joined: Wed May 04, 2011 11:06 pm

Re: AutoRotate Video

Post by rollin_eng » Fri Sep 16, 2016 9:11 am

Cantar4 wrote: I made my own "iPhone rotate" preset.. didn't work
What did you do to create the preset?

Can you post your log.

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Fri Sep 16, 2016 12:43 pm

Hi rollin_eng,
I first selected a film, set my choices, created a new Preset, launched the conversion, ... which failed again
Last edited by Cantar4 on Tue Oct 18, 2016 10:49 pm, edited 2 times in total.

User avatar
Ritsuka
HandBrake Team
Posts: 983
Joined: Fri Jan 12, 2007 11:29 am

Re: AutoRotate Video

Post by Ritsuka » Fri Sep 16, 2016 1:31 pm

You need to set the rotate filter to what you want…

Cantar4
Posts: 38
Joined: Sun Aug 21, 2016 7:07 am

Re: AutoRotate Video

Post by Cantar4 » Fri Sep 16, 2016 5:15 pm

I tried all possible presets [, --rotate] [, --rotate=3] but nothing works,
"You can't pass CLI arguments though the GUI" rules.
Rodeo's (Apr 29, 2014: It's on the TO-DO list) and s55's (Apr 17, 2016 : Still on the todo list),
let me think it's more reasonable to provisionally use the [Removed]-converter which automatically deals
with the Phone orientation stored at the start of take.
Thank you all for your interest in this feature request.

User avatar
Ritsuka
HandBrake Team
Posts: 983
Joined: Fri Jan 12, 2007 11:29 am

Re: AutoRotate Video

Post by Ritsuka » Fri Sep 16, 2016 5:17 pm

The rotate filter is in the picture tab, near all the other filters (in the nightly build, of course.)

Post Reply