Page 1 of 1

Problem with identifying display size

Posted: 01 Feb 2019 18:54
by User9595
Hello,
I'm using https://github.com/ZeBobo5/Vlc.DotNet, a C# wrapper around libvlc, for embedding videos in my C#/WPF application. Unfortunately I have problems with the sizing of the video output. If I play a full HD clip (e.g. Big buck bunny http://distribution.bbb3d.renderfarming ... normal.mp4), libvlc returns size as 1920 x 1088 instead of 1920 x 1080. This issue appears because libvlc distinguishes between buffer size and display size. The VideoFormat(...) callback, that is used by the VLC.DotNet libary, returns the buffer size from libvlc, which causes the problem. Is there a way of calculating or querying the display size for correct scaling of the video output?

In the correspondig issue thread (https://github.com/ZeBobo5/Vlc.DotNet/issues/508) I also mentioned a way of reprodrucing the problem with the official samples for Vlc.DotNet libary.

Thanks for any help!

Re: Problem with identifying display size

Posted: 10 Feb 2019 22:12
by Jean-Baptiste Kempf
You can use the information on the video track to know about it.

Re: Problem with identifying display size

Posted: 11 Feb 2019 18:17
by User9595
Thanks for your reply! Does VLC provide information on the video track before the VideoFormat(...) callback is entered, or have I to gather this information via an external tool?

Re: Problem with identifying display size

Posted: 16 Feb 2019 11:07
by Jean-Baptiste Kempf
It should.

Re: Problem with identifying display size

Posted: 17 Feb 2019 13:30
by cube45
Hi j-b,
I'm reading the documentation at https://www.videolan.org/developers/vlc ... 017d1d6b35
What is supposed to be given as input? The buffer size or the visible size? The doc only talks about "pixel width"

Re: Problem with identifying display size

Posted: 17 Feb 2019 17:50
by Jean-Baptiste Kempf
Hi j-b,
I'm reading the documentation at https://www.videolan.org/developers/vlc ... 017d1d6b35
What is supposed to be given as input? The buffer size or the visible size? The doc only talks about "pixel width"

See with robux on IRC.

Re: Problem with identifying display size

Posted: 18 Feb 2019 09:51
by robUx4
At the very least the doc is not clear. But it doesn't make sense to provide a size to the host app without telling it what display size it should be.
Plus this API provides planes pitch but doesn't even tell how many planes there are...