Mpv: Black screen with vo_gpu/d3d11 on Windows 7

Created on 26 Dec 2017  路  30Comments  路  Source: mpv-player/mpv

mpv version and platform

mpv-x86_64-20171225,windows 7 Ultimate 64-bit

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Playing any video file(mp4,mkv..etc) will render a black screen with only audio playing in the background

Expected behavior

I should be able to see the video and hear the audio,when I play the media file on my pc

Actual behavior

Instead,I get a black screen when I try to play the media file

Log file

Log file in output.txt
output.txt

Make a log file made with -v or --log-file=output.txt, paste it to
http://sprunge.us or a similar site, and replace this text with a link to it.

Providing a log file is strongly encouraged. It is very helpful for reproducing
bugs or getting important technical context. Without a log it might not be
possible to analyze and fix certain bugs, and your bug report will be closed
or ignored.

win intel

Most helpful comment

Well, newer mpv versions use a D3D11 renderer (which works even with Windows 10鈥檚 software renderer), but there are no obvious errors in your log file. That makes it next to impossible for us to debug this issue.
You can add gpu-context=angle to your config file to restore the old behavior. If you don鈥檛 have a config file yet, here鈥檚 how to create it: https://0x0.st/s8xz.webm

All 30 comments

Please play a file when using the --log-file option, or else we won鈥檛 be able to tell what鈥檚 going on.

ok,done

So,what seems to be the problem?

That you seem to have uploaded the same log file. Use mpv --log-file=output.txt somefile.mp4.

I was playing the media file on mpv,when I generated the output file

You have to play the file and generate the log with the _same instance_ of mpv. That means running something like lachs0r's command that includes the name of the file you want to test.

What about this?Sorry I am new to this,if I offended you
output.txt

That log is the same as the previous ones. Are you launching mpv from the Command Prompt? If so, you must type the name of the file in the same place you are typing --log-file=output.txt

If it helps, you can also drag the file onto the Command Prompt before pressing enter. If you do this, you will see something like mpv --log-file=output.txt D:\the\full\path\to\the\file.mp4

If it works, the log file will be much longer than the ones you have posted so far.

Ok,I got it,thank for you guidance and here is the log file
output.txt

So,what seems to be the problem?

Hard to tell. Old Intel drivers?

No,I have the recent one and I can play the video files on the old version of the mpv(i.e, both audio and video)

Well, newer mpv versions use a D3D11 renderer (which works even with Windows 10鈥檚 software renderer), but there are no obvious errors in your log file. That makes it next to impossible for us to debug this issue.
You can add gpu-context=angle to your config file to restore the old behavior. If you don鈥檛 have a config file yet, here鈥檚 how to create it: https://0x0.st/s8xz.webm

Thank you,mate.It's working now

@gavbn Now that it's working, could you post another log? It might help to diagnose what went wrong.

ok,sure

Here is the log file
output.txt

By the way,why is this happening only in windows 7?

Thanks a lot. That should be helpful.

By the way,why is this happening only in windows 7?

Not sure. I still can't tell what the issue was, but it might not have been because of Windows 7. There could be other factors, like the graphics hardware.

Ok,but I had no problem in the older versions of mpv

And how to disable the "Cache" thing on the player which is at the bottom right side,which appears while playing the video file

I also experiencing similar problems when using d3d11(using latest build by shinchiro).I traced it back to video-sync=display-resaple(without it is working ok),switching to angle is fine as well.This is the error it gives me in the console:
"[vo/gpu/d3d11] Couldn't resize swapchain: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887a0005)"
I have to admit,my system is weird to say at least.I'm using old laptop(2011 model) with external GPU(GTX 1080) and due to NVIDIA cutting support for this DIY mods i was stuck with a old driver(378.92) for a long time and never had that issue.378.92 is the last one that accelerates properly on Optimus system.Now that i'm on the newest(388.71) i see all those errors.I'm guessing(sorry,another noob here) that MPV is gathering all the GPU info from the browser(i'm using Chromium).With the latest driver it showing that the iGPU is active,also the MPV log file showing that as well and refusing to activate "shaderc"(this wasn't the case with 378.92),so my QUESTION also REQUEST to the gurus here is is there a way to implement option to choose which GPU MPV to use for Optimus systems like mine?This i believe should fix all those issues.My OS is Win 10(x64) 1607 LTSB.Sorry for the long post guys,i'm kind of frustrated about all that,great player btw,thank you and MERRY CHRISTMAS to you ALL.

@gavbn If you're still around, could you try this test build? If it works, you should get video, even without that line in your mpv.conf file:
https://files.jrg.systems/mpv-sysmem-x86_64-20171230-git-cdd273f.7z

For anyone who's interested, the source is here: https://github.com/rossy/mpv/commit/d3d11-sysmem

This is just a guess, but apparently some Intel drivers have trouble copying between staging buffers and constant buffers, so I tried to use system memory instead in this branch.

@dnmTX This sounds like a different issue. If you want proper support, you should probably open a separate issue to track it. Things don't look good though. If you get that error, it's likely that your GPU drivers have hung or crashed. If your setup is unsupported by Nvidia, they probably won't fix it.

If you just want to switch between the iGPU and the external GPU, you might be able to do it from the Nvidia control panel. If not, we are considering adding support for switching GPUs using mpv options (but we don't support this at the moment.)

Ok,I will let you know @rossy

It's working now without the conf file,thank you for your time on solving my problem

@gavbn No problem. Thanks for testing.

So it looks like this is an Intel driver bug (https://crbug.com/593024.) I'll probably add the workaround to master.

@rossy thank you for even considering adding support for switchable GPU's(in NVCP every possible option global and individual is set to use Nvidia).The problem is with....oh man...when it comes to Optimus everyone points finger to the others(Intel,Nvidia,Chrome...to name a few).Anyway...i just tested the player with Vulkan today and it defaults to the Nvidia GPU wright away so it's just a matter of having that option to choose which GPU to use and i know that all will be fine after that.I hope that you and the rest of the devs not gonna abandon the idea and make that option possible,until then i'll be waiting patiently.I actually have the same issue like the OP when using video-sync=display-resample(without it it's fine) so i'm gonna test the build that you post it here and let you know.Thanks again.

UPDATE: Nope,it's even worse then before when using VSync.This is what i got from the log file:
[ 19.046][v][vo/gpu/win32] restore window bounds: 274:153:817:460
[ 19.046][v][vo/gpu/win32] reset window bounds: 274:153:817:460
[ 19.051][d][vo/gpu/win32] move window: 274:153
[ 19.051][v][vo/gpu/win32] resize window: 817:460
[ 19.054][f][vo/gpu/d3d11] Couldn't resize swapchain: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887a0005)
[ 20.773][v][cache] Cache is not responding - slow/stuck network connection?

And this error showing up in the console all the time when i use profile=gpu-hq combine with video-sync=display resample:
[vo/gpu/d3d11] Failed to create Texture2D: The parameter is incorrect. (0x80070057)
[vo/gpu] Error: texture could not be created.
I'll probably open a new issue tomorrow.

Same issue. New mpv build works on my newer computer but I get the black screen on the older one (both Windows 10 Intel). Test build solves the issue without the addition to the config file. Thanks for your help.

@cyberrufus Thanks for testing. This is probably the right solution then. It seems only a handful of Intel PCs are affected. I've tested two Intel laptops and neither have the bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xanadupark picture xanadupark  路  3Comments

Edenharder picture Edenharder  路  4Comments

beew picture beew  路  3Comments

fitipe picture fitipe  路  3Comments

ghost picture ghost  路  3Comments