Setting custom aspect ratio dynamically

This forum is about all development around libVLC.
hanky
Blank Cone
Blank Cone
Posts: 21
Joined: 30 May 2012 07:49

Setting custom aspect ratio dynamically

Postby hanky » 29 Jul 2016 09:21

Is it possible to change aspect ratio to some custom value dynamically using libvlc_video_set_aspect_ratio? Ideally I would like to set the same aspect ratio as the player window has on its resize.

Currently I can onle change aspect ratio to some standard values like '1:1' or '4:3'. Setting a custom value using libvlc_video_set_aspect_ratio while video is playing seems to have no effect.
In order to apply custom settings I have to restart the playback:

Code: Select all

libvlc_video_set_aspect_ratio(vlcPlayer, /* some custom value */); libvlc_media_player_stop(vlcPlayer); libvlc_media_player_play(vlcPlayer);
How do I set custom aspect ratio without playback restart?

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: Setting custom aspect ratio dynamically

Postby Jean-Baptiste Kempf » 04 Aug 2016 16:42

I think you need to fix libVLC for that.
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.

hanky
Blank Cone
Blank Cone
Posts: 21
Joined: 30 May 2012 07:49

Re: Setting custom aspect ratio dynamically

Postby hanky » 04 Aug 2016 17:14

And what is the main difference between setting standard and custom aspect ratio? Why do changes apply on the fly for standard values and do not for custom values?

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: Setting custom aspect ratio dynamically

Postby Jean-Baptiste Kempf » 04 Aug 2016 19:23

How do you give the custom value?
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.

hanky
Blank Cone
Blank Cone
Posts: 21
Joined: 30 May 2012 07:49

Re: Setting custom aspect ratio dynamically

Postby hanky » 05 Aug 2016 16:59

I set it just like standard values:

Code: Select all

// standard libvlc_video_set_aspect_ratio(vlcPlayer, "4:3"); //custom libvlc_video_set_aspect_ratio(vlcPlayer, "123:77");

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: Setting custom aspect ratio dynamically

Postby Jean-Baptiste Kempf » 06 Aug 2016 11:38

Yeah, I believe the core needs fixes for that.
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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests