Crop-Function via libVLC

This forum is about all development around libVLC.
bwilms
New Cone
New Cone
Posts: 2
Joined: 05 Feb 2011 13:41

Crop-Function via libVLC

Postby bwilms » 05 Feb 2011 13:56

Hi there,

I try to set the crop-top, crop-bottom, crop-left, crop-right - Values via the libvlc while the playback of a stream is already running.

I can set the crop-geometry by calling libvlc_video_set_crop_geometry, but as already found in the forum, only with this kind of parameters "'width':'height'"

Maybe I'm too szupid, but how to set the parameter "crop-top" during runtime?

As I've seen in the vlc-source, it is managed by calling SET_Integer(p_mi,"crop-top",px);

But how to do this with the libVLC?

Enviroment:

Compiler: Delphi 6 with paslibvlc from
libvlc 1.1.4


Any help or link to an existing (not seen by me) forum-topic would be great!

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: Crop-Function via libVLC

Postby XilasZ » 05 Feb 2011 15:24

simple: you can't with libvlc.

bwilms
New Cone
New Cone
Posts: 2
Joined: 05 Feb 2011 13:41

Re: Crop-Function via libVLC

Postby bwilms » 05 Feb 2011 16:29

THx for this answer.

This was not the answer I wanted to read, but expected it! :-(

I was searching for it, cause of follwing problem:

I have an application, that can handle up to 20 vlc-instances to show streams from IP-Cams. (like a videowall)

I want to give the user the abillity to select between 3 adjustment-modes:

- No adjustment of the display->Show in original ratio.
- Adjustment by cropping-> Crop the output to fit in the window.
- Adjustment by ratio-> Adjust the aspected ratio to fit in the window.

I managed the last both modes (using libvlc_video_set_aspect_ratio and libvlc_video_set_crop_geometry) , but always have a small black border around, which I want to "crop" away.

Anyone an idea, how to get a solution for that problem?

(Don't know, if I should open a new topic for this question?!)

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: Crop-Function via libVLC

Postby XilasZ » 06 Feb 2011 12:25

a workaround for this is to crop the surface in which vlc renders in your app, if it's possible in your case :p

rvs75
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Jul 2010 11:48

Re: Crop-Function via libVLC

Postby rvs75 » 07 Feb 2011 16:04

you can use this format :
libvlc_video_set_crop_geometry ("left+top+right+bottom")
Left, top, right, bottom are integer for numbers of pixels.
But It's buggy with some version of vlc...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests