Aspect ratio

*nix specific usage questions
frbaresi
New Cone
New Cone
Posts: 9
Joined: 25 Feb 2009 13:47

Aspect ratio

Postby frbaresi » 07 Aug 2009 13:21

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

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: Aspect ratio

Postby erwan10 » 08 Aug 2009 11:44

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

frbaresi
New Cone
New Cone
Posts: 9
Joined: 25 Feb 2009 13:47

Re: Aspect ratio

Postby frbaresi » 10 Aug 2009 11:18

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


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests