libvlc --width and --height configuration options after new?

This forum is about all development around libVLC.
GeSLaCHe
New Cone
New Cone
Posts: 1
Joined: 20 May 2020 16:37

libvlc --width and --height configuration options after new?

Postby GeSLaCHe » 20 May 2020 16:43

My source video is larger than my destination screen, but I'm using LibVLC and a custom shader in the DirectX interface to modify it in a custom way before it actually gets to the swapchain.

In 4.0, the video will automatically be resized down to fit in my screen in a way that preserves its aspect ratio--which is not what I want.

I found the libvlc_new arguments `--no-autoscale` which means the video doesn't get sized--and then "--width" and "--height" for making the video stay exactly the size I want.

My problem is, I'm going to need to parse the metadata and find out how big some videos are, and THEN set the width and height options. Basically I need to know how to set --width and --height on an already existing libvlc instance. Unfortunately the configuration module stuff with chains of config variables is still a bit inscrutable to me...is what I'm after possible with the libvlc interface? Any help would be appreciated, thanks!

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: libvlc --width and --height configuration options after new?

Postby mfkl » 21 May 2020 12:30

you could use

Code: Select all

libvlc_media_parse_with_options
to retrieve the info you need, dispose the libvlc instance and then recreate a new libvlc with the param you now have. Not an optimal solution I'll give you that.
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 26 guests