To let to set autocrop and crop-geometry per playlist item

Feature requests for VLC.
Lurker
Blank Cone
Blank Cone
Posts: 34
Joined: 09 Jul 2006 23:16

To let to set autocrop and crop-geometry per playlist item

Postby Lurker » 10 Jul 2006 12:25

Investigating why I can't set "crop-geometry" parameter for a playlist item eithe via the command line, or via m3u playlist, I've found out that this and "autocrop" parameters are handled so that they use only the global settings, from config file or via command line global options (starting from --).

But I need to set them in a m3u list of TV via Internet channels, different values for each channel. I hope other people might find such a feature useful!

Lurker
Blank Cone
Blank Cone
Posts: 34
Joined: 09 Jul 2006 23:16

Postby Lurker » 10 Jul 2006 15:26

It looks like quite easy change. In the modules/crop.c, function Init(), instead of:

Code: Select all

/* Shall we use autocrop ? */ p_vout->p_sys->b_autocrop = config_GetInt( p_vout, "autocrop" ); /* Get geometry value from the user */ psz_var = config_GetPsz( p_vout, "crop-geometry" );
I wrote

Code: Select all

/* Shall we use autocrop ? */ p_vout->p_sys->b_autocrop = var_CreateGetBool(p_vout,"autocrop"); /* Get geometry value from the user */ psz_var = var_CreateGetString( p_vout, "crop-geometry" ); if ( psz_var && psz_var[0]==0 ) { free(psz_var); psz_var = NULL; }
and it works as expected! I've made a check for an empty string for compatibility with the old code, because it handles an empty string and a NULL different way, while in this code they mean the same. Well, I could miss something...

Lurker
Blank Cone
Blank Cone
Posts: 34
Joined: 09 Jul 2006 23:16

Postby Lurker » 10 Jul 2006 15:34

OK, not exactly as expected: it looks for the new parameters only if a new window is created for video. If a new stream can be played in the existing window, it does not work...

All in all I'm not a developer. I hope a developer knows the internals better.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 10 Jul 2006 21:40

Note that VLC now has another crop feature which is embeded in the video output system (ie not a filter). You can set the crop ratio using the

Code: Select all

--crop <string> Video cropping
option. Preset cropping options can be changed on the fly durring playback (in the video menu). Using the developement version of VLC, you can add custom crop settings to this list of presets, and fine tune cropping using the alt-[shift-](i|j|k|l) key combos. This new (it was introduced in VLC 0.8.4 i think) crop system is far more efficient than the old crop filter. The last thing it needs is some kind of autocrop feature ... but you can do without it using the key combos.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 10 Jul 2006 21:44

Note that VLC 0.8.5 only supports aspect ratio type strings for the --crop option (ie <width>:<height>) while the developement version also supports the <weight>x<height>+<top>+<left> syntax (like the old crop video output filter) and the <left>+<top>+<right>+<bottom> syntax.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Lurker
Blank Cone
Blank Cone
Posts: 34
Joined: 09 Jul 2006 23:16

Postby Lurker » 10 Jul 2006 21:46

I don't care about "crop" option, I say only about "crop-geometry", from the "crop" video filter. For me it is far more convenient to crop distorted parts of the streaming video using crop-geometry, and then, using RC, choose from aspect ration-like crop parameters e.g. to see a wide screen movie on my wide screen monitor.
Last edited by Lurker on 10 Jul 2006 21:54, edited 1 time in total.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 10 Jul 2006 21:51

Did you read what i just said ? that the old crop filter is outdated ?
And if you were so inteligent, you'd know about the :option=value syntax which just happens to work with --crop. But i won't explain how that works since it's not what you're looking for.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Lurker
Blank Cone
Blank Cone
Posts: 34
Joined: 09 Jul 2006 23:16

Postby Lurker » 10 Jul 2006 21:56

OK, which build can I use to check how the new implementation of crop works?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 10 Jul 2006 22:31

As stated in a previous reply, you can try starting with 0.8.5 (since it's aspect ratio syntax only, it'll only crop left/right or top/bottom symetrically) or the developement version if you want to fine tune more. To include it in a m3u file you can use the option with

Code: Select all

#EXTVLCOPT:crop=value
preceding every file which needs cropping.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests