libvlc_video_set_crop_geometry

This forum is about all development around libVLC.
PetC
Blank Cone
Blank Cone
Posts: 13
Joined: 19 Jun 2010 17:49

libvlc_video_set_crop_geometry

Postby PetC » 30 Jun 2010 14:16

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_video_set_crop_geometry

Postby Rémi Denis-Courmont » 30 Jun 2010 15:10

As far as I know it just works with any values as long as the string is well-formatted. I did not try though.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

PetC
Blank Cone
Blank Cone
Posts: 13
Joined: 19 Jun 2010 17:49

Re: libvlc_video_set_crop_geometry

Postby PetC » 30 Jun 2010 15:41

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_video_set_crop_geometry

Postby Rémi Denis-Courmont » 30 Jun 2010 16:14

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

PetC
Blank Cone
Blank Cone
Posts: 13
Joined: 19 Jun 2010 17:49

Re: libvlc_video_set_crop_geometry

Postby PetC » 30 Jun 2010 16:53

Could you (or anyone else) briefly instruct me which changes should be done in the source code then?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_video_set_crop_geometry

Postby Rémi Denis-Courmont » 02 Jul 2010 04:45

Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Maloupi
Blank Cone
Blank Cone
Posts: 25
Joined: 06 Apr 2011 14:34
VLC version: 2.1.0-git
Operating System: Windows / Linux
Location: Lyon (France)

Re: libvlc_video_set_crop_geometry

Postby Maloupi » 24 Jun 2014 16:26

Hi,

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

Timothy Grove
Blank Cone
Blank Cone
Posts: 33
Joined: 07 Sep 2011 13:17

Re: libvlc_video_set_crop_geometry

Postby Timothy Grove » 02 Aug 2017 20:28

Thank you sooooo much!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests