Page 1 of 1

Aspect ratio

Posted: 07 Aug 2009 13:21
by frbaresi
Hy
I'm using libvlc in order to crate a media player that plays a specific playlist. When I start that media player, I load a (vlc) configuration file where I define the default aspect ratio. The player respects the defined aspect ratio.
I've implemented a function that allows me to press a key and change the current aspect ratio (using libvlc_video_set_aspect_ratio ). The problem is, if I change the aspect ratio to 16:9 (vlc really changes the aspect to 16:9) and then I advance to the next media file on my playlist, vlc plays that media file with the default aspect ratio.

Thanks

Re: Aspect ratio

Posted: 08 Aug 2009 11:44
by erwan10
Do you really need to change the aspect ratio parameter ? This parameter is only intended to force the original aspect ratio in case vlc failed to detect the right value. This should not occur that often ! (and anyway, this parameter can be passed as an option in libvlc_new if you really want to fix the value once for all).

Maybe, what you want is to force videos to fill up a given screen (for instance 16:9) whatever the original aspect ratio. If so, the crop parameter is the right parameter, and obeys the same rules as aspect ratio (can be passed either globally in libvlc_new or through a libvlc_set_crop_geometry function at the media player level)

Erwan10

Re: Aspect ratio

Posted: 10 Aug 2009 11:18
by frbaresi
Hy.
erwan10, i've solved my problem forcing VLC to change the config value of "aspect-ratio"

__config_PutPsz((vlc_object_t *)inst, "aspect-ratio", aspect_ratio);

Thanks