Comments (6)
from mpv-examples.
It seems this commit gives the blue screen: 0cfb5ea
To make it work, just add this line again: _mpvSetOptionString(_mpvHandle, GetUtf8Bytes("vo"), GetUtf8Bytes("direct3d"));
(also, sometimes video will not display when debugging with visual studio)
@rossy: Apparently libmpv cannot pick a default "Video Output driver", so what is the correct way of doing this?
It would also be nice to have a dot net OpenGL sample...
from mpv-examples.
Sorry for the late response. A common cause for the "blue screen" is a missing d3dcompiler_43.dll. It seems like this DLL is missing from the "Dev" packages on https://mpv.srsfckn.biz/, but it can be found inside the normal 32 and 64-bit builds. Unzipping it alongside mpv-1.dll should fix the problem. If you have Windows 8.1 or 10, you can also copy d3dcompiler_47.dll from your system32 directory and rename it to d3dcompiler_43.dll (the "version" of the DLL doesn't seem to matter.)
Apparently libmpv cannot pick a default "Video Output driver", so what is the correct way of doing this?
It would also be nice to have a dot net OpenGL sample...
I think mpv will fall back to --vo=direct3d if it can't create a suitable OpenGL context. In this case, I guess the problem is that mpv doesn't find out the OpenGL context is bad until it tries to create a shader and finds out that the shader compiler DLL is missing, at which point the OpenGL backend has already been chosen.
from mpv-examples.
I think we should add this line back again - perhaps with opengl as first choice:
_mpvSetOptionString(_mpvHandle, GetUtf8Bytes("vo"), GetUtf8Bytes("opengl,direct3d"));
See https://mpv.io/manual/stable#video-output-drivers
What do you think @rossy? (I cannot make it work without this line - can you?)
This code has also be really well tested via https://github.com/SubtitleEdit/subtitleedit
Off topic: "OpenGL embedding" with ODS control would be a nice sample - https://github.com/mpv-player/mpv-examples/tree/master/libmpv#user-content-opengl-embedding
from mpv-examples.
Thank for all your replies. As @rossy suggested, the missing d3d3compiler_43.dll file solved my problem. I didn't have any trouble without the "_mpvSetOptionString..." line.
Keep up the good work guys.
from mpv-examples.
@FlyingCircus- Nice. Glad it's fixed.
@niksedk Yeah, the OpenGL VO worked for me. Problem is, the Direct3D VO is not really recommended for normal use. It has poor performance and inaccurate rendering, and it should only be used as a last resort. The GL VO, however should work on all hardware that supports D3D feature level 9_3 or PS 3.0 (through ANGLE,) and for unsupported hardware, it should fall back to software rendering through WARP.
Are you getting the blue screen error or something else? Unfortunately this stuff is hard to debug, since the .NET example doesn't have a way to get log output (yet.) Depending on where you got your libmpv-1.dll, you might need to put d3dcompiler_47.dll or d3dcompiler_43.dll alongside it.
Off topic: "OpenGL embedding" with ODS control would be a nice sample - https://github.com/mpv-player/mpv-examples/tree/master/libmpv#user-content-opengl-embedding
+1. Though it might be difficult to integrate libmpv with a managed OpenGL toolkit. It might require a more low-level solution.
from mpv-examples.
Related Issues (20)
- Swift Example on macOS? HOT 3
- update api examples from opengl-cb API to render API HOT 4
- multiple videos playback in same window HOT 3
- The `simple.c` doesn't work HOT 8
- MacOS compile simple.c failed HOT 5
- Memory leak [linux] [mpv 0.32] HOT 1
- golang demo
- Vala
- Rendering OpenGL with the Enlightenment Foundation Library
- is it really supposed to open a new window in qt?
- angle example?
- iup demo
- qml example to library HOT 1
- Add basic win32 example
- Capture mouse Events in qt application.
- Is there a simple way to load scripts from ~/.config/mpv/scripts ?
- crash on CFBundleGetFunctionPointerForName
- mpv-examples - qt_opengl, libmpv windows crashed HOT 2
- How can I use swiftui too HOT 1
- Qt example does not work with the current release HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-examples.