migrating from 0.8.x to 1.x, problems with variables

This forum is about all development around libVLC.
r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

migrating from 0.8.x to 1.x, problems with variables

Postby r21514 » 17 Sep 2009 09:35

I'm trying to migrate my libvlc-based application from old good 0.8.x to new 1.x

I need to implemet things like deinterlace, cropping, adjust, etc.

So, I'm sending variables through libvlc_playlist_add_extended

This 4 things work out of box, like with 0.8.x

:vout-filter=deinterlace
:deinterlace-mode=bob
:aspect-ratio=4:3
:miface-addr=192.168.7.52

But other things don't

:vout-filter=deinterlace:adjust
:contrast=1.00
:brightness=1.00
:hue=0.00
:saturation=1.00
:gamma=1.00

:vout-filter=deinterlace:crop or deinterlace:adjust:crop
:autocrop=0
:crop-geometry=312x344+16+16

No result for both

I'm sorry, I'm not an experienced developer to understand how this things are implemented in QT GUI :(

Also I can't understand how to change brightness and etc in real time, in 0.8.6 I used vlc_object_find to find p_vout and then VLC_var_Set.

Maybe there is a compatibility list between variable-names for 0.8.x and 1.x ?
Last edited by r21514 on 24 Oct 2009 21:23, edited 2 times in total.

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: migrating from 0.8.x to 1.x, problems with variables

Postby r21514 » 18 Sep 2009 08:37

anybody, please!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: migrating from 0.8.x to 1.x, problems with variables

Postby Jean-Baptiste Kempf » 18 Sep 2009 11:47

Tried :vout-filter=deinterlace,crop ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: migrating from 0.8.x to 1.x, problems with variables

Postby r21514 » 19 Sep 2009 15:36

no result

:vout-filter=adjust,deinterlace,crop - only deinterlace realy works
:contrast=1.00 - no
:brightness=100.00 - no
:hue=0.00 - no
:saturation=100.00 - no
:gamma=2.00 - no
:autocrop=0 - no
:crop-geometry=312x344+16+16 - no
:deinterlace-mode=bob - ok
:aspect-ratio=16:9 - ok
:miface-addr=192.168.7.52 - ok

also many other 0.8.x vars do not work

:(

in 0.8.x i used VLC_VariableSet to set all this variables before playing, on 1.x i do not see this function any more

MasterOfPuppets
New Cone
New Cone
Posts: 2
Joined: 25 Nov 2008 16:53

Re: migrating from 0.8.x to 1.x, problems with variables

Postby MasterOfPuppets » 22 Sep 2009 19:47

I had a similar problem and after some trial and error i found a working solution (libvlc 0.9x).
Instead of "vout-filter" for some filters, you have to use "video-filter", but that depends on video renderer used. Order of adjust, (auto)crop and interlace filters is also important.

Direct3d, OpenGL:
option0 = "--vout=direct3d" or "--vout=opengl";
option1 = "--video-filter=adjust:deinterlace";
option2 = "--crop=X:Y";
(if adjust f. is not needed , option1 should be "--vout-filter=deinterlace" )

DirectX:
option0 = "--vout=directx";
option1 = "--video-filter=adjust";
option2 = "--vout-filter=deinterlace";
option3 = "--crop=X:Y";

If you need autocrop option, than you have to use it in all cases with vout-filter : "--vout-filter=crop"; however if deinterlace is allready in --vout-filter, than you have to place crop before deinterlace: "--vout-filter=crop:deinterlace"

That combination works on 1.0 too, except additional option ":deinterlace-mode=blend or x" causes crash.

I am also interested on VLC_var_Set, any plans to return this function ?
Last edited by MasterOfPuppets on 18 Oct 2009 12:24, edited 1 time in total.

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: migrating from 0.8.x to 1.x, problems with variables

Postby r21514 » 08 Oct 2009 04:14

this thing realy works, thanks!

btw, __VLC_var_Set can be found in libvlccore.dll

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: migrating from 0.8.x to 1.x, problems with variables

Postby r21514 » 17 Oct 2009 19:08

about cropping, "--crop=X:Y" is not the same as crop-geometry
anybody knows how to enable crop-geometry is VLC 1.x ?

MasterOfPuppets
New Cone
New Cone
Posts: 2
Joined: 25 Nov 2008 16:53

Re: migrating from 0.8.x to 1.x, problems with variables

Postby MasterOfPuppets » 18 Oct 2009 12:33

:crop-geometry and also :video-filter=croppadd / :croppadd-croptop don't seem to work.

You can set crop geometry by adding desired crops into a list via ":custom-crop-ratios" and then calling libvlc_video_set_crop_geometry.

e.g. :custom-crop-ratios=1:1,4:3,14:9,5:3,1850:1000,2350:1000,312x344+16+16"

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: migrating from 0.8.x to 1.x, problems with variables

Postby r21514 » 21 Oct 2009 12:30

--custom-crop-ratios and --crop are used just for videowindow, it is not a filter
for example i have a mpeg2 channel width 520px width, but in video window it has full 720px (mpeg2 feature) width, so "--crop-geometry" width to 500px cuts 10px each side, but "--crop" cuts 60px each side :)

Anyway crop-geometry doesn't work even in original VLC QT GUI Settings - All - Video - Filters :(

BUT! from command line works!

Code: Select all

vlc.exe --vout-filter=crop --crop-geometry=100x100+10+10 movie.avi
the problem is option "crop-geometry" works only from command line, "vout-filter" work even if set separately for specific file

ifelsek1
New Cone
New Cone
Posts: 1
Joined: 16 Mar 2010 03:48

Re: migrating from 0.8.x to 1.x, problems with variables

Postby ifelsek1 » 16 Mar 2010 03:58

Hi, all

I have a solution of migrating (in windows libvlc 1.0.5).

1st, set options bellow...

Code: Select all

option[0] = "--vout-filter"; option[1] = "crop"; option[2] = "--custom-crop-ratios=512x384+64+48,384x288+128+96,256x192+192+144,128x96+256+192,64x48+288+216";
option[2] is my original resolutions. I want to use libvlc in 640x480(VGA).

When video is displaying, libvlc_set_crop_geometry called.

Code: Select all

libvlc_set_crop_geometry(mp, "512x384+64+48", &ex);
2nd param is always provided in "--custom-crop-ratios" .


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests