Page 1 of 1

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

Posted: 20 May 2020 16:43
by GeSLaCHe
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!

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

Posted: 21 May 2020 12:30
by mfkl
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.