Problem with identifying display size

This forum is about all development around libVLC.
User9595
New Cone
New Cone
Posts: 2
Joined: 31 Jan 2019 19:51

Problem with identifying display size

Postby User9595 » 01 Feb 2019 18:54

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!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Problem with identifying display size

Postby Jean-Baptiste Kempf » 10 Feb 2019 22:12

You can use the information on the video track to know about it.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

User9595
New Cone
New Cone
Posts: 2
Joined: 31 Jan 2019 19:51

Re: Problem with identifying display size

Postby User9595 » 11 Feb 2019 18:17

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Problem with identifying display size

Postby Jean-Baptiste Kempf » 16 Feb 2019 11:07

It should.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

cube45
New Cone
New Cone
Posts: 8
Joined: 15 Feb 2018 21:32

Re: Problem with identifying display size

Postby cube45 » 17 Feb 2019 13:30

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"

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Problem with identifying display size

Postby Jean-Baptiste Kempf » 17 Feb 2019 17:50

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.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

robUx4
Developer
Developer
Posts: 255
Joined: 31 Jan 2005 13:50
VLC version: master
Operating System: Windows
Contact:

Re: Problem with identifying display size

Postby robUx4 » 18 Feb 2019 09:51

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...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests