Page 1 of 1

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

Posted: 17 Sep 2009 09:35
by r21514
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 ?

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

Posted: 18 Sep 2009 08:37
by r21514
anybody, please!

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

Posted: 18 Sep 2009 11:47
by Jean-Baptiste Kempf
Tried :vout-filter=deinterlace,crop ?

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

Posted: 19 Sep 2009 15:36
by r21514
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

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

Posted: 22 Sep 2009 19:47
by MasterOfPuppets
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 ?

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

Posted: 08 Oct 2009 04:14
by r21514
this thing realy works, thanks!

btw, __VLC_var_Set can be found in libvlccore.dll

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

Posted: 17 Oct 2009 19:08
by r21514
about cropping, "--crop=X:Y" is not the same as crop-geometry
anybody knows how to enable crop-geometry is VLC 1.x ?

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

Posted: 18 Oct 2009 12:33
by MasterOfPuppets
: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"

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

Posted: 21 Oct 2009 12:30
by r21514
--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

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

Posted: 16 Mar 2010 03:58
by ifelsek1
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" .