fill window in libvlc (iOS app)

macOS specific usage questions
manaman
New Cone
New Cone
Posts: 5
Joined: 13 Jan 2019 20:49

fill window in libvlc (iOS app)

Postby manaman » 28 Aug 2023 20:41

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.

fkuehne
Developer
Developer
Posts: 7265
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: fill window in libvlc (iOS app)

Postby fkuehne » 29 Aug 2023 16:53

You can set the crop and the aspect ratio as properties on the VLCMediaPlayer object to do what you want.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

manaman
New Cone
New Cone
Posts: 5
Joined: 13 Jan 2019 20:49

Re: fill window in libvlc (iOS app)

Postby manaman » 13 Jan 2024 14:14

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?

fkuehne
Developer
Developer
Posts: 7265
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: fill window in libvlc (iOS app)

Postby fkuehne » 14 Jan 2024 06:28

Please see the header file of the VLCMediaPlayer object, thank you.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests