Page 1 of 1

libvlc_video_set_crop_geometry

Posted: 30 Jun 2010 14:16
by PetC
You may have seen that question in other section of this forum. Sorry for spam then, but I really need to get some clues. Here comes the question:
How to make function libvlc_video_set_crop_geometry() work without predefining the crop geometries with option --custom-crop-ratios at instance creation? So that it works with any dimensions given as argument?

Re: libvlc_video_set_crop_geometry

Posted: 30 Jun 2010 15:10
by Rémi Denis-Courmont
As far as I know it just works with any values as long as the string is well-formatted. I did not try though.

Re: libvlc_video_set_crop_geometry

Posted: 30 Jun 2010 15:41
by PetC
That would be logical, but... The string format is the following: "<width>x<height>+<offset_x>+<offset_y>", right? With no options specified, nothing happens after calling the function. If the instance is started with options:
--vout-filter=crop --custom-crop-ratios=100x100+0+0
the function works if called in a following way:
<media_player>.video_set_crop_geometry("100x100+0+0") (I use python bindings)
Obviously, only for dimensions specified in options. Am I correct? Or different options should be used to make it work?

Re: libvlc_video_set_crop_geometry

Posted: 30 Jun 2010 16:14
by Rémi Denis-Courmont
They're three formats: numerator:denominator, wdith:height+x+y and left:top:right:bottom

--custom-crop-rations just adds items in the choice list for the user interface. But yeah, the variable subsystem rejects unlisted choices. So someone would need to patch the LibVLC crop geometry function to automatically add the choice.

Re: libvlc_video_set_crop_geometry

Posted: 30 Jun 2010 16:53
by PetC
Could you (or anyone else) briefly instruct me which changes should be done in the source code then?

Re: libvlc_video_set_crop_geometry

Posted: 02 Jul 2010 04:45
by Rémi Denis-Courmont

Re: libvlc_video_set_crop_geometry

Posted: 24 Jun 2014 16:26
by Maloupi
Hi,

I had difficulties to make libvlc_video_set_crop_geometry works well.
I finally succeed using the following parameters :
"rigthxbottom+left+top"

Re: libvlc_video_set_crop_geometry

Posted: 02 Aug 2017 20:28
by Timothy Grove
Thank you sooooo much!