Jump to content

Recommended Posts

Posted

Hi all

 

A few MOV files have landed on a network drive which appear to be shot on an iPhone, held vertically (*). Normally, I use FormatFactory to transcode large videos down to a smaller, more manageable size. These particular videos are being a pig, however.

 

When playing back the original videos in VLC or whatever, they are rendered upright, with the subject the correct way up (i.e. not a widescreen video with the subject showing sideways). After transcoding with FormatFactory (I've tried all sorts of output options), the frame is still the right way up but is always stretched horizontally to fit a conventional aspect ratio, rather than maintaining the original aspect ratio. If I try it in Handbrake, the resulting video is rotated 90 degrees, so that the subject is not distorted but is on its side.

 

Does anyone have any killer tips for dealing with this? I have a feeling that I'm missing something key about how video formats may or may not store orientation information.

 

* (feel free to vent any opinions you may have about the scourge that is vertically shot videos)

Posted

Have you tried over-riding the aspect ratio options?

 

format_factory.JPG

 

I'm sure it's possible, but not tried doing it myself. Very few times Format Factory has failed me though.

Posted
Have you tried over-riding the aspect ratio options?.

 

I think I've tried them all, but I'll do a thorough test of all those options just in case.

 

I've had success of sorts by first using Handbrake to reduce the size and then FF to rotate them back upright. It would be nice to work out a single step though, preferably with FF.

 

One of my only complaints about FF has been that WMVs it generated always seemed to need reindexing (using asfbin). The current version seems to have fixed that, though :)

Posted

None of the 'Aspect Ratio' options in FF keep the video from being stretched horizontally. The 'Video Size' options don't allow for custom a frame size, it only allows you to select from a list of landscape sizes.

 

I'll try all the aspect ratio options again but this time with 2-pass encoding enabled.

Posted

These are the available options for Video Size. I've tried the 50% option but the output was still stretched.

 

2017-06-15 154202 - .png

 

The available options for Aspect Ratio are as per @3s-gtech's earlier screenshot.

Posted

Looking online, you should leave the resolution on default, aspect ratio as automatic, then use the rotate in advanced options.

 

I use handbrake myself and have never had a problem!

Posted

I think I'm getting somewhere as to the underlying causes.

 

Using MediaInfo, I can see that a vertically shot iPhone video is in fact still recorded as a landscape video (1920x1080) but a rotation value (90deg) stored in the video stream metadata. VLC, WMP, FormatFactory etc must all be observing this value and presenting the video back in the upright orientation.

 

Handbrake must be ignoring it, and processing it just as any other 1920x1080 video.

 

2017-06-15 162021 - MediaArea.net_MediaInfo.png

 

As to how I get FormatFactory to first ignore it, and then rotate the video itself, I don't know. I've perhaps exceeded the time that was worth spending on this now!!

Posted
As to how I get FormatFactory to first ignore it, and then rotate the video itself, I don't know.

ffmpeg can modify or clear the rotation metadata in the video. I'll see if I can find out the command to do it.

  • Thanks 1
Posted
Using MediaInfo, I can see that a vertically shot iPhone video is in fact still recorded as a landscape video (1920x1080) but a rotation value (90deg) stored in the video stream metadata.

I've just tested it and the following .cmd script seems to do the trick. :)

 

@echo off
setlocal enabledelayedexpansion
set SCRIPTDIR=%~dp0
set SCRIPTDIR=%SCRIPTDIR:~0,-1%

cd /d "%SCRIPTDIR%"

:: Remux MOVs with H.264 video and AAC audio to MP4 and reset the rotation metadata
for %%a in ("*.mov") do ffmpeg.exe -i "%%a" -c copy -metadata:s:v:0 rotate=0 "%%~na.mp4"

 

Download ffmpeg.exe from here and place it in the same folder as the script and videos.

Posted
I've just tested it and the following .cmd script seems to do the trick. :)

 

I've not yet been able to give this a whirl, but it looks really useful. Thanks

Posted
Or just delete the video and tell the user how to shoot video the proper way

 

If Steve Jobs can't get away with telling people how not to hold their iPhone, I'm not sure what chance I would have!

Posted
The YouTube capture app just says "Yo, rotate to start." Else you don't get a record button. Simples. Shame it's not a built in 'feature'.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...