Page 1 of 1

fill window in libvlc (iOS app)

Posted: 28 Aug 2023 20:41
by manaman
Hello. I'm new here so pls go easy on me. I have an app developer building an app which uses libvlc to play and stream video such as RTSP etc. It works well except that it plays video without changing it (I know, that's what it's supposed to do!), but we would like to have any video fill the window it's in, for example if we have a window in the app that's 16:9, but the stream is natively 4:3, libvlc would adjust the stream to fill the 16:9 window. Main use case is IP cameras whose native aspect is 4:3 that we want to fit in a 16:9 window (even if that means the stream will become a little squashed/stretched). There are other uses we'd like this for too. I would be grateful if anyone knows any code/tips that we can use in our app to make libvlc do this by default. Happy to reimburse for your time. Many thanks.

Re: fill window in libvlc (iOS app)

Posted: 29 Aug 2023 16:53
by fkuehne
You can set the crop and the aspect ratio as properties on the VLCMediaPlayer object to do what you want.

Re: fill window in libvlc (iOS app)

Posted: 13 Jan 2024 14:14
by manaman
You can set the crop and the aspect ratio as properties on the VLCMediaPlayer object to do what you want.
@fkuehne Thanks for your reply, would you be kind enough to tell me what the code would be to insert, to set to 16:9 and/or to stretch to fill the window if the window is already 16:9 shape?

Re: fill window in libvlc (iOS app)

Posted: 14 Jan 2024 06:28
by fkuehne
Please see the header file of the VLCMediaPlayer object, thank you.