CropGeometry working successfully?
Strange behaviour with CropGeometry functionality
I don't quite understand how the CropGeometry functionality works, and I don't know if I misunderstand it or really have some kind of bug. I have an application with a screen area of 800x450 pixels (16:9 Aspect ratio). In this application I want that when a video is shown, instead of deforming the video to adapt to the screen. That the video is zoomed and cut to fit to the screen. Original Video:
Since I want to be able to pan and zoom the videos, I try to do the same with the CropGeometry functionality but passing it the new resolution and where it should cut. Searching the internet I have seen that it indicates the following: https://wiki.videolan.org/VLC_HowTo/Crop/ From what I understand I should use this format: vlc input --vout-filter=crop --crop-geometry=120x120+10+10 120x120 is the wanted resolution (in pixels), and 10+10 is the top-left position where the cropping should start (in pixels)
So if the original video is 176x144 resolution I would have to remove pixels above and below to get to 16:9 proportional resolution like my container, so I crop the original video to have a resolution of 176x99 (99 *(16/9) = 176). Therefore if I remove 22.5 pixels from the original video from the top and bottom it should do the same as executing CropGeometry="16:9".
I don't understand what is wrong, doing tests I have been able to do a good crop with: CropGeometry="176x126+0+18"; But I don't really understand why I have to use that parameters.
Is CropGeometry working as expected?
What is the current bug behavior?
Using CropGeometry doesn't cut as expected while using the wanted resolution (in pixels) and top-left position. Now using CropGeometry="176x99+0+22" I got:
What is the expected correct behavior?
I was expecting to get:
Does it work on other plaforms? Does it work with the official VLC apps?
Relevant logs and/or screenshots
- OS: Windows
- Version 10
- LibVLC version and architecture 220.127.116.11 x64
- LibVLCSharp version 18.104.22.168