This is for videos with metadata rotation this is where metadata has it rotate 90/180/270 when viewed, frequently found on videos shot with phones.
CROP ON VLC CODE
Summary of the Existing Code and File Detailsįor those who might not know this specific code: Once I switched to the OpenGL renderer I was able to get consistent behavior.
This took many more hours to figure out because they behave very erratically and not in a predictable fashion (as far as I can tell) with the rotation data passed. It also does not happen on the same video if I transpose it and remove the rotate flag )?.įinally Both DirectX 9 and DirectX 11(at least on my Win10 machine) are heavily screwed up when it comes to crop (and also behave differently). These two may be the same issue: #25714 #25593 although what is odd for me, is running Win10 a rotated video has the crop/cutoff applied if DirectX 11 is used but not if DirectX 9 or openGL are used (I set the preference and restarted vlc to make sure it took effect). One less than that and it will still display something. Enter a value of the width or the height / 2 on the correct side and it will just go blank. Enter a value of 500 in any of the boxes, for example, to see distortion and odd cropping.
Otherwise crop seems to work.Ĭropping a video that has rotation metadata applied is a disaster. You need to multiply each of those numbers by 16/9 (1.77) to get the correct crop amount applied. Entering a left crop of 350 does not crop nearly 350 pixels over. If you were to enter 530 for left and right crop you should just get a 20 pixel wide line, you get something much wider. Loading a non rotated video that is 1920x1080 then using the video effect transform to rotate it 90 degrees does not have the bottom clipped like the rotate meta data flag does.Ĭropping a non rotated video that is 1920x1080 that has a 90 degree transform effect goes wrong. The 1800 and 950 are random I didn't spend the time to see how many pixels exactly are cut off. Loading a 1080x1920 video with 90 degree rotation (now landscape) instantly at the top cut off (so now 950x1920) (again DX related). This is before any crop is applied and is not running through the crop filter (this it turns out is due to DX). Loading a 1920x1080 video with 90 degree metadata rotation (so now portrait) instantly has the bottom cut off (so it is now say 1800x1080). I have submitted two patches properly to the mailing list for fixes metadata orientation in cropadd.īackground of the Problem / Odd VLC Behavior
CROP ON VLC PATCH
Due to these two things I am putting the patch in this bug ticket rather than properly submitted. I also have no interest in further working on this issue or revising the patch as I have an easier work around. The attached patch is against the 3.x branch and while it seems to work in all cases tested (as long as a DX renderer is not used) I am not sure it should be the permanent code. The downstream crop/aspect ratio rendering functions should likely handle rotated videos better as the arguments passed to them for a rotated video are not-intuitive. DirectX metadata orientation rotation rendering with crop is very inconsistent use an openGL method for it to make any sense.