jthompson Posted June 15, 2017 Posted June 15, 2017 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)
bald_pig Posted June 15, 2017 Posted June 15, 2017 Nuff said. https://www.youtube.com/watch?v=Bt9zSfinwFA 2
jthompson Posted June 15, 2017 Author Posted June 15, 2017 Nuff said. Perhaps something clever with FSRM to automatically email that YouTube link to owners of vertical videos on the network drive?
3s-gtech Posted June 15, 2017 Posted June 15, 2017 Have you tried over-riding the aspect ratio options? I'm sure it's possible, but not tried doing it myself. Very few times Format Factory has failed me though.
jthompson Posted June 15, 2017 Author Posted June 15, 2017 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
bald_pig Posted June 15, 2017 Posted June 15, 2017 Handbrake can rotate the videos, and looking at @3s-gtech's screenshot, you should be able to do it with the correct settings.
jthompson Posted June 15, 2017 Author Posted June 15, 2017 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.
jthompson Posted June 15, 2017 Author Posted June 15, 2017 These are the available options for Video Size. I've tried the 50% option but the output was still stretched. The available options for Aspect Ratio are as per @3s-gtech's earlier screenshot.
bald_pig Posted June 15, 2017 Posted June 15, 2017 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!
jthompson Posted June 15, 2017 Author Posted June 15, 2017 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. 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!!
Arthur Posted June 15, 2017 Posted June 15, 2017 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. 1
Arthur Posted June 15, 2017 Posted June 15, 2017 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.
Arthur Posted June 15, 2017 Posted June 15, 2017 * (feel free to vent any opinions you may have about the scourge that is vertically shot videos) To prevent it happening again... https://horizon.camera
forkies Posted June 15, 2017 Posted June 15, 2017 To prevent it happening again... https://horizon.camera Or just delete the video and tell the user how to shoot video the proper way 1
jthompson Posted June 16, 2017 Author Posted June 16, 2017 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
jthompson Posted June 16, 2017 Author Posted June 16, 2017 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!
vikpaw Posted June 17, 2017 Posted June 17, 2017 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'.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now