N1vla
N1vla

Reputation: 13

LibVLCShrap can't not use opengl win32 video output in Avalonia application

ASS subtitles are all black (unreadable) with VLC 3.0.8 and newer

This problems is also occur in LibVLCSharp. So I want to solve this problem by switching the video output to OpenGL(win32) by using advance command-line --vout=glwin32 when new a LibVlC instance in code, such as var _libVlc = new LibVLC("--vout=glwin32");.

But I found that it can't switch successfully when the media player binding to a Videoview control in axmal. With Binding

When the media player playing video with no binding, it will create a new window automatically, in this case it work. Without Binding

Is there any workrounds to fix this? Thank for any help.

Upvotes: 0

Views: 146

Answers (1)

cube45
cube45

Reputation: 4029

Unfortunately, you can't do that. The Avalonia control is implemented by using the set_hwnd function, that internally forces the use of d3d11.

If you wanted to use opengl instead, you would need libvlc4 hw-accelerated callbacks, and a lot of manual work...

I'd prefer to submit a bug on VLC if it does not already exist and wait for it to be fixed.

Upvotes: 1

Related Questions